diff --git a/web/cashtab/src/components/Send/Send.js b/web/cashtab/src/components/Send/Send.js --- a/web/cashtab/src/components/Send/Send.js +++ b/web/cashtab/src/components/Send/Send.js @@ -61,6 +61,7 @@ import styled from 'styled-components'; import { CopyToClipboard } from 'react-copy-to-clipboard'; import WalletLabel from 'components/Common/WalletLabel.js'; +import { ThemedCopySolid } from 'components/Common/CustomIcons'; const { TextArea } = Input; @@ -100,6 +101,21 @@ margin-bottom: 0; `; +const AddressCopyCtn = styled.div` + display: flex; + align-items: center; + gap: 0.5rem; + + svg { + height: 30px; + width: 30px; + &:hover { + fill: ${props => props.theme.eCashBlue}; + cursor: pointer; + } + } +`; + // Note jestBCH is only used for unit tests; BCHJS must be mocked for jest const SendBCH = ({ jestBCH, passLoadingStatus }) => { // use balance parameters from wallet.state object and not legacy balances parameter from walletState, if user has migrated wallet @@ -1126,19 +1142,46 @@ Address: - + {wallet && + wallet.Path1899 && + wallet.Path1899.cashAddress && ( + + +
{ + const convertedAddress = + convertToEcashPrefix( + wallet.Path1899 + .cashAddress, + ); + navigator.clipboard.writeText( + convertedAddress, + ); + generalNotification( + convertedAddress + + ' copied to clipboard', + 'Copied', + 'Success', + ); + }} + > + +
+
+ )}
setShowConfirmMsgToSign(true)}