mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-06-24 14:50:38 -04:00
Initial commit
This commit is contained in:
commit
bc188870af
162 changed files with 13820 additions and 0 deletions
27
src/renderer/components/modal/wallet/WithdrawStatePage.tsx
Normal file
27
src/renderer/components/modal/wallet/WithdrawStatePage.tsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
import { useAppSelector, useIsRpcEndpointBusy } from 'store/hooks';
|
||||
import { RpcMethod } from 'models/rpcModel';
|
||||
import AddressInputPage from './pages/AddressInputPage';
|
||||
import InitiatedPage from './pages/InitiatedPage';
|
||||
import BtcTxInMempoolPageContent from './pages/BitcoinWithdrawTxInMempoolPage';
|
||||
|
||||
export default function WithdrawStatePage({
|
||||
onCancel,
|
||||
}: {
|
||||
onCancel: () => void;
|
||||
}) {
|
||||
const isRpcEndpointBusy = useIsRpcEndpointBusy(RpcMethod.WITHDRAW_BTC);
|
||||
const withdrawTxId = useAppSelector((state) => state.rpc.state.withdrawTxId);
|
||||
|
||||
if (withdrawTxId !== null) {
|
||||
return (
|
||||
<BtcTxInMempoolPageContent
|
||||
withdrawTxId={withdrawTxId}
|
||||
onCancel={onCancel}
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (isRpcEndpointBusy) {
|
||||
return <InitiatedPage onCancel={onCancel} />;
|
||||
}
|
||||
return <AddressInputPage onCancel={onCancel} />;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue