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

[BX-919] Consolidated Asset Balances #827

Merged
merged 5 commits into from
Aug 2, 2023

Conversation

derHowie
Copy link
Member

@derHowie derHowie commented Aug 1, 2023

What changed (plus any additional context for devs)

  • remove addys client v2
  • remove loop utilizing userAssetsByChain to populate user asset balances dictionary
  • leverage new consolidated addys user balance request
  • tweak user asset response data xform
  • implement fallback/retry requests per chain based on new addys meta.chain_ids_with_errors

Screen recordings / screenshots

Screen Shot 2023-08-01 at 9 33 55 PM

What to test

Make sure user assets behave as usual. You can test the fallback/retry flow by hardcoding chainIdsWithErrorsInResponse to an array of supported chain ids.

Final checklist

  • I have tested my changes in a LavaMoat bundle (yarn build).
  • I have tested my changes in Chrome & Brave.
  • If your changes are visual, did you check both the light and dark themes?

@derHowie derHowie changed the title finish retry logic Consolidated Asset Balances Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-581cfbc6f0b8477a1b501721de22645ea7ec9de1.zip

@derHowie derHowie changed the title Consolidated Asset Balances [BX-919] Consolidated Asset Balances Aug 2, 2023
@linear
Copy link

linear bot commented Aug 2, 2023

BX-919 Consolidated Asset Balances

  • remove addys client v2
  • remove loop utilizing userAssetsByChain to populate user asset balances dictionary
  • leverage new consolidated addys user balance request
  • tweak user asset response data xform
  • implement fallback/retry requests per chain based on new addys meta.chain_ids_with_errors

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-cdff45114876343a8cf375aa34a73c8d0645466b.zip

@derHowie derHowie marked this pull request as ready for review August 2, 2023 02:36
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Here's the packed extension for this build:
rainbowbx-240ab5eefc781176cd6ccc2fb268c7d91cf820ff.zip

cachedUserAssets[values[0].chainId] = parsedAssets;
}
}
queryClient.setQueryData(
Copy link
Contributor

Choose a reason for hiding this comment

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

i see this one is being called inside userAssetsQueryFunction with chainIdsWithErrorsInResponse as chainIds

i'm trying to understand why we save the retry data in cache if there's any chain with failures instead of returning it from userAssetsQueryFunction

i'm thinking there's a retry time in which this method would be called again but we won't be returning the data on time (we would be doing it the next time this method is called), and even we wouldn't be returning this retry cached data at all if addysHttp.get never fails since cached data is just a fallback

Copy link
Contributor

Choose a reason for hiding this comment

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

chatted via slack and seems like is not an isssue 👌

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Here's the packed extension for this build:
rainbowbx-0589e2f4887ab3fdf307ea31b014c92e83f7e8b3.zip

Copy link
Contributor

@estebanmino estebanmino left a comment

Choose a reason for hiding this comment

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

⚖️ ⚖️

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-aecb6216fa74d12aae9e2d0e8bddc0e8da0f6549.zip

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Here's the packed extension for this build:
rainbowbx-aecb6216fa74d12aae9e2d0e8bddc0e8da0f6549.zip

@derHowie derHowie merged commit ce942da into @chris/consolidatedTx Aug 2, 2023
10 checks passed
@derHowie derHowie deleted the @chris/consolidatedBalances branch August 2, 2023 22:36
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