Skip to content

Commit

Permalink
fix(@desktop/communities): Fix fees estimation crash
Browse files Browse the repository at this point in the history
Fix #12847
  • Loading branch information
endulab authored and jrainville committed Nov 24, 2023
1 parent 7c49f91 commit 5f03d4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app_service/service/community_tokens/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand All @@ -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,
}
Expand Down

0 comments on commit 5f03d4a

Please sign in to comment.