Skip to content

feat: invalidate token market info after successful swap#3514

Draft
ice-priapus wants to merge 1 commit into
masterfrom
bugfix/update_token_market_info_after_swap
Draft

feat: invalidate token market info after successful swap#3514
ice-priapus wants to merge 1 commit into
masterfrom
bugfix/update_token_market_info_after_swap

Conversation

@ice-priapus

@ice-priapus ice-priapus commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Description

invalidating the token market info after successful TC swap

Additional Notes

this should help with cases when balance info is missing for creator or content token

the issue in the task was pretty hard to reproduce, so this change is mostly a possible improvement that should help

Task ID

ION-5638

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation
  • Chore

Screenshots (if applicable)

@ice-priapus ice-priapus requested review from a team as code owners February 26, 2026 17:16
@ice-morpheus ice-morpheus enabled auto-merge (squash) February 26, 2026 17:16
@ice-priapus ice-priapus disabled auto-merge February 26, 2026 17:17
@ice-morpheus ice-morpheus force-pushed the bugfix/update_token_market_info_after_swap branch from 39fbfe8 to c7f009d Compare February 26, 2026 19:37
ref.invalidate(walletViewsDataNotifierProvider);
_invalidateUserHoldings(ref);
// Refetch market data (including position) for the token we just bought or sold.
ref.invalidate(tokenMarketInfoProvider(resolvedExternalAddress));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't btw tokenMarketInfoProvider theoretically update us about any changes via SSE subscription we have inside? Just curios 🤔

As we have both Get request & SSE subscription, but we behave here as we use only Get :)

@ice-morpheus ice-morpheus force-pushed the bugfix/update_token_market_info_after_swap branch from c7f009d to 12a0c59 Compare February 26, 2026 22:09
@ice-morpheus ice-morpheus force-pushed the bugfix/update_token_market_info_after_swap branch from 12a0c59 to 776fcdc Compare February 27, 2026 10:01
@ice-morpheus ice-morpheus force-pushed the bugfix/update_token_market_info_after_swap branch 7 times, most recently from 4d75f16 to 2f64500 Compare March 2, 2026 08:24
@ice-morpheus ice-morpheus force-pushed the bugfix/update_token_market_info_after_swap branch from 2f64500 to 51fe375 Compare March 2, 2026 10:19
@ice-priapus ice-priapus marked this pull request as draft March 2, 2026 10:31
@ice-selene ice-selene removed the 1.1.0 label Mar 2, 2026
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.

5 participants