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

feat(gov): Format and display abi inputs on a proposal, show raw switch #316

Open
wants to merge 21 commits into
base: v2
Choose a base branch
from

Conversation

thevolcanomanishere
Copy link
Collaborator

@thevolcanomanishere thevolcanomanishere commented Jan 7, 2025

Special formatting applied to:

  • setVaultWhitelistedStatus
  • whitelistIncentiveToken

Features:

  • Generic function for formatting any proposal action when a verified ABI is available.
  • "Show Raw" / "Show Decoded" button to switch between the different views.

Screenshot 2025-01-09 at 13 20 26
Screenshot 2025-01-09 at 13 03 48

Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v2-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 13, 2025 3:43pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
bartio-dex ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:43pm
bartio-honey ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:43pm
bartio-lend ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:43pm
bartio-perps ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:43pm
bartio-station ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:43pm
berajs-docs ⬜️ Ignored (Inspect) Jan 13, 2025 3:43pm
storybook ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:43pm
v2-honey ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:43pm

@thevolcanomanishere thevolcanomanishere marked this pull request as ready for review January 9, 2025 13:08
Copy link
Contributor

@bearpong bearpong left a comment

Choose a reason for hiding this comment

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

Well done, it's mostly UI feedbacks

Please let's add the token symbol here, i also wonder what happens if the address was not a token / does not have decimals
image

Please align this
image

pls wrap each item of the array with a border
image

Raw data should still use the same UI wrapper but different content inside (calldata, value, target, function maybe printed as signature )
image

Copy link
Contributor

@bearpong bearpong left a comment

Choose a reason for hiding this comment

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

<FormattedActionLine
title="Vault Address"
type="link"
value={getRewardsVaultUrl(vaultAddress)}
Copy link
Contributor

Choose a reason for hiding this comment

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

the link should be the href, not the shown value

Screenshot 2025-01-13 at 11 40 27

Comment on lines +51 to +55
<img
src={props.imageUri}
alt={String(value)}
className="w-4 h-4 rounded-full"
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use <TokenIcon /> if it's a token or GaugeIcon if it's a vault. Those components handle not-found images

image

Comment on lines +26 to +37
{parsedMetadata.data && (
<>
<FormattedActionLine
key={name}
title="Name"
type="string"
value={name}
imageUri={logoURI}
/>
<FormattedActionLine key={url} title="URL" type="link" value={url} />
</>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's disable metadata parsing for now, or just let's not render it

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