Skip to content

Commit

Permalink
fix: fix frozen accounts array
Browse files Browse the repository at this point in the history
  • Loading branch information
nikaaru committed Dec 1, 2024
1 parent df6b21f commit 4e0fa67
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wallets/react/src/hub/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,12 @@ export function checkHubStateAndTriggerEvents(
hasNetworkChanged = true;
}

// TODO: `accounts` has been frozen, we should check and find where object.freeze() is calling.

// Check for accounts
if (
previousNamespaceState.accounts?.sort().toString() !==
currentNamespaceState.accounts?.sort().toString()
previousNamespaceState.accounts?.slice().sort().toString() !==
currentNamespaceState.accounts?.slice().sort().toString()
) {
if (currentNamespaceState.accounts) {
const formattedAddresses = currentNamespaceState.accounts.map(
Expand Down

0 comments on commit 4e0fa67

Please sign in to comment.