-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
7c182c8
to
1e96447
Compare
Here's the packed extension for this build: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 🚀 🚀
src/core/utils/assets.ts
Outdated
// parsedAsset: ParsedUserAsset; | ||
assetAddress: Address; | ||
currentAddress: Address; | ||
// currency: SupportedCurrencyKey; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
1e96447
to
08a2372
Compare
Here's the packed extension for this build: |
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]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not a useQuery
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
08a2372
to
c0db1ce
Compare
Here's the packed extension for this build: |
Here's the packed extension for this build: |
Here's the packed extension for this build: |
Here's the packed extension for this build: |
Here's the packed extension for this build: |
Fixes BX-####
Figma link (if any):
What changed (plus any additional context for devs)
Screen recordings / screenshots
https://www.loom.com/share/6032cdd75e674883b75640772ce7b92e
What to test