diff --git a/src/status_im/utils/ethereum/abi_spec.cljs b/src/status_im/utils/ethereum/abi_spec.cljs index f9854a43db..64bf5f13c7 100644 --- a/src/status_im/utils/ethereum/abi_spec.cljs +++ b/src/status_im/utils/ethereum/abi_spec.cljs @@ -390,4 +390,5 @@ (let [bytes (subs bytes 2)] (when-not (empty? bytes) (let [offsets (get-offsets types)] - (map (dec-type bytes) offsets types)))))) + (map #(when-not (= "0x" %) %) + (map (dec-type bytes) offsets types))))))) diff --git a/src/status_im/utils/ethereum/contracts.cljs b/src/status_im/utils/ethereum/contracts.cljs index 67e9587d78..e4197f9e15 100644 --- a/src/status_im/utils/ethereum/contracts.cljs +++ b/src/status_im/utils/ethereum/contracts.cljs @@ -34,7 +34,7 @@ (re-frame/reg-fx ::call - (fn [[address data callback]] + (fn [{:keys [address data callback]}] (ethereum/call {:to address :data data} callback))) @@ -60,4 +60,6 @@ :on-result on-result}) {::call {:address contract-address :data data - :callback #(callback (abi-spec/decode % return-params))}}))))) + :callback #(callback (if (empty? return-params) + % + (abi-spec/decode % return-params)))}})))))