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

use custom networks assets #1120

Merged
merged 13 commits into from
Nov 8, 2023
Merged

Conversation

estebanmino
Copy link
Member

@estebanmino estebanmino commented Nov 7, 2023

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

What changed (plus any additional context for devs)

  • adding assets by address with auto fill symbol, decimals and asset name
  • custom network assets with appear in assets tab

Screen recordings / screenshots

https://www.loom.com/share/6032cdd75e674883b75640772ce7b92e

What to test

@estebanmino estebanmino changed the base branch from master to @esteban/connect-custom-networks November 7, 2023 17:48
@estebanmino estebanmino marked this pull request as ready for review November 7, 2023 17:58
@estebanmino estebanmino force-pushed the @esteban/connect-custom-networks-assets branch from 7c182c8 to 1e96447 Compare November 7, 2023 18:09
Copy link

github-actions bot commented Nov 7, 2023

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

Base automatically changed from @esteban/connect-custom-networks to master November 7, 2023 19:07
Copy link
Member

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

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

🚀 🚀 🚀

// parsedAsset: ParsedUserAsset;
assetAddress: Address;
currentAddress: Address;
// currency: SupportedCurrencyKey;
Copy link
Member

Choose a reason for hiding this comment

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

why are all these commented?

Copy link
Member Author

Choose a reason for hiding this comment

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

will remove, the method started with that and then i removed it

@estebanmino estebanmino force-pushed the @esteban/connect-custom-networks-assets branch from 1e96447 to 08a2372 Compare November 8, 2023 15:40
Copy link

github-actions bot commented Nov 8, 2023

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

Comment on lines 76 to 93
useEffect(() => {
const fetchMetadata = async () => {
if (!!chainId && isValidAddress(asset.address)) {
const provider = getProvider({ chainId: Number(chainId) });
const metadata = await getAssetMetadata({
address: asset.address,
provider,
});
setAsset({
address: asset.address,
symbol: metadata.symbol || INITIAL_ASSET.symbol,
decimals: metadata.decimals || INITIAL_ASSET.decimals,
name: metadata.name || INITIAL_ASSET.name,
});
}
};
fetchMetadata();
}, [asset.address, chainId]);
Copy link
Contributor

Choose a reason for hiding this comment

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

why not a useQuery?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh yes, will use useQuery

Copy link
Member Author

Choose a reason for hiding this comment

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

@estebanmino estebanmino force-pushed the @esteban/connect-custom-networks-assets branch from 08a2372 to c0db1ce Compare November 8, 2023 18:19
Copy link

github-actions bot commented Nov 8, 2023

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

Copy link

github-actions bot commented Nov 8, 2023

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

Copy link

github-actions bot commented Nov 8, 2023

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

Copy link

github-actions bot commented Nov 8, 2023

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

Copy link

github-actions bot commented Nov 8, 2023

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

@brunobar79 brunobar79 merged commit 568b64c into master Nov 8, 2023
15 checks passed
@brunobar79 brunobar79 deleted the @esteban/connect-custom-networks-assets branch November 8, 2023 20:17
BrodyHughes pushed a commit that referenced this pull request Nov 15, 2023
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