[#12642] Can't send funds to multisig - Out of gas

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
andrey 2021-09-24 12:03:23 +02:00
parent 70607a13ae
commit 675515a655
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
3 changed files with 4 additions and 21 deletions

View File

@ -1,7 +1,5 @@
(ns status-im.ethereum.core
(:require [clojure.string :as string]
[status-im.ethereum.tokens :as tokens]
[status-im.utils.money :as money]
["web3-utils" :as utils]))
(defn sha3 [s]
@ -127,14 +125,6 @@
(defn snt-symbol [db]
(chain-keyword->snt-symbol (chain-keyword db)))
(def default-transaction-gas (money/bignumber 21000))
(defn estimate-gas [symbol]
(if (tokens/ethereum? symbol)
default-transaction-gas
;; TODO(jeluard) Rely on estimateGas call
(.times ^js default-transaction-gas 5)))
(defn address= [address1 address2]
(and address1 address2
(= (normalized-hex address1)

View File

@ -366,10 +366,7 @@
(re-frame/reg-fx
:signing/update-estimated-gas
(fn [{:keys [obj success-event error-event]}]
(if (nil? (:data obj))
(re-frame/dispatch [success-event (money/bignumber 21000)])
(json-rpc/call
{:method "eth_estimateGas"
:params [obj]
:on-success #(re-frame/dispatch [success-event %])
:on-error #(re-frame/dispatch [error-event %])}))))
(json-rpc/call {:method "eth_estimateGas"
:params [obj]
:on-success #(re-frame/dispatch [success-event %])
:on-error #(re-frame/dispatch [error-event %])})))

View File

@ -25,10 +25,6 @@
(defn- find-address-name [db address]
(:name (contact.db/find-contact-by-address (:contacts/contacts db) address)))
(defn use-default-eth-gas [fx]
(assoc-in fx [:db :wallet :send-transaction :gas]
ethereum/default-transaction-gas))
(fx/defn set-recipient
{:events [:wallet.send/set-recipient]}
[{:keys [db]} address]