Changeset View
Changeset View
Standalone View
Standalone View
cashtab/src/components/Receive/Receive.js
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | const getQrCodeWidth = windowWidthPx => { | ||||
return windowWidthPx - CASHTAB_MOBILE_QR_PADDING; | return windowWidthPx - CASHTAB_MOBILE_QR_PADDING; | ||||
}; | }; | ||||
return ( | return ( | ||||
<ReceiveCtn data-testid="receive-ctn"> | <ReceiveCtn data-testid="receive-ctn"> | ||||
{wallet !== false && ( | {wallet !== false && ( | ||||
<QrCodeCtn data-testid="qr-code-ctn"> | <QrCodeCtn data-testid="qr-code-ctn"> | ||||
<QRCode | <QRCode | ||||
id="borderedQRCode" | id="borderedQRCode" | ||||
address={ | address={wallet.paths.get(1899).address} | ||||
wallet.paths.find( | |||||
pathInfo => pathInfo.path === 1899, | |||||
).address | |||||
} | |||||
size={getQrCodeWidth(width)} | size={getQrCodeWidth(width)} | ||||
logoSizePx={width > 500 ? 48 : 24} | logoSizePx={width > 500 ? 48 : 24} | ||||
/> | /> | ||||
</QrCodeCtn> | </QrCodeCtn> | ||||
)} | )} | ||||
</ReceiveCtn> | </ReceiveCtn> | ||||
); | ); | ||||
}; | }; | ||||
export default Receive; | export default Receive; |