diff --git a/web/cashtab/src/components/Common/QRCode.js b/web/cashtab/src/components/Common/QRCode.js
--- a/web/cashtab/src/components/Common/QRCode.js
+++ b/web/cashtab/src/components/Common/QRCode.js
@@ -6,17 +6,17 @@
import { Event } from 'utils/GoogleAnalytics';
import { convertToEcashPrefix } from 'utils/cashMethods';
import CopyToClipboard from './CopyToClipboard';
+
export const StyledRawQRCode = styled(RawQRCode)`
cursor: pointer;
border-radius: 10px;
background: ${props => props.theme.qr.background};
- margin-bottom: 10px;
+ margin: 24px;
path:first-child {
fill: ${props => props.theme.qr.background};
}
:hover {
- border-color: ${({ xec = 0, ...props }) =>
- xec === 1 ? props.theme.eCashBlue : props.theme.eCashPurple};
+ border-color: ${props => props.theme.qr.eCashBlue};
}
@media (max-width: 768px) {
border-radius: 18px;
@@ -30,11 +30,9 @@
font-weight: bold;
width: 100%;
text-align: center;
- background-color: ${({ xec = 0, ...props }) =>
- xec === 1 ? props.theme.eCashBlue : props.theme.eCashPurple};
+ background-color: ${props => props.theme.eCashBlue};
border: 1px solid;
- border-color: ${({ xec = 0, ...props }) =>
- xec === 1 ? props.theme.eCashBlue : props.theme.eCashPurple};
+ border-color: ${props => props.theme.eCashBlue};
color: ${props => props.theme.contrast};
position: absolute;
top: 65px;
@@ -47,8 +45,7 @@
const PrefixLabel = styled.span`
text-align: right;
font-weight: bold;
- color: ${({ xec = 0, ...props }) =>
- xec === 1 ? props.theme.eCashBlue : props.theme.eCashPurple};
+ color: ${props => props.theme.eCashBlue};
@media (max-width: 768px) {
font-size: 12px;
}
@@ -85,7 +82,7 @@
text-align: center;
cursor: pointer;
margin-bottom: 10px;
- padding: 6px 0;
+ padding: 0;
font-family: 'Roboto Mono', monospace;
border-radius: 5px;
-webkit-touch-callout: none;
@@ -133,12 +130,7 @@
}
`;
-export const QRCode = ({
- address,
- isCashAddress,
- size = 210,
- onClick = () => null,
-}) => {
+export const QRCode = ({ address, size = 210, onClick = () => null }) => {
address = address ? convertToEcashPrefix(address) : '';
const [visible, setVisible] = useState(false);
@@ -162,11 +154,8 @@
// Event.("Category", "Action", "Label")
// xec or etoken?
let eventLabel = currency.ticker;
- if (address && !isCashAddress) {
- eventLabel = currency.tokenTicker;
- // Event('Category', 'Action', 'Label')
- Event('Wallet', 'Copy Address', eventLabel);
- }
+
+ Event('Wallet', 'Copy Address', eventLabel);
setVisible(true);
setTimeout(() => {
@@ -185,10 +174,7 @@
onCopy={handleOnCopy}
>
-
+
Copied
{address}
@@ -197,14 +183,10 @@
id="borderedQRCode"
value={address || ''}
size={size}
- xec={address && isCashAddress ? 1 : 0}
renderAs={'svg'}
includeMargin
imageSettings={{
- src:
- address && isCashAddress
- ? currency.logo
- : currency.tokenLogo,
+ src: currency.logo,
x: null,
y: null,
height: 24,
@@ -222,7 +204,7 @@
spellCheck="false"
type="text"
/>
-
+
{address.slice(0, prefixLength)}
@@ -248,7 +230,6 @@
QRCode.propTypes = {
address: PropTypes.string,
- isCashAddress: PropTypes.bool,
size: PropTypes.number,
onClick: PropTypes.func,
};
diff --git a/web/cashtab/src/components/Receive/Receive.js b/web/cashtab/src/components/Receive/Receive.js
--- a/web/cashtab/src/components/Receive/Receive.js
+++ b/web/cashtab/src/components/Receive/Receive.js
@@ -21,43 +21,6 @@
}
`;
-export const SwitchBtnCtn = styled.div`
- display: flex;
- align-items: center;
- justify-content: center;
- align-content: space-between;
- margin-bottom: 15px;
- .nonactiveBtn {
- color: ${props => props.theme.walletBackground};
- background: ${props => props.theme.contrast} !important;
- opacity: 0.7;
- box-shadow: none !important;
- }
- .slpActive {
- background: ${props => props.theme.eCashPurple} !important;
- }
-`;
-
-export const SwitchBtn = styled.div`
- font-weight: bold;
- display: inline-block;
- cursor: pointer;
- color: ${props => props.theme.switchButtonActiveText};
- font-size: 14px;
- padding: 6px 0;
- width: 100px;
- margin: 0 1px;
- text-decoration: none;
- background: ${props => props.theme.eCashBlue};
- user-select: none;
- :first-child {
- border-radius: 100px 0 0 100px;
- }
- :nth-child(2) {
- border-radius: 0 100px 100px 0;
- }
-`;
-
const ReceiveWithWalletPresent = ({
wallet,
cashtabSettings,
@@ -65,10 +28,6 @@
fiatPrice,
changeCashtabSettings,
}) => {
- const [isCashAddress, setIsCashAddress] = React.useState(true);
- const handleChangeAddress = () => {
- setIsCashAddress(!isCashAddress);
- };
return (
@@ -99,51 +58,25 @@
>
)}
- Receive {isCashAddress ? 'XEC' : 'eToken'}
{wallet && ((wallet.Path245 && wallet.Path145) || wallet.Path1899) && (
<>
{wallet.Path1899 ? (
<>
>
) : (
<>
>
)}
>
)}
-
-
- handleChangeAddress()}
- className={isCashAddress ? null : 'nonactiveBtn'}
- >
- {currency.ticker}
-
- handleChangeAddress()}
- className={isCashAddress ? 'nonactiveBtn' : 'slpActive'}
- >
- {currency.tokenTicker}
-
-
);
};
diff --git a/web/cashtab/src/components/Receive/__tests__/__snapshots__/Receive.test.js.snap b/web/cashtab/src/components/Receive/__tests__/__snapshots__/Receive.test.js.snap
--- a/web/cashtab/src/components/Receive/__tests__/__snapshots__/Receive.test.js.snap
+++ b/web/cashtab/src/components/Receive/__tests__/__snapshots__/Receive.test.js.snap
@@ -61,10 +61,6 @@
Deposit some funds to use this feature
-
- Receive
- XEC
-
@@ -107,13 +103,12 @@
-
`;
@@ -241,10 +220,6 @@
Deposit some funds to use this feature
-
- Receive
- XEC
-
@@ -287,13 +262,12 @@
-
`;
@@ -426,10 +384,6 @@
-
- Receive
- XEC
-
@@ -472,13 +426,12 @@
-
`;
@@ -606,10 +543,6 @@
Deposit some funds to use this feature
-
- Receive
- XEC
-
@@ -652,13 +585,12 @@
-
`;