Skip to content

Commit

Permalink
chore: add test code
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 30, 2025
1 parent 571fdef commit 441bc34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/Header/WalletButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,20 @@ const WalletButton = () => {
dispatch(_hideModalMEME());
};
const fetchData = (id?: string) => {
console.log("---------------id, accountId", id, accountId);
console.log(
'window.localStorage.getItem("near-wallet-selector:selectedWalletId")',
id,
accountId,
);
if (
id &&
accountId &&
accountId !== id &&
(window.localStorage.getItem("near-wallet-selector:selectedWalletId") == '"btc-wallet"' ||
accountId.startsWith("bc1"))
) {
console.log("---------------ready refresh");
// for btc wallet to switch accountId
dispatch(setAccountId(id));
setTimeout(() => {
Expand Down
2 changes: 2 additions & 0 deletions utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export const getBurrow = async ({
// resetBurrow = false;

const changeAccount = async (accountId) => {
console.log("-----------------changeAccount", accountId);
console.log("-----------------fetchData", fetchData);
if (fetchData) fetchData(accountId);
};

Expand Down

0 comments on commit 441bc34

Please sign in to comment.