Skip to content

Conversation

@mithatakbulut
Copy link
Contributor

@mithatakbulut mithatakbulut commented Oct 1, 2025

  • Updated the logic for determining insufficient balance to handle undefined tokenBalance cases.
const tokenBalance = tokenBalancesData?.pages?.[0]?.balances?.find(balance =>
    compareAddress(balance.contractAddress, selectedCurrency.address)
  )

if tokenBalancesData?.pages?.[0]?.balances is an empty array, tokenBalance goes undefined, we don't check this for isInsufficientBalance.

Ticket link: https://github.com/0xsequence-demos/fusionpoint-issue-tracker/issues/40

API breaking changes:

  • Yes
  • No

Manual testing required:

  • Yes
  • No

Docs changes required:

  • Yes
  • No

* Updated the logic for determining insufficient balance to handle undefined tokenBalance cases.
@mithatakbulut mithatakbulut requested review from a team and 0xsequence-bot as code owners October 1, 2025 10:22
@mithatakbulut mithatakbulut self-assigned this Oct 1, 2025
@cloudflare-workers-and-pages
Copy link

Deploying web-sdk-react-example with  Cloudflare Pages  Cloudflare Pages

Latest commit: 968d3ce
Status: ✅  Deploy successful!
Preview URL: https://e9ba052c.web-sdk-react-example.pages.dev
Branch Preview URL: https://fix-paywithcryptotab-balance.web-sdk-react-example.pages.dev

View logs

@SamueleA SamueleA merged commit 7b1add5 into master Oct 3, 2025
2 checks passed
@SamueleA SamueleA deleted the fix-PayWithCryptoTab-balance-check branch October 3, 2025 15:59
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