Changeset View
Changeset View
Standalone View
Standalone View
cashtab/src/components/Receive/Receive.tsx
| // Copyright (c) 2024-2026 The Bitcoin developers | // Copyright (c) 2024-2026 The Bitcoin developers | ||||
| // Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
| import React, { useState, useContext, useEffect } from 'react'; | import React, { useState, useContext, useEffect } from 'react'; | ||||
| import { WalletContext, isWalletContextLoaded } from 'wallet/context'; | import { WalletContext, isWalletContextLoaded } from 'wallet/context'; | ||||
| import { QRCode } from 'components/Receive/QRCode'; | import { QRCode } from 'components/Receive/QRCode'; | ||||
| import useWindowDimensions from 'components/Receive/useWindowDimensions'; | import useWindowDimensions from 'components/Receive/useWindowDimensions'; | ||||
| import Switch from 'components/Common/Switch'; | import Switch from 'components/Common/Switch'; | ||||
| import ActionButtonRow from 'components/Common/ActionButtonRow'; | |||||
| import { | import { | ||||
| ReceiveCtn, | ReceiveCtn, | ||||
| ReceiveFormFlex, | ReceiveFormFlex, | ||||
| Row, | Row, | ||||
| FirmaRow, | FirmaRow, | ||||
| ReceiveInputWrapper, | ReceiveInputWrapper, | ||||
| FiatEquivalentSlot, | FiatEquivalentSlot, | ||||
| } from './styled'; | } from './styled'; | ||||
| ▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | if (!receiveFirma && fiatPrice !== null && bip21Qty !== '') { | ||||
| maximumFractionDigits: appConfig.cashDecimals, | maximumFractionDigits: appConfig.cashDecimals, | ||||
| }, | }, | ||||
| )} ${fiatCurrency.toUpperCase()}`; | )} ${fiatCurrency.toUpperCase()}`; | ||||
| } | } | ||||
| } | } | ||||
| return ( | return ( | ||||
| <ReceiveCtn title="Receive"> | <ReceiveCtn title="Receive"> | ||||
| <ActionButtonRow variant="sendReceive" activeIndex={0} /> | |||||
| <ReceiveFormFlex title="QR Code"> | <ReceiveFormFlex title="QR Code"> | ||||
| <Row> | <Row> | ||||
| <QRCode | <QRCode | ||||
| address={queryString} | address={queryString} | ||||
| size={getQrCodeWidth(width)} | size={getQrCodeWidth(width)} | ||||
| logoSizePx={width > 500 ? 48 : 24} | logoSizePx={width > 500 ? 48 : 24} | ||||
| /> | /> | ||||
| </Row> | </Row> | ||||
| ▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines | |||||