fix: bridging from send modal results in bounder fee error

Fixes: #15722
This commit is contained in:
Sale Djenic 2024-07-24 23:44:09 +02:00 committed by Iuri Matias
parent 0c9d4133a8
commit e66b0ab0a9
5 changed files with 7 additions and 4 deletions

View File

@ -22,7 +22,7 @@ type
recipient*: Option[Address] # (optional) recipient in case of a bridge hop transaction
amount*: Option[UInt256] # (optional) amount in case of a bridge hop transaction
amountOutMin*: Option[UInt256] # (optional) amountOutMin in case of a bridge hop transaction
bonderFee*: Option[string] # (optional) bonderFee in case of a bridge hop transaction
bonderFee*: Option[UInt256] # (optional) bonderFee in case of a bridge hop transaction
tokenID*: Option[UInt256] # (optional) chainID in case of a ERC721 transaction

View File

@ -248,6 +248,7 @@ type
gasFees*: SuggestedFeesDto
tokenFees*: float
bonderFees*: string
txBonderFees*: UInt256 # Unchanged value from Path V2
cost*: float
estimatedTime*: int
amountInLocked*: bool

View File

@ -47,6 +47,7 @@ proc convertToOldRoute*(route: seq[TransactionPathDtoV2]): seq[TransactionPathDt
trPath.tokenFees = parseFloat(value)
value = conversion.wei2Eth(input = p.txBonderFees, decimals = p.fromToken.decimals)
trPath.bonderFees = value
trPath.txBonderFees = p.txBonderFees
trPath.tokenFees += parseFloat(value) # we add bonder fees to the token fees cause in the UI, atm, we show only token fees
trPath.maxAmountIn = stint.fromHex(UInt256, "0x0")
trPath.amountIn = p.amountIn

View File

@ -316,11 +316,12 @@ QtObject:
path.transferTx = txData
elif(route.bridgeName == HOP_TX_BRIDGE_NAME):
hopTx = txData
hopTx.chainID = route.toNetwork.chainId.some
hopTx.chainID = route.fromNetwork.chainId.some
hopTx.chainIDTo = route.toNetwork.chainId.some
hopTx.symbol = tokenSymbol.some
hopTx.recipient = parseAddress(to_addr).some
hopTx.amount = route.amountIn.some
hopTx.bonderFee = route.bonderFees.some
hopTx.bonderFee = route.txBonderFees.some
path.hopTx = hopTx
elif(route.bridgeName == ERC721_TRANSFER_NAME):
eRC721TransferTx = txData

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 0456dcef8bc21551782931c1f989e6a421d2fd78
Subproject commit 5e88d5b4987ae27d257d90316b3ba3134b75f5b0