mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-21 15:38:59 +03:00
%delete-wallet support
This commit is contained in:
parent
685b9fefee
commit
4b61c30e55
@ -141,8 +141,16 @@
|
||||
::
|
||||
%set-default-wallet
|
||||
=/ xs=(list xpub) scry-scanned
|
||||
?. (gth (lent xs) 0) `state
|
||||
`state(def-wallet `(snag 0 xs))
|
||||
=/ i=(unit @) (find ~[xpub.comm] xs)
|
||||
?~ i `state
|
||||
`state(def-wallet `(snag u.i xs))
|
||||
::
|
||||
%delete-wallet
|
||||
:- ~[(poke-store [%delete-wallet xpub.comm])]
|
||||
?~ def-wallet state
|
||||
?. =(u.def-wallet xpub.comm) state
|
||||
state(def-wallet ~)
|
||||
:: TODO if wallet is xpub.comm, clear
|
||||
::
|
||||
:: %req-pay-address
|
||||
:: overwrites any payment being built currently
|
||||
|
@ -111,6 +111,10 @@
|
||||
=/ w=walt (from-xpub +.act)
|
||||
=. walts (~(put by walts) xpub.act w)
|
||||
(init-batches xpub.act (dec max-gap.w))
|
||||
::
|
||||
%delete-wallet
|
||||
`state(walts (~(del by walts) xpub.act))
|
||||
::
|
||||
:: TODO
|
||||
:: if blank address we're watching gets a value
|
||||
:: "blank" = unused
|
||||
|
@ -28,7 +28,8 @@
|
||||
::
|
||||
+$ command
|
||||
$% [%set-provider provider=ship =network]
|
||||
[%set-default-wallet ~]
|
||||
[%set-default-wallet =xpub]
|
||||
[%delete-wallet =xpub]
|
||||
[%clear-poym ~]
|
||||
[%force-retry ~]
|
||||
[%req-pay-address payee=ship value=sats feyb=(unit sats)]
|
||||
|
@ -90,6 +90,7 @@
|
||||
::
|
||||
+$ action
|
||||
$% [%add-wallet =xpub =fprint scan-to=(unit scon) max-gap=(unit @ud) confs=(unit @ud)]
|
||||
[%delete-wallet =xpub]
|
||||
[%address-info =xpub =chyg =idx utxos=(set utxo) used=? block=@ud]
|
||||
[%tx-info =info:tx block=@ud]
|
||||
[%generate-address =xpub =chyg =pmet]
|
||||
|
Loading…
Reference in New Issue
Block a user