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
|
||||
(.getValue token-addresses))]
|
||||
(into {}
|
||||
(map (fn [addr] (let [tla (first (token-data/token-info-by-addr addr))]
|
||||
(assert tla)
|
||||
[tla (token-balance bounty-addr tla)])) addrs)))
|
||||
(map (fn [addr] (if-let [info (token-data/token-info-by-addr addr)]
|
||||
(let [tla (first info)]
|
||||
[tla (token-balance bounty-addr tla)]))) addrs)))
|
||||
{})))
|
||||
|
||||
(defn transfer-tokens
|
||||
|
|
Loading…
Reference in New Issue