mirror of
https://github.com/status-im/pluto.git
synced 2025-02-24 16:38:16 +00:00
Fixed ignored event argument during env replacement
This commit is contained in:
parent
49dc8339c6
commit
d962fae9eb
@ -19,7 +19,7 @@
|
|||||||
'text {:value component} 'view {:value component} 'token-selector {:value component} 'asset-selector {:value component}
|
'text {:value component} 'view {:value component} 'token-selector {:value component} 'asset-selector {:value component}
|
||||||
'transaction-status {:value component :properties {:outgoing :string :tx-hash :string}}
|
'transaction-status {:value component :properties {:outgoing :string :tx-hash :string}}
|
||||||
'nft-token-viewer {:value component :properties {:token :string}}}
|
'nft-token-viewer {:value component :properties {:token :string}}}
|
||||||
:queries {'get-collectible-token {:value :get-collectible-token :arguments {:token :string :symbol :string}}
|
:queries {'wallet/collectibles {:value :get-collectible-token :arguments {:token :string :symbol :string}}
|
||||||
'store/get {:value :store/get :arguments {:key :string}}}
|
'store/get {:value :store/get :arguments {:key :string}}}
|
||||||
:events {'alert
|
:events {'alert
|
||||||
{:permissions [:read]
|
{:permissions [:read]
|
||||||
@ -75,7 +75,6 @@
|
|||||||
:value? :string
|
:value? :string
|
||||||
:data? :string
|
:data? :string
|
||||||
:block :string}}
|
:block :string}}
|
||||||
|
|
||||||
'ethereum/logs
|
'ethereum/logs
|
||||||
{:arguments
|
{:arguments
|
||||||
{:from? :string
|
{:from? :string
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
|
|
||||||
(defn event-after-env [ref data args bindings]
|
(defn event-after-env [ref data args bindings]
|
||||||
(fn [o env]
|
(fn [o env]
|
||||||
(let [env (merge env (:data (destructuring/destructure bindings args)))
|
(let [env (merge env (reduce-kv #(assoc %1 (symbol (name %2)) %3) {} o) (:data (destructuring/destructure bindings args)))
|
||||||
dic (reduce-kv #(assoc %1 %2 (if (contains? env %3) (get env %3) %3)) {} env)]
|
dic (reduce-kv #(assoc %1 %2 (if (contains? env %3) (get env %3) %3)) {} env)]
|
||||||
[ref (merge o (reduce-kv #(assoc %1 %2 (replace-atom dic %3)) {} data))])))
|
[ref (merge o (reduce-kv #(assoc %1 %2 (replace-atom dic %3)) {} data))])))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user