-
Notifications
You must be signed in to change notification settings - Fork 9
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add support for hiding all fiat values |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,9 @@ const faucetLinks: Partial<Record<Network, Partial<Record<Layer, Partial<Record< | |
[Layer.consensus]: { [Ticker.TEST]: testnetFaucetUrl }, | ||
[Layer.emerald]: { [Ticker.TEST]: `${faucetParaTimeBaseUrl}emerald` }, | ||
[Layer.sapphire]: { [Ticker.TEST]: `${faucetParaTimeBaseUrl}sapphire` }, | ||
[Layer.pontusx]: { [Ticker.TEST]: 'mailto:[email protected]?subject=tokens' }, | ||
[Layer.pontusx]: { | ||
[Ticker.EUROe]: `mailto:[email protected]?subject=${encodeURIComponent('Request test tokens')}`, | ||
}, | ||
[Layer.cipher]: { [Ticker.TEST]: `${faucetParaTimeBaseUrl}cipher` }, | ||
}, | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const validProtocols = ['http:', 'https:', 'ftp:', 'ipfs:', 'data:'] | ||
const validProtocols = ['http:', 'https:', 'ftp:', 'ipfs:', 'data:', 'mailto:'] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is dangerous oasisprotocol/wallet#228 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
no, it was ensuring safety of validator logos and NFT links too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
sure, we can consider all our external links as safe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in #1285. |
||
export const hasValidProtocol = (url: string | undefined): boolean => { | ||
if (!url) { | ||
|
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.
what non-free token are we hiding now?
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.
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 tofalse
via.env
, and so the token price card (for EUROe) will be hidden.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.
In our version, including the current master branch, on the PontusX paratime dashboard, we can see the current price of
EUROe
.