[#12460] Allow assets name collision
This commit is contained in:
parent
428ce7bbdf
commit
37d893d5f8
|
@ -145,14 +145,9 @@
|
||||||
(fx/defn name-result
|
(fx/defn name-result
|
||||||
{:events [:wallet.custom-token/name-result]}
|
{:events [:wallet.custom-token/name-result]}
|
||||||
[{:keys [db]} contract token-name]
|
[{:keys [db]} contract token-name]
|
||||||
(let [name-exists? (field-exists? db :name token-name)]
|
|
||||||
{:db
|
{:db
|
||||||
(update db :wallet/custom-token-screen merge
|
(update db :wallet/custom-token-screen merge {:name token-name})
|
||||||
{:name token-name
|
:wallet.custom-token/get-symbol contract})
|
||||||
:error-name (when name-exists?
|
|
||||||
(i18n/label :t/you-already-have-an-asset
|
|
||||||
{:value token-name}))})
|
|
||||||
:wallet.custom-token/get-symbol contract}))
|
|
||||||
|
|
||||||
(fx/defn balance-result
|
(fx/defn balance-result
|
||||||
{:events [:wallet.custom-token/balance-result]}
|
{:events [:wallet.custom-token/balance-result]}
|
||||||
|
|
Loading…
Reference in New Issue