hotfix to watch ALL addresses requested; txinfo records properly

This commit is contained in:
timlucmiptev 2020-12-09 15:41:05 +02:00 committed by ixv
parent b4cd9c6d0e
commit 78e5593919
2 changed files with 4 additions and 4 deletions

View File

@ -335,7 +335,6 @@
:: if no peta (payer/value), just prints address
::
%generate-address
:: TODO: find a way to not print the below for a change address
?~ peta.upd ~&(> "wallet-hook: %generate-address: {<address.upd>}" `state)
=/ [payer=ship value=sats] u.peta.upd
:_ state(ps.piym (~(put by ps.piym) payer [xpub.upd address.upd payer value]))
@ -345,6 +344,7 @@
:: - request provider to create-raw-tx from txbu
::
%generate-txbu
:: TODO make tx info fetch correctly
:_ state(poym `txbu.upd)
?~ provider ~&(>>> "provider not set" ~)
%+ weld ~[(create-raw-tx host.u.provider txbu.upd)]
@ -425,7 +425,6 @@
|= [ri=req-id:bp =txid rt=rawtx]
^- ^poym
?~ poym ~
?~ txinfo.u.poym poym
?. =(ri req-id.u.poym) poym
`u.poym(txinfo `[txid rt])
:: check poym txbu

View File

@ -266,7 +266,8 @@
(bump-batch xpub %1)
:- (weld cards0 cards1)
state(scans (insert-batches xpub batch0 batch1))
:: +update-address: watch the address passed; update wallet if it's used
:: +update-address: watch the address passed;
:: - update wallet with the address
:: - if address is unused, send %address-info request
:: - if address doesn't have enough confs, send %address-info request
:: - if this idx was the last in todo.scans, do run-scan to see whether scan is done
@ -279,7 +280,7 @@
state(last-block last-block)
=/ w=(unit walt) (~(get by walts) xpub)
?~ w `state
=? walts used
=. walts
%+ ~(put by walts) xpub
%+ ~(update-address wad u.w chyg)
(~(mk-address wad u.w chyg) idx)