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 asset metadata for fee estimation #1468

Merged
merged 7 commits into from
Jul 18, 2024
Merged

fix asset metadata for fee estimation #1468

merged 7 commits into from
Jul 18, 2024

Conversation

TalDerei
Copy link
Contributor

@TalDerei TalDerei commented Jul 11, 2024

references #1459

currently, the fee estimation in minifront is hardcoded to use the staking token. Instead, we reconstruct the metadata from the assetId to display the proper token asset. cc @vacekj


If the user has UM, the will display the native staking token asset

Screenshot 2024-07-11 at 7 49 36 AM

If the user doesn't have UM (simulated by setting the gasFeeToken to extractAltFee in the transaction planner service implementation), it will reconstruct the alternative fee metadata from the assetId.

Screenshot 2024-07-11 at 7 50 43 AM

Currently, the estimated fee is displaying zero since the gas prices are set to zero for that assetId.

Screenshot 2024-07-11 at 7 50 03 AM

If gas prices aren't set for a particular assetId, it will error with "GasPrices not available"

Screenshot 2024-07-11 at 7 50 35 AM

Copy link

changeset-bot bot commented Jul 11, 2024

⚠️ No Changeset found

Latest commit: ec51e8b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@TalDerei TalDerei self-assigned this Jul 11, 2024
@TalDerei TalDerei changed the title fee estimation asset metadata fix asset metadata for fee estimation Jul 11, 2024
Copy link
Member

@vacekj vacekj left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

github-actions bot commented Jul 17, 2024

Visit the preview URL for this PR (updated for commit ec51e8b):

https://penumbra-ui-preview--pr1468-fee-estimate-denom-n094myqk.web.app

(expires Wed, 24 Jul 2024 04:48:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 709d729610ef7a6369b23f1cb2b820a60cc685b1

@TalDerei
Copy link
Contributor Author

requesting additional reviews for assurance after the remote registry work was merged

@TalDerei TalDerei requested a review from a team July 17, 2024 06:01
@TalDerei TalDerei merged commit 6a41854 into main Jul 18, 2024
8 checks passed
@TalDerei TalDerei deleted the fee-estimate-denom branch July 18, 2024 15:16
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