Fix lame mistake with get-nonce closure invocation

This commit is contained in:
Vitaliy Vlasov 2018-04-16 11:58:18 +03:00 committed by Tetiana Churikova
parent 05d93a1893
commit 1a50f9f607
1 changed files with 2 additions and 1 deletions

View File

@ -66,13 +66,14 @@
(throw (Exception. (str "Attempting to create transaction with the same nonce: " nonce)))
(swap! current-nonce (constantly nonce)))
nonce))))
(def get-nonce-fn (get-nonce))
(defn get-signed-tx [gas-price gas-limit to data]
"Create a sign a raw transaction.
'From' argument is not needed as it's already
encoded in credentials.
See https://web3j.readthedocs.io/en/latest/transactions.html#offline-transaction-signing"
(let [nonce ((get-nonce))
(let [nonce (get-nonce-fn)
tx (RawTransaction/createTransaction
nonce
gas-price