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

Fix custom networks assets #1186

Merged
merged 6 commits into from
Dec 8, 2023
Merged

Conversation

brunobar79
Copy link
Member

Fixes BX-####
Figma link (if any):

What changed (plus any additional context for devs)

There were a few bugs with custom networks

  • Custom network assets were displayed at the bottom of the token list
  • Custom network assets were not taken into account on the Token count at the top of the list
  • Custom network assets were not taken into account on the Total Balance at the top of the list

Screen recordings / screenshots

Ex. with Anvil as a custom RPC
Screen Shot 2023-12-07 at 4 48 49 PM

What to test

Copy link

github-actions bot commented Dec 7, 2023

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

import { useCurrentCurrencyStore } from '~/core/state';
import { convertAmountToNativeDisplay } from '~/core/utils/numbers';
import { add, convertAmountToNativeDisplay } from '~/core/utils/numbers';

export function useUserAssetsBalance() {
const { address } = useAccount();
Copy link
Contributor

Choose a reason for hiding this comment

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

wanna make this useCurrentAddressStore since where here?

Comment on lines +42 to +43
totalAssetsBalanceKnownNetworks as string,
totalAssetsBalanceCustomNetworks as string,
Copy link
Contributor

Choose a reason for hiding this comment

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

won't add break if one of these are undefined?

Copy link
Member Author

Choose a reason for hiding this comment

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

The selector returns '0' by default so we're good

Copy link

github-actions bot commented Dec 8, 2023

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

Copy link
Member

@derHowie derHowie left a comment

Choose a reason for hiding this comment

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

👍

@brunobar79 brunobar79 merged commit df8af77 into master Dec 8, 2023
4 checks passed
@brunobar79 brunobar79 deleted the @bruno/fix-custom-networks-assets branch December 8, 2023 18:31
Copy link

github-actions bot commented Dec 8, 2023

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

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