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])))
|
||||
|
||||
(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)]
|
||||
(signing/eth-transaction-call
|
||||
cofx
|
||||
|
@ -100,7 +101,8 @@
|
|||
(assoc-state-for username state))}
|
||||
(when (and name (= :valid state))
|
||||
(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))]
|
||||
{:ens/resolve-address [registry name #(on-resolve registry custom-domain? username address public-key %)]})))))
|
||||
|
||||
|
@ -156,11 +158,6 @@
|
|||
[{:keys [db]} username]
|
||||
{: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
|
||||
{:events [:ens/store-name-detail]}
|
||||
[{:keys [db]} name k v]
|
||||
|
|
Loading…
Reference in New Issue