fix(wallet)_: broken swap and bridge for erc20 tokens fixed

This commit is contained in:
Sale Djenic 2024-11-07 15:04:37 +01:00
parent ffc4243622
commit 9f5f29513c
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,7 @@ type RouterSentTransaction struct {
FromToken string `json:"fromToken"` FromToken string `json:"fromToken"`
ToToken string `json:"toToken"` ToToken string `json:"toToken"`
Amount string `json:"amount"` // amount sent Amount string `json:"amount"` // amount sent
AmountIn string `json:"amountIn"` // amount that is "data" of tx (important for erc20 tokens)
AmountOut string `json:"amountOut"` // amount that will be received AmountOut string `json:"amountOut"` // amount that will be received
Hash types.Hash `json:"hash"` Hash types.Hash `json:"hash"`
ApprovalTx bool `json:"approvalTx"` ApprovalTx bool `json:"approvalTx"`
@ -80,6 +81,7 @@ func NewRouterSentTransaction(sendArgs *wallettypes.SendTxArgs, hash types.Hash,
FromToken: sendArgs.FromTokenID, FromToken: sendArgs.FromTokenID,
ToToken: sendArgs.ToTokenID, ToToken: sendArgs.ToTokenID,
Amount: sendArgs.Value.String(), Amount: sendArgs.Value.String(),
AmountIn: sendArgs.ValueIn.String(),
AmountOut: sendArgs.ValueOut.String(), AmountOut: sendArgs.ValueOut.String(),
Hash: hash, Hash: hash,
ApprovalTx: approvalTx, ApprovalTx: approvalTx,