feat(addAmountOutInSentTransactions)_: Add amount out in NewRouterSentTransaction function
This commit is contained in:
parent
7617bdd2ef
commit
c4bb706e63
|
@ -43,7 +43,8 @@ type RouterSentTransaction struct {
|
|||
ToChain uint64 `json:"toChain"`
|
||||
FromToken string `json:"fromToken"`
|
||||
ToToken string `json:"toToken"`
|
||||
Amount string `json:"amount"` // amount of the transaction
|
||||
Amount string `json:"amount"` // amount sent
|
||||
AmountOut string `json:"amountOut"` // amount that will be received
|
||||
Hash types.Hash `json:"hash"`
|
||||
ApprovalTx bool `json:"approvalTx"`
|
||||
}
|
||||
|
@ -66,6 +67,7 @@ func NewRouterSentTransaction(sendArgs *transactions.SendTxArgs, hash types.Hash
|
|||
FromToken: sendArgs.FromTokenID,
|
||||
ToToken: sendArgs.ToTokenID,
|
||||
Amount: sendArgs.Value.String(),
|
||||
AmountOut: sendArgs.ValueOut.String(),
|
||||
Hash: hash,
|
||||
ApprovalTx: approvalTx,
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ func (tm *TransactionManager) buildApprovalTxForPath(path *routes.Path, addressF
|
|||
Gas: (*hexutil.Uint64)(&path.ApprovalGasAmount),
|
||||
MaxFeePerGas: path.MaxFeesPerGas,
|
||||
MaxPriorityFeePerGas: path.ApprovalPriorityFee,
|
||||
ValueOut: (*hexutil.Big)(big.NewInt(0)),
|
||||
|
||||
// additional fields version 1
|
||||
FromChainID: path.FromChain.ChainID,
|
||||
|
|
Loading…
Reference in New Issue