Fix asset value in HoldingsDropdown when adding an asset (#14920)
When creating or editing a community permission, if you add a holding token that has already been added, the amount value displayed is in basic units (long value) of that token instead of primary units
This commit is contained in:
parent
e15fea7927
commit
2c1806434a
|
@ -313,7 +313,10 @@ StatusDropdown {
|
|||
d.collectibleAmountText = ""
|
||||
|
||||
if (checkedKeys.includes(key)) {
|
||||
const amount = root.usedTokens.find(entry => entry.key === key).amount
|
||||
|
||||
const amountBasicUnit = root.usedTokens.find(entry => entry.key === key).amount
|
||||
const decimals = PermissionsHelpers.getTokenByKey(root.assetsModel, key).decimals
|
||||
const amount = AmountsArithmetic.toNumber(amountBasicUnit, decimals)
|
||||
|
||||
if(d.extendedDropdownType === ExtendedDropdownContent.Type.Assets)
|
||||
root.assetAmount = amount
|
||||
|
|
Loading…
Reference in New Issue