From 1a50f9f607bf3a3c2f289105a2b8d18d1188d59e Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Mon, 16 Apr 2018 11:58:18 +0300 Subject: [PATCH] Fix lame mistake with get-nonce closure invocation --- src/clj/commiteth/eth/core.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clj/commiteth/eth/core.clj b/src/clj/commiteth/eth/core.clj index 2f6bfe5..c85df48 100644 --- a/src/clj/commiteth/eth/core.clj +++ b/src/clj/commiteth/eth/core.clj @@ -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