-
Notifications
You must be signed in to change notification settings - Fork 17
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 remote registry API #1472
Use remote registry API #1472
Conversation
🦋 Changeset detectedLatest commit: 056153a The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
]; | ||
|
||
const getMetadata: MetadataFetchFn = async ({ assetId }) => { | ||
const feeAssetId = assetId ? assetId : new ChainRegistryClient().bundled.globals().stakingAssetId; |
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.
Given stakingAssetId
should never change, in this PR I often grab this from the bundle
|
||
export enum TxDetailsTab { | ||
PUBLIC = 'public', | ||
PRIVATE = 'private', | ||
RECIEVER = 'reciever', | ||
RECEIVER = 'receiver', |
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.
Typo fix
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.
few general questions here:
- by making live https calls, if the registry becomes unaccessible for some reason, would this block transaction creation?
- what's the frequency of these remote registry network requests?
<ActionViewComponent av={av} feeValueView={feeValueView} key={i} /> | ||
))} | ||
</ViewSection> | ||
<ViewSection heading='Parameters'> | ||
<ViewBox | ||
label='Transaction Fee' | ||
visibleContent={ | ||
<div className='font-mono'> | ||
<div className='flex items-center gap-2'> |
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.
think this fixes #1474?
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.
Indeed it does 👍
No tx blocking would occur. During say a tx approval, it requests metadata from the local view service. If for some reason the service worker wasn't able to reach github, the registry may not be populated and the fee token would simply display as an unknown asset. The ibc page, however, does rely upon the remote registry to know what ibc channels are available.
Once during service worker instantiation and once on the ibc page |
Since prax-wallet/registry#29 minifront has been using the bundled registry in the npm package. While this has given us consistency of schema and non-reliance upon github, users are feeling the pains of not having a dynamically updated registry source (users not seeing updated icons, using ibc connections would have to wait on chrome store review, etc).
This PR utilizes v10 of the registry which has remote methods that call github for the latest registry: prax-wallet/registry#57.