Fix possible crash in multisig-wallet/token-balances
* ignore tokens existing in bounty contract if they are not in our tokenreg, avoids crash silently leading to token balances not gettings saved
This commit is contained in:
parent
bb5dc7b85a
commit
002946c1fd
|
@ -168,9 +168,9 @@
|
||||||
(let [addrs (map str
|
(let [addrs (map str
|
||||||
(.getValue token-addresses))]
|
(.getValue token-addresses))]
|
||||||
(into {}
|
(into {}
|
||||||
(map (fn [addr] (let [tla (first (token-data/token-info-by-addr addr))]
|
(map (fn [addr] (if-let [info (token-data/token-info-by-addr addr)]
|
||||||
(assert tla)
|
(let [tla (first info)]
|
||||||
[tla (token-balance bounty-addr tla)])) addrs)))
|
[tla (token-balance bounty-addr tla)]))) addrs)))
|
||||||
{})))
|
{})))
|
||||||
|
|
||||||
(defn transfer-tokens
|
(defn transfer-tokens
|
||||||
|
|
Loading…
Reference in New Issue