-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
custom tx fee for Stability chain (#1298)
* Stability UI customizations V1 Fixes #1273 * fix API fetch from next.js * stability config for review env * update screenshot * rollback envs for demo
- Loading branch information
Showing
15 changed files
with
171 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-31 Bytes
(100%)
ui/address/__screenshots__/AddressTxs.pw.tsx_mobile_base-view-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Skeleton, chakra } from '@chakra-ui/react'; | ||
import React from 'react'; | ||
|
||
import type { Transaction } from 'types/api/transaction'; | ||
import type { ExcludeUndefined } from 'types/utils'; | ||
|
||
import getCurrencyValue from 'lib/getCurrencyValue'; | ||
import TokenEntity from 'ui/shared/entities/token/TokenEntity'; | ||
|
||
interface Props { | ||
data: ExcludeUndefined<Transaction['stability_fee']>; | ||
isLoading?: boolean; | ||
hideUsd?: boolean; | ||
accuracy?: number; | ||
className?: string; | ||
} | ||
|
||
const TxFeeStability = ({ data, isLoading, hideUsd, accuracy, className }: Props) => { | ||
|
||
const { valueStr, usd } = getCurrencyValue({ | ||
value: data.total_fee, | ||
exchangeRate: data.token.exchange_rate, | ||
decimals: data.token.decimals, | ||
accuracy, | ||
}); | ||
|
||
return ( | ||
<Skeleton whiteSpace="pre" isLoaded={ !isLoading } display="flex" className={ className }> | ||
<span>{ valueStr } </span> | ||
<TokenEntity token={ data.token } noIcon noCopy onlySymbol w="auto"/> | ||
{ usd && !hideUsd && <chakra.span color="text_secondary"> (${ usd })</chakra.span> } | ||
</Skeleton> | ||
); | ||
}; | ||
|
||
export default React.memo(chakra(TxFeeStability)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+79.3 KB
ui/tx/__screenshots__/TxDetails.pw.tsx_default_stability-customization-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+5 Bytes
(100%)
...xs/__screenshots__/TxsListItem.pw.tsx_dark-color-mode_base-view-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
ui/txs/__screenshots__/TxsListItem.pw.tsx_default_base-view-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-6 Bytes
(100%)
ui/txs/__screenshots__/TxsListItem.pw.tsx_default_with-base-address-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.