Wallet: select-send-address event (#18501)
* Wallet: select-send-address event
This commit is contained in:
parent
3e787ff112
commit
fa9b6edd30
|
@ -0,0 +1,5 @@
|
|||
{:lint-as
|
||||
{rewrite-clj.zip/subedit-> clojure.core/->
|
||||
rewrite-clj.zip/subedit->> clojure.core/->>
|
||||
rewrite-clj.zip/edit-> clojure.core/->
|
||||
rewrite-clj.zip/edit->> clojure.core/->>}}
|
|
@ -0,0 +1 @@
|
|||
{:hooks {:analyze-call {taoensso.encore/defalias taoensso.encore/defalias}}}
|
|
@ -0,0 +1,16 @@
|
|||
(ns taoensso.encore
|
||||
(:require
|
||||
[clj-kondo.hooks-api :as hooks]))
|
||||
|
||||
(defn defalias [{:keys [node]}]
|
||||
(let [[sym-raw src-raw] (rest (:children node))
|
||||
src (if src-raw src-raw sym-raw)
|
||||
sym (if src-raw
|
||||
sym-raw
|
||||
(symbol (name (hooks/sexpr src))))]
|
||||
{:node (with-meta
|
||||
(hooks/list-node
|
||||
[(hooks/token-node 'def)
|
||||
(hooks/token-node (hooks/sexpr sym))
|
||||
(hooks/token-node (hooks/sexpr src))])
|
||||
(meta src))}))
|
|
@ -47,10 +47,11 @@
|
|||
(update-in [:wallet :ui :send] dissoc :to-address))
|
||||
:fx [[:navigate-to-within-stack [:wallet-select-asset stack-id]]]}))
|
||||
|
||||
(rf/reg-event-fx :wallet/select-send-address
|
||||
(fn [{:keys [db]} [{:keys [address token stack-id]}]]
|
||||
{:db (assoc-in db [:wallet :ui :send :to-address] address)
|
||||
:fx [[:navigate-to-within-stack
|
||||
(if token [:wallet-send-input-amount stack-id] [:wallet-select-asset stack-id])]]})
|
||||
(if token [:wallet-send-input-amount stack-id] [:wallet-select-asset stack-id])]]}))
|
||||
|
||||
(rf/reg-event-fx :wallet/send-select-token
|
||||
(fn [{:keys [db]} [{:keys [token stack-id]}]]
|
||||
|
|
Loading…
Reference in New Issue