add sweepAll for Monero send-all; add copy buttons for accounts/subaddresses

This commit is contained in:
2026-05-26 13:09:18 +08:00
parent 915f6f36f6
commit 34602a4bfa
7 changed files with 113 additions and 10 deletions
@@ -293,6 +293,21 @@ export const MoneroWallet = () => {
return result
}
const sendAll = async (
address: string,
priority?: number,
accountIndex?: number,
): Promise<MoneroSendResult> => {
if (!electrobun.rpc) throw new Error('RPC not available')
const result = await electrobun.rpc.request.moneroSweepAll({
address,
priority,
accountIndex,
})
await refresh()
return result
}
return {
get accountType() {
return accountType
@@ -396,6 +411,7 @@ export const MoneroWallet = () => {
openWallet,
refresh,
send,
sendAll,
}
}