Fix lame mistake with get-nonce closure invocation
This commit is contained in:
parent
05d93a1893
commit
1a50f9f607
|
@ -66,13 +66,14 @@
|
||||||
(throw (Exception. (str "Attempting to create transaction with the same nonce: " nonce)))
|
(throw (Exception. (str "Attempting to create transaction with the same nonce: " nonce)))
|
||||||
(swap! current-nonce (constantly nonce)))
|
(swap! current-nonce (constantly nonce)))
|
||||||
nonce))))
|
nonce))))
|
||||||
|
(def get-nonce-fn (get-nonce))
|
||||||
|
|
||||||
(defn get-signed-tx [gas-price gas-limit to data]
|
(defn get-signed-tx [gas-price gas-limit to data]
|
||||||
"Create a sign a raw transaction.
|
"Create a sign a raw transaction.
|
||||||
'From' argument is not needed as it's already
|
'From' argument is not needed as it's already
|
||||||
encoded in credentials.
|
encoded in credentials.
|
||||||
See https://web3j.readthedocs.io/en/latest/transactions.html#offline-transaction-signing"
|
See https://web3j.readthedocs.io/en/latest/transactions.html#offline-transaction-signing"
|
||||||
(let [nonce ((get-nonce))
|
(let [nonce (get-nonce-fn)
|
||||||
tx (RawTransaction/createTransaction
|
tx (RawTransaction/createTransaction
|
||||||
nonce
|
nonce
|
||||||
gas-price
|
gas-price
|
||||||
|
|
Loading…
Reference in New Issue