Skip to content

Commit

Permalink
fix: wallet connect
Browse files Browse the repository at this point in the history
  • Loading branch information
songkeys committed Aug 24, 2022
1 parent ded38d4 commit 17636a2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion utils/wallet/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,16 @@ const appInfo: RainbowKitProviderProps["appInfo"] = {
};

export function getCurrentAddress() {
const data = storage.getItem("store") as any;
let data = storage.getItem("store") as any;

if (typeof data === "string") {
try {
data = JSON.parse(data);
} catch {
return null;
}
}

return data?.state?.data?.account;
}

Expand Down

0 comments on commit 17636a2

Please sign in to comment.