[#12460] Allow assets name collision

This commit is contained in:
Roman Volosovskyi 2021-08-23 11:49:31 +03:00
parent 428ce7bbdf
commit 37d893d5f8
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 3 additions and 8 deletions

View File

@ -145,14 +145,9 @@
(fx/defn name-result
{:events [:wallet.custom-token/name-result]}
[{:keys [db]} contract token-name]
(let [name-exists? (field-exists? db :name token-name)]
{:db
(update db :wallet/custom-token-screen merge
{:name token-name
:error-name (when name-exists?
(i18n/label :t/you-already-have-an-asset
{:value token-name}))})
:wallet.custom-token/get-symbol contract}))
{:db
(update db :wallet/custom-token-screen merge {:name token-name})
:wallet.custom-token/get-symbol contract})
(fx/defn balance-result
{:events [:wallet.custom-token/balance-result]}