fix(@desktop/communities): Fix fees estimation crash

Fix #12847
This commit is contained in:
Michal Iskierko 2023-11-24 14:58:43 +01:00 committed by Michał Iskierko
parent 88d0c2493e
commit 7bb5202a75
1 changed files with 4 additions and 4 deletions

View File

@ -119,8 +119,8 @@ type
proc `%`*(self: ComputeFeeArgs): JsonNode =
result = %* {
"ethFee": self.ethCurrency.toJsonNode(),
"fiatFee": self.fiatCurrency.toJsonNode(),
"ethFee": if self.ethCurrency == nil: newCurrencyAmount().toJsonNode() else: self.ethCurrency.toJsonNode(),
"fiatFee": if self.fiatCurrency == nil: newCurrencyAmount().toJsonNode() else: self.fiatCurrency.toJsonNode(),
"errorCode": self.errorCode.int,
"contractUniqueKey": self.contractUniqueKey,
}
@ -142,8 +142,8 @@ type
proc `%`*(self: AirdropFeesArgs): JsonNode =
result = %* {
"fees": computeFeeArgsToJsonArray(self.fees),
"totalEthFee": self.totalEthFee.toJsonNode(),
"totalFiatFee": self.totalFiatFee.toJsonNode(),
"totalEthFee": if self.totalEthFee == nil: newCurrencyAmount().toJsonNode() else: self.totalEthFee.toJsonNode(),
"totalFiatFee": if self.totalFiatFee == nil: newCurrencyAmount().toJsonNode() else: self.totalFiatFee.toJsonNode(),
"errorCode": self.errorCode.int,
"requestId": self.requestId,
}