fix(wallet): fixed precision loss for balance amount in nimqml
fixed currency amount property type to be handled by QMetatype properly
This commit is contained in:
parent
b810687049
commit
4c041e763b
|
@ -39,13 +39,11 @@ QtObject:
|
|||
stripTrailingZeroes: {self.stripTrailingZeroes}
|
||||
)"""
|
||||
|
||||
proc getAmount*(self: CurrencyAmount): float64 =
|
||||
proc getAmount*(self: CurrencyAmount): float {.slot.} =
|
||||
return self.amount
|
||||
|
||||
proc getAmountFloat*(self: CurrencyAmount): float {.slot.} =
|
||||
return self.amount
|
||||
QtProperty[float] amount:
|
||||
read = getAmountFloat
|
||||
read = getAmount
|
||||
|
||||
proc getSymbol*(self: CurrencyAmount): string {.slot.} =
|
||||
return self.symbol
|
||||
|
|
|
@ -1362,7 +1362,7 @@ QtObject:
|
|||
dataToEmit.errorCode = ComputeFeeErrorCode.Balance # set total error code to balance error
|
||||
var args = self.createComputeFeeArgsFromEthAndBalance(ethValue, balance)
|
||||
totalEthVal = totalEthVal + ethValue
|
||||
totalFiatVal = totalFiatVal + args.fiatCurrency.getAmountFloat()
|
||||
totalFiatVal = totalFiatVal + args.fiatCurrency.getAmount()
|
||||
args.contractUniqueKey = common_utils.contractUniqueKey(collectibleAndAmount.communityToken.chainId, collectibleAndAmount.communityToken.address)
|
||||
allComputeFeeArgs.add(args)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 13a8890db484d3ff40b410c2ff4b3e3bd2e0e880
|
||||
Subproject commit 20d4db12bb40dcf1c549ab3149ca0b4b791e90b7
|
Loading…
Reference in New Issue