Skip to content

Conversation

@piyalbasu
Copy link
Contributor

Closes #2290

Fixes 2 issues with calculating available balance:

  1. we were incorrectly defaulting to 0 when we were trying to account for negative numbers (caused by a high fee). We are now using the same logic as freighter-mobile

2a) we were re-calculating minimum balance even though Freighter BE returns that value for us. Removing that extra logic

2b) for custom networks that just retrieve balances from Horizon or Quickstart, we have a transformer that does this already

Copy link
Contributor

@aristidesstaffieri aristidesstaffieri left a comment

Choose a reason for hiding this comment

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

nice good catch 👏

@piyalbasu piyalbasu merged commit 3137982 into release/5.35.1 Oct 3, 2025
3 checks passed
@piyalbasu piyalbasu deleted the bugfix/fix-avail-balance branch October 3, 2025 16:18
piyalbasu added a commit that referenced this pull request Oct 3, 2025
* upgrade to yarn 2 and use resolutions to block vulnerable package versions (#2239)

* upgrade to yarn 2 and use resolutions to block vulnerable package versions

* rm deprecated .yarnrc

* rm yarnpath

* try committing yarn binary to repo

* try corepack enable for gha

* update run tests cmd

* rm yarnpath

* rm npm i yarn

* update all pipelines

* rm superfluous history types

* ensure invoke host function tx shows contract parameters (#2243)

* ensure invoke host function tx shows contract parameters

* add test for fallback if contract spec retrieval fails

* Bugfix/rm auth param names (#2244)

* ensure invoke host function tx shows contract parameters

* add test for fallback if contract spec retrieval fails

* do not show contract parameters for authorizations

* add tests for create contract v1 and invoke contract

* add issuer for changeTrust op (#2246)

* add issuer for changeTrust op

* programmatically disable overflow:hidden when copying a value

* Revert "add issuer for changeTrust op (#2246)" (#2247)

This reverts commit 19c8a68.

* Bugfix/add issuer for changetrust (#2249)

* ensure invoke host function tx shows contract parameters

* add test for fallback if contract spec retrieval fails

* do not show contract parameters for authorizations

* add tests for create contract v1 and invoke contract

* add issuer for changeTrust op

* programmatically disable overflow:hidden when copying a value

* cache account balances and poll for updates (#2252)

* cache account balances and poll for updates

* fix CI tests

* rm `force:true` which was causing action to happen too fast

* do a fresh balance fetch on account/network change

* pr comments

* add more sentry tracking for Account and Wallets views (#2268)

* add more sentry tracking for Account and Wallets views

* adding more sentry reporting

* gracefully degrade on errors from Blockaid (#2269)

* gracefully degrade on errors from Blockaid

* should not be necessary to skip dapp scanning on custom network

* rm extra dep

* add a test for persisting configurations in the send flow (#2271)

* add a test for persisting configurations in the send flow

* rm logs and update muxed acct; lower xlm payment

* handle missing scan-tx result; add disabled state for Confirm Anyway (#2272)

* handle missing scan-tx result; add disabled state for Confirm Anyway

* assertions to show correct confirm button on Blockaid error

* add cache for balances to ensure we do a fresh lookup when needed (#2275)

* add cache for balances to ensure we do a fresh lookup when needed

* add try...catch to token-prices polling

* rm log

* only dispatch saveBalancesForAccount when fresh data has been fetched

* adjust test to wait for UI change

* replace yarn setup with just yarn

* after adding/removing asset: update status (#2285)

* Bugfix/update custom token balance (#2286)

* after adding/removing asset: update status

* update token balances after adding/removing token

* update comment

* test for showing e2e token in account balances view

* remove event properties from blockaid metric event properties (#2288)

* Bugfix/fix avail balance (#2291)

* better logic for preventing negative numbers in available balance

* simplify minimum balance calc by using BE's value

* update mock data
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.

3 participants