mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 19:16:59 +00:00
use ethereum address of the default wallet account for ens resolution
Signed-off-by: yenda <eric@status.im>
This commit is contained in:
parent
1c475e5b1e
commit
f2cf42715b
@ -59,7 +59,8 @@
|
|||||||
(re-frame/dispatch [:ens/set-state username :unregistrable])))
|
(re-frame/dispatch [:ens/set-state username :unregistrable])))
|
||||||
|
|
||||||
(fx/defn register-name
|
(fx/defn register-name
|
||||||
[{:keys [db] :as cofx} contract custom-domain? username address public-key]
|
{:events [:ens/register]}
|
||||||
|
[{:keys [db] :as cofx} {:keys [contract custom-domain? username address public-key]}]
|
||||||
(let [{:keys [x y]} (ethereum/coordinates public-key)]
|
(let [{:keys [x y]} (ethereum/coordinates public-key)]
|
||||||
(signing/eth-transaction-call
|
(signing/eth-transaction-call
|
||||||
cofx
|
cofx
|
||||||
@ -100,7 +101,8 @@
|
|||||||
(assoc-state-for username state))}
|
(assoc-state-for username state))}
|
||||||
(when (and name (= :valid state))
|
(when (and name (= :valid state))
|
||||||
(let [{:keys [multiaccount]} db
|
(let [{:keys [multiaccount]} db
|
||||||
{:keys [address public-key]} multiaccount
|
{:keys [public-key]} multiaccount
|
||||||
|
address (ethereum/default-address db)
|
||||||
registry (get ens/ens-registries (ethereum/chain-keyword db))]
|
registry (get ens/ens-registries (ethereum/chain-keyword db))]
|
||||||
{:ens/resolve-address [registry name #(on-resolve registry custom-domain? username address public-key %)]})))))
|
{:ens/resolve-address [registry name #(on-resolve registry custom-domain? username address public-key %)]})))))
|
||||||
|
|
||||||
@ -156,11 +158,6 @@
|
|||||||
[{:keys [db]} username]
|
[{:keys [db]} username]
|
||||||
{:db (assoc-state-for db username :registration-failed)})
|
{:db (assoc-state-for db username :registration-failed)})
|
||||||
|
|
||||||
(fx/defn register
|
|
||||||
{:events [:ens/register]}
|
|
||||||
[cofx {:keys [contract custom-domain? username address public-key]}]
|
|
||||||
(register-name cofx contract custom-domain? username address public-key))
|
|
||||||
|
|
||||||
(fx/defn store-name-detail
|
(fx/defn store-name-detail
|
||||||
{:events [:ens/store-name-detail]}
|
{:events [:ens/store-name-detail]}
|
||||||
[{:keys [db]} name k v]
|
[{:keys [db]} name k v]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user