Decode height retrieved from Tendermint RPC

Integers are encoded as strings since Tendermint 0.22.0.
parent 90c22788
Pipeline #31246697 passed with stages
in 1 minute and 48 seconds
(ns ercoin-wallet.tendermint
(:require-macros [cljs.core.async.macros :refer [go]])
(:require
[alandipert.storage-atom :refer [local-storage]]
[alphabase.hex :as hex]
[cljs.core.async :refer [<! promise-chan]]
[cljs-http.client :as http]
......@@ -41,4 +40,4 @@
(go
(let [resp-chan (promise-chan)
result (<! (request endpoint "abci_info"))]
(get-in result [:response :last_block_height]))))
(js/parseInt (get-in result [:response :last_block_height])))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment