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 remote registry API #1472

Merged
merged 2 commits into from
Jul 13, 2024
Merged

Use remote registry API #1472

merged 2 commits into from
Jul 13, 2024

Conversation

grod220
Copy link
Collaborator

@grod220 grod220 commented Jul 12, 2024

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.

Copy link

changeset-bot bot commented Jul 12, 2024

🦋 Changeset detected

Latest commit: 056153a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@repo/ui Major
@penumbra-zone/storage Minor
minifront Minor
node-status Patch
@penumbra-zone/services Major

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;
Copy link
Collaborator Author

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',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Typo fix

@grod220 grod220 requested a review from a team July 12, 2024 18:20
@grod220 grod220 self-assigned this Jul 12, 2024
Copy link
Contributor

@TalDerei TalDerei left a 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:

  1. by making live https calls, if the registry becomes unaccessible for some reason, would this block transaction creation?
  2. 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'>
Copy link
Contributor

Choose a reason for hiding this comment

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

think this fixes #1474?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed it does 👍

@grod220
Copy link
Collaborator Author

grod220 commented Jul 13, 2024

by making live https calls, if the registry becomes unaccessible for some reason, would this block transaction creation?

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.

what's the frequency of these remote registry network requests?

Once during service worker instantiation and once on the ibc page

@grod220 grod220 merged commit 3b7a289 into main Jul 13, 2024
6 checks passed
@grod220 grod220 deleted the async-registry branch July 13, 2024 06:44
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.

2 participants