Ignore empty records in token registry
* ignore records with empty TLA when reading tokenreg data
This commit is contained in:
parent
a2a569f980
commit
c9f7013b66
|
@ -37,7 +37,7 @@
|
|||
(let [token-count (-> contract .tokenCount .get .getValue)]
|
||||
(log/debug "token-count" token-count)
|
||||
(into {}
|
||||
(map (fn [[addr tla digits name owner]]
|
||||
(->> (map (fn [[addr tla digits name owner]]
|
||||
[(-> tla str keyword)
|
||||
{:tla (str tla)
|
||||
:name (str name)
|
||||
|
@ -47,7 +47,9 @@
|
|||
(for [i (range token-count)]
|
||||
(-> (.token contract
|
||||
(org.web3j.abi.datatypes.generated.Uint256. i))
|
||||
.get))))))))
|
||||
.get)))
|
||||
;; ignore empty records
|
||||
(filter (fn [[tla _]] (not= ":" (str tla))))))))))
|
||||
|
||||
(defn deploy-parity-tokenreg
|
||||
"Deploy an instance of parity token-registry to current network"
|
||||
|
|
Loading…
Reference in New Issue