Skip to content

Commit

Permalink
[#8762] Dapp can't derive a wallet balance, "Not enough ETH for gas" …
Browse files Browse the repository at this point in the history
…at attempt to send transaction in any DApp

Signed-off-by: yenda <[email protected]>
  • Loading branch information
flexsurfer authored and yenda committed Aug 16, 2019
1 parent c2f646b commit 11ed6f4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/status_im/signing/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
[re-frame.core :as re-frame]
[status-im.constants :as constants]
[status-im.utils.utils :as utils]
status-im.utils.handlers))
status-im.utils.handlers
[status-im.ethereum.eip55 :as eip55]))

(re-frame/reg-fx
:signing/send-transaction-fx
Expand Down Expand Up @@ -254,9 +255,7 @@
{:dispatch (conj on-error "transaction was cancelled by user")}))))

(defn normalize-tx-obj [db tx]
(if (get-in tx [:tx-obj :from])
tx
(assoc-in tx [:tx-obj :from] (ethereum/default-address db))))
(update-in tx [:tx-obj :from] #(eip55/address->checksum (or % (ethereum/default-address db)))))

(fx/defn sign [{:keys [db] :as cofx} tx]
"Signing transaction or message, shows signing sheet
Expand Down

0 comments on commit 11ed6f4

Please sign in to comment.