[fix] contract call effect should destructure keys not vector
- return params decoding should return nil and not "0x" Signed-off-by: yenda <eric@status.im>
This commit is contained in:
parent
06f72e749e
commit
c9a8fb2684
|
@ -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)))))))
|
||||
|
|
|
@ -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)))}})))))
|
||||
|
|
Loading…
Reference in New Issue