mirror of
https://github.com/status-im/pluto.git
synced 2025-02-24 08:28:15 +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}
|
||||
'transaction-status {:value component :properties {:outgoing :string :tx-hash :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}}}
|
||||
:events {'alert
|
||||
{:permissions [:read]
|
||||
@ -75,7 +75,6 @@
|
||||
:value? :string
|
||||
:data? :string
|
||||
:block :string}}
|
||||
|
||||
'ethereum/logs
|
||||
{:arguments
|
||||
{:from? :string
|
||||
|
@ -97,7 +97,7 @@
|
||||
|
||||
(defn event-after-env [ref data args bindings]
|
||||
(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)]
|
||||
[ref (merge o (reduce-kv #(assoc %1 %2 (replace-atom dic %3)) {} data))])))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user