mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
fix(wallet): Fix fees missing on community owner token minting
This commit is contained in:
parent
3ecb533adb
commit
f557b82c1d
@ -196,18 +196,21 @@ proc decodeSuggestedFeesDto*(jsonObj: JsonNode): SuggestedFeesDto =
|
|||||||
result.maxFeePerGasL = jsonObj{"maxFeePerGasL"}.getFloat
|
result.maxFeePerGasL = jsonObj{"maxFeePerGasL"}.getFloat
|
||||||
result.maxFeePerGasM = jsonObj{"maxFeePerGasM"}.getFloat
|
result.maxFeePerGasM = jsonObj{"maxFeePerGasM"}.getFloat
|
||||||
result.maxFeePerGasH = jsonObj{"maxFeePerGasH"}.getFloat
|
result.maxFeePerGasH = jsonObj{"maxFeePerGasH"}.getFloat
|
||||||
result.l1GasFee = jsonObj{"l1GasFee"}.getFloat
|
if jsonObj.hasKey("l1GasFee"):
|
||||||
|
result.l1GasFee = jsonObj{"l1GasFee"}.getFloat
|
||||||
result.eip1559Enabled = jsonObj{"eip1559Enabled"}.getbool
|
result.eip1559Enabled = jsonObj{"eip1559Enabled"}.getbool
|
||||||
|
|
||||||
proc toSuggestedFeesDto*(jsonObj: JsonNode): SuggestedFeesDto =
|
proc toSuggestedFeesDto*(jsonObj: JsonNode): SuggestedFeesDto =
|
||||||
result = SuggestedFeesDto()
|
result = SuggestedFeesDto()
|
||||||
|
var stringValue: string
|
||||||
result.gasPrice = parseFloat(jsonObj["gasPrice"].getStr)
|
result.gasPrice = parseFloat(jsonObj["gasPrice"].getStr)
|
||||||
result.baseFee = parseFloat(jsonObj["baseFee"].getStr)
|
result.baseFee = parseFloat(jsonObj["baseFee"].getStr)
|
||||||
result.maxPriorityFeePerGas = parseFloat(jsonObj{"maxPriorityFeePerGas"}.getStr)
|
result.maxPriorityFeePerGas = parseFloat(jsonObj{"maxPriorityFeePerGas"}.getStr)
|
||||||
result.maxFeePerGasL = parseFloat(jsonObj{"maxFeePerGasLow"}.getStr)
|
result.maxFeePerGasL = parseFloat(jsonObj{"maxFeePerGasLow"}.getStr)
|
||||||
result.maxFeePerGasM = parseFloat(jsonObj{"maxFeePerGasMedium"}.getStr)
|
result.maxFeePerGasM = parseFloat(jsonObj{"maxFeePerGasMedium"}.getStr)
|
||||||
result.maxFeePerGasH = parseFloat(jsonObj{"maxFeePerGasHigh"}.getStr)
|
result.maxFeePerGasH = parseFloat(jsonObj{"maxFeePerGasHigh"}.getStr)
|
||||||
result.l1GasFee = parseFloat(jsonObj{"l1GasFee"}.getStr)
|
if jsonObj.getProp("l1GasFee", stringValue) and stringValue.len > 0:
|
||||||
|
result.l1GasFee = parseFloat(stringValue)
|
||||||
result.eip1559Enabled = jsonObj{"eip1559Enabled"}.getbool
|
result.eip1559Enabled = jsonObj{"eip1559Enabled"}.getbool
|
||||||
|
|
||||||
proc `$`*(self: SuggestedFeesDto): string =
|
proc `$`*(self: SuggestedFeesDto): string =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user