diff --git a/web/cashtab/src/components/Send/SendToken.js b/web/cashtab/src/components/Send/SendToken.js --- a/web/cashtab/src/components/Send/SendToken.js +++ b/web/cashtab/src/components/Send/SendToken.js @@ -28,6 +28,8 @@ } from '@components/Common/Notifications'; import { isValidXecAddress, isValidEtokenAddress } from '@utils/validation'; import { formatDate } from '@utils/formatting'; +import TokenIcon from '@components/Tokens/TokenIcon'; + const SendToken = ({ tokenId, jestBCH, passLoadingStatus }) => { const { wallet, apiError } = React.useContext(WalletContext); const walletState = getWalletState(wallet); @@ -288,40 +290,13 @@ name: 'value', step: 1 / 10 ** token.info.decimals, placeholder: 'Amount', - prefix: - currency.tokenIconsUrl !== '' ? ( - {`identicon - } - /> - ) : ( - {`identicon - ), + prefix: ( + + ), + suffix: token.info.tokenTicker, onChange: e => handleSlpAmountChange(e), required: true, diff --git a/web/cashtab/src/components/Send/__tests__/__snapshots__/SendToken.test.js.snap b/web/cashtab/src/components/Send/__tests__/__snapshots__/SendToken.test.js.snap --- a/web/cashtab/src/components/Send/__tests__/__snapshots__/SendToken.test.js.snap +++ b/web/cashtab/src/components/Send/__tests__/__snapshots__/SendToken.test.js.snap @@ -217,7 +217,11 @@ > + > +
+ { + return ( + + {currency.tokenIconsUrl !== '' ? ( + {`identicon + } + /> + ) : ( + {`identicon + )} + + ); +}; +TokenIcon.propTypes = { + size: PropTypes.number, + tokenId: PropTypes.string, +}; + +export default TokenIcon; diff --git a/web/cashtab/src/components/Tokens/__tests__/__snapshots__/Tokens.test.js.snap b/web/cashtab/src/components/Tokens/__tests__/__snapshots__/Tokens.test.js.snap --- a/web/cashtab/src/components/Tokens/__tests__/__snapshots__/Tokens.test.js.snap +++ b/web/cashtab/src/components/Tokens/__tests__/__snapshots__/Tokens.test.js.snap @@ -370,7 +370,7 @@ className="sc-hSdWYo tUbiI" >
{ return ( - - {currency.tokenIconsUrl !== '' ? ( - {`identicon - } - /> - ) : ( - {`identicon - )} - + {balance} {ticker} diff --git a/web/cashtab/src/components/Wallet/Tx.js b/web/cashtab/src/components/Wallet/Tx.js --- a/web/cashtab/src/components/Wallet/Tx.js +++ b/web/cashtab/src/components/Wallet/Tx.js @@ -9,10 +9,11 @@ ExclamationOutlined, } from '@ant-design/icons'; import { currency } from '@components/Common/Ticker'; -import makeBlockie from 'ethereum-blockies-base64'; -import { Img } from 'react-image'; + import { fromLegacyDecimals } from '@utils/cashMethods'; import { formatBalance, formatDate } from '@utils/formatting'; + +import TokenIcon from '@components/Tokens/TokenIcon'; const SentTx = styled(ArrowUpOutlined)` color: ${props => props.theme.secondary} !important; `; @@ -255,35 +256,10 @@ {data.tokenTx && data.tokenInfo ? ( <> - {currency.tokenIconsUrl !== '' ? ( - {`identicon - } - /> - ) : ( - {`identicon - )} + {data.outgoingTx ? ( <>