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

Add support for hiding all fiat values #1281

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Conversation

csillag
Copy link
Contributor

@csillag csillag commented Feb 21, 2024

No description provided.

Copy link

github-actions bot commented Feb 21, 2024

Deployed to Cloudflare Pages

Latest commit: a40da2a29ad642a928ff8b44807bcdd5f5d31ea9
Status:✅ Deploy successful!
Preview URL: https://955ac413.oasis-explorer.pages.dev

@csillag csillag force-pushed the csillag/support-hiding-all-fiat branch from f4e5697 to 591b37e Compare February 21, 2024 09:41
@csillag csillag marked this pull request as ready for review February 21, 2024 09:43
src/app/utils/faucet-links.ts Outdated Show resolved Hide resolved
src/config.ts Outdated Show resolved Hide resolved
src/app/pages/ParatimeDashboardPage/ParaTimeSnapshot.tsx Outdated Show resolved Hide resolved
@csillag csillag force-pushed the csillag/support-hiding-all-fiat branch 2 times, most recently from c843880 to d7f9ba5 Compare February 21, 2024 11:28
@csillag csillag requested a review from buberdds February 21, 2024 11:29
.env.production Outdated Show resolved Hide resolved
src/global.d.ts Outdated Show resolved Hide resolved
@csillag csillag force-pushed the csillag/support-hiding-all-fiat branch from d7f9ba5 to cf22b94 Compare February 21, 2024 11:32
@csillag csillag requested a review from buberdds February 21, 2024 11:33
@csillag csillag force-pushed the csillag/support-hiding-all-fiat branch from cf22b94 to a40da2a Compare February 21, 2024 11:34
@csillag csillag merged commit 6649ac0 into master Feb 21, 2024
8 checks passed
@csillag csillag deleted the csillag/support-hiding-all-fiat branch February 21, 2024 11:37
@@ -1,4 +1,4 @@
const validProtocols = ['http:', 'https:', 'ftp:', 'ipfs:', 'data:']
const validProtocols = ['http:', 'https:', 'ftp:', 'ipfs:', 'data:', 'mailto:']
Copy link
Member

Choose a reason for hiding this comment

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

This is dangerous oasisprotocol/wallet#228

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, but to frame this properly, currently the only place we are using mailto links are the faucet links, which are hardwired in the code.

Maybe we should add this as an exception for the faucet link only, and not in the general frunction?

Copy link
Member

Choose a reason for hiding this comment

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

Right, but to frame this properly, currently the only place we are using mailto links are the faucet links, which are hardwired in the code.

no, it was ensuring safety of validator logos and NFT links too

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should add this as an exception for the faucet link only, and not in the general frunction?

sure, we can consider all our external links as safe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in #1285.

@@ -53,7 +53,7 @@ export const ParaTimeSnapshot: FC<{ scope: SearchScope }> = ({ scope }) => {
<Nodes scope={scope} />
</StyledGrid>
<StyledGrid item xs={22} md={5}>
{!mainToken.free && <TokenPriceCard token={mainToken} />}
{showFiatValues && !mainToken.free && <TokenPriceCard token={mainToken} />}
Copy link
Member

Choose a reason for hiding this comment

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

what non-free token are we hiding now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Pontus-X guys don't want to see any fiat values anywhere in their version, not even the price card. So, in their deployment, showFiatValue will be set to false via .env, and so the token price card (for EUROe) will be hidden.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In our version, including the current master branch, on the PontusX paratime dashboard, we can see the current price of EUROe.

@csillag csillag mentioned this pull request Feb 21, 2024
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.

3 participants