Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: no wallet balance service calls #819

Merged
merged 1 commit into from
Jan 17, 2025
Merged

fix: no wallet balance service calls #819

merged 1 commit into from
Jan 17, 2025

Conversation

alexp3y
Copy link
Contributor

@alexp3y alexp3y commented Jan 17, 2025

PR fixes an issue that occurs when balance services (BTC, STX, SIP10) are called with fresh app state and/or no wallets loaded (i.e. an empty array of accounts). The balance services should return a default zero balance, instead they throw errors, preventing components from rendering.

The PR also adds logic to skip the BIS xpub inscriptions request when on testnet as it isn't currently supported on the BIS testnet server and is returns a 404. The testnet server will be upgraded end of month and the request can be reinstated.

@alexp3y alexp3y marked this pull request as ready for review January 17, 2025 13:52
Copy link
Contributor

@pete-watters pete-watters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @alexp3y 👍

So we default to 0 and then can still handle errors appropriately via the new state then I can also filter out tokens with 0 we don't want to see client side

@alexp3y
Copy link
Contributor Author

alexp3y commented Jan 17, 2025

@pete-watters The balance defaults should only apply at aggregate-level calls, e.g. the aggregate SIP10 balance of [] accounts is 0 USD (instead of an error), but there wouldn't be any zero-balance tokens under that.

@alexp3y alexp3y added this pull request to the merge queue Jan 17, 2025
Merged via the queue into dev with commit 20dccd5 Jan 17, 2025
11 checks passed
@alexp3y alexp3y deleted the fix/no-wallet-balances branch January 17, 2025 14:13
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.

2 participants