add sweepAll for Monero send-all; add copy buttons for accounts/subaddresses
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
getDaemonHeight as walletGetDaemonHeight,
|
||||
getFeeEstimate as walletGetFeeEstimate,
|
||||
transfer as walletTransfer,
|
||||
sweepAll as walletSweepAll,
|
||||
isWalletOpen,
|
||||
isConnected,
|
||||
} from '../../lib/monero'
|
||||
@@ -231,6 +232,30 @@ export function createMoneroHandlers(state: {
|
||||
console.log('[rpc] moneroTransfer complete:', result.txHash)
|
||||
return result
|
||||
},
|
||||
moneroSweepAll: async ({
|
||||
address,
|
||||
priority,
|
||||
accountIndex,
|
||||
}: {
|
||||
address: string
|
||||
priority?: number
|
||||
accountIndex?: number
|
||||
}) => {
|
||||
console.log('[rpc] moneroSweepAll:', {
|
||||
address,
|
||||
priority,
|
||||
})
|
||||
if (!state.manager)
|
||||
throw new Error('Monero wallet RPC not started')
|
||||
const result = await walletSweepAll(
|
||||
state.manager,
|
||||
address,
|
||||
priority ?? 0,
|
||||
accountIndex ?? 0,
|
||||
)
|
||||
console.log('[rpc] moneroSweepAll complete:', result.txHash)
|
||||
return result
|
||||
},
|
||||
moneroGetTransferDetails: async ({ txid }: { txid: string }) => {
|
||||
console.log('[rpc] moneroGetTransferDetails:', txid)
|
||||
if (!state.manager)
|
||||
|
||||
Reference in New Issue
Block a user