mirror of
https://github.com/zhigang1992/wallet.git
synced 2026-01-12 17:53:19 +08:00
chore: add modal for BTC Stamps QR receive
This commit is contained in:
@@ -11,7 +11,11 @@ import { useNativeSegwitAccountIndexAddressIndexZero } from '@app/store/accounts
|
||||
import { ReceiveBtcModalWarning } from './components/receive-btc-warning';
|
||||
import { ReceiveTokensLayout } from './components/receive-tokens.layout';
|
||||
|
||||
export function ReceiveBtcModal() {
|
||||
interface ReceiveBtcModalType {
|
||||
type?: 'btc' | 'btc-stamp';
|
||||
}
|
||||
|
||||
export function ReceiveBtcModal({ type = 'btc' }: ReceiveBtcModalType) {
|
||||
const analytics = useAnalytics();
|
||||
const { state } = useLocation();
|
||||
|
||||
@@ -33,7 +37,7 @@ export function ReceiveBtcModal() {
|
||||
<ReceiveTokensLayout
|
||||
address={btcAddress}
|
||||
onCopyAddressToClipboard={copyToClipboard}
|
||||
title="Bitcoin address"
|
||||
title={type === 'btc-stamp' ? 'Bitcoin Stamps address' : 'Bitcoin address'}
|
||||
warning={<ReceiveBtcModalWarning accountIndex={accountIndex} />}
|
||||
hasSubtitle={false}
|
||||
/>
|
||||
|
||||
@@ -87,6 +87,7 @@ export function ReceiveModal({ type = 'full' }: ReceiveModalProps) {
|
||||
<ReceiveItem
|
||||
address={btcAddressNativeSegwit}
|
||||
icon={<BtcStampsIcon />}
|
||||
onClickQrCode={() => navigate(RouteUrls.ReceiveBtcStamp)}
|
||||
onCopyAddress={() => copyToClipboard(onCopyBtc, 'select_stamp_to_add_new_collectible')}
|
||||
title="Bitcoin Stamp"
|
||||
/>
|
||||
|
||||
@@ -222,6 +222,7 @@ function useAppRoutes() {
|
||||
/>
|
||||
<Route path={RouteUrls.ReceiveStx} element={<ReceiveStxModal />} />
|
||||
<Route path={RouteUrls.ReceiveBtc} element={<ReceiveBtcModal />} />
|
||||
<Route path={RouteUrls.ReceiveBtcStamp} element={<ReceiveBtcModal type="btc-stamp" />} />
|
||||
|
||||
<Route path={RouteUrls.SendOrdinalInscription} element={<SendInscriptionContainer />}>
|
||||
<Route index element={<SendInscriptionForm />} />
|
||||
|
||||
@@ -40,6 +40,7 @@ export enum RouteUrls {
|
||||
ReceiveCollectibleOrdinal = '/receive/collectible/ordinal',
|
||||
ReceiveStx = '/receive/stx',
|
||||
ReceiveBtc = '/receive/btc',
|
||||
ReceiveBtcStamp = '/receive/btc-stamp',
|
||||
Send = '/send-transaction',
|
||||
ViewSecretKey = '/view-secret-key',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user