Skip to content

fix: prevent non-MIDEN tokens from appearing delayed#98

Merged
WiktorStarczewski merged 1 commit intomainfrom
wiktor-fix-metadata-fetch
Jan 23, 2026
Merged

fix: prevent non-MIDEN tokens from appearing delayed#98
WiktorStarczewski merged 1 commit intomainfrom
wiktor-fix-metadata-fetch

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

Move metadata fetching inside the same WASM client lock as getAccount() to prevent AutoSync from grabbing the lock between operations.

Previously, fetchBalances() released the lock after getting the user's account, then tried to acquire it again for each non-MIDEN token's metadata. If AutoSync grabbed the lock in between (which holds it for 30+ seconds during syncState), non-MIDEN tokens would appear delayed.

Now all WASM operations happen in a single lock acquisition.

Move metadata fetching inside the same WASM client lock as getAccount()
to prevent AutoSync from grabbing the lock between operations.

Previously, fetchBalances() released the lock after getting the user's
account, then tried to acquire it again for each non-MIDEN token's
metadata. If AutoSync grabbed the lock in between (which holds it for
30+ seconds during syncState), non-MIDEN tokens would appear delayed.

Now all WASM operations happen in a single lock acquisition.
@WiktorStarczewski WiktorStarczewski merged commit eec7696 into main Jan 23, 2026
9 checks passed
@WiktorStarczewski WiktorStarczewski deleted the wiktor-fix-metadata-fetch branch January 23, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant