mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-27 08:55:39 +00:00
parent
a141c75634
commit
08fa0e6db9
@ -1,7 +1,6 @@
|
||||
(ns status-im.ethereum.json-rpc
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.ethereum.abi-spec :as abi-spec]
|
||||
[status-im.native-module.core :as status]
|
||||
[status-im.utils.types :as types]
|
||||
[status-im.utils.utils :as utils]
|
||||
@ -40,23 +39,6 @@
|
||||
(.-result response-js)
|
||||
(types/js->clj (.-result response-js)))))))))))
|
||||
|
||||
(defn eth-call
|
||||
[{:keys [contract method params outputs on-success block]
|
||||
:or {block "latest" params []}
|
||||
:as arg}]
|
||||
(call {:method "eth_call"
|
||||
:params [{:to contract
|
||||
:data (abi-spec/encode method params)}
|
||||
(if (int? block)
|
||||
(abi-spec/number-to-hex block)
|
||||
block)]
|
||||
:on-success
|
||||
(if outputs
|
||||
#(on-success (abi-spec/decode % outputs))
|
||||
on-success)
|
||||
:on-error
|
||||
(on-error-retry eth-call arg)}))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::call
|
||||
(fn [params]
|
||||
|
@ -445,15 +445,6 @@
|
||||
{:db (update db :signing/queue conj (normalize-tx-obj db tx))}
|
||||
(check-queue)))
|
||||
|
||||
(fx/defn eth-transaction-call
|
||||
"Prepares tx-obj for contract call and show signing sheet"
|
||||
[cofx {:keys [contract method params on-result on-error from]}]
|
||||
(sign cofx {:tx-obj {:to contract
|
||||
:data (abi-spec/encode method params)
|
||||
:from from}
|
||||
:on-result on-result
|
||||
:on-error on-error}))
|
||||
|
||||
(fx/defn sign-transaction-button-clicked-from-chat
|
||||
{:events [:wallet.ui/sign-transaction-button-clicked-from-chat]}
|
||||
[{:keys [db] :as cofx} {:keys [to amount from token]}]
|
||||
|
Loading…
x
Reference in New Issue
Block a user