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

[TS SDK] Add support to filter on coin data query #9773

Closed
wants to merge 1 commit into from
Closed

Conversation

0xmaayan
Copy link
Contributor

Description

This PR adds support for the user to filter on the coin data query as some products might want to exclude secondary stores data until better ecosystem support.
#9747 (comment)

Test Plan

@0xmaayan 0xmaayan requested review from xbtmatt and movekevin August 25, 2023 01:44
@0xmaayan 0xmaayan changed the title [TS SDK] Add support to filter on fungible asset query [TS SDK] Add support to filter on coin data query Aug 25, 2023
@@ -830,19 +831,17 @@ export class IndexerClient {
extraArgs?: {
options?: IndexerPaginationArgs;
orderBy?: IndexerSortBy<Current_Fungible_Asset_Balances_Order_By>[];
filter?: [Current_Fungible_Asset_Balances_Bool_Exp];
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to default to filtering out secondary stores. Otherwise the fungible_asset_client also needs to be rewritten to allow transferring/checking balances from secondary stores. Currently no operations regarding secondary stores are supported. This means developers can run into a very weird experience here:

  1. They call check getAccountCoinsData, which returns secondary stores
  2. They sum up the balances and display to the users which now show balances > what they have in primary stores
  3. They try to send > what they have in primary store => Errors
  4. Everyone is now confused. Users are confused that they have less money than what wallets show them. Developers are confused why things error out

@github-actions
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Oct 10, 2023
@github-actions github-actions bot closed this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants