Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IDIDOS committed Jul 19, 2024
1 parent 8d7ad17 commit c182a9e
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigNumber from 'bignumber.js';
import { ethers } from 'ethers';
import { FailedToCheckForTransactionReceiptError, RubicSdkError } from 'src/common/errors';
import { PriceTokenAmount } from 'src/common/tokens';
import { BlockchainName, EvmBlockchainName } from 'src/core/blockchain/models/blockchain-name';
Expand Down Expand Up @@ -207,17 +206,12 @@ export class StargateV2CrossChainTrade extends EvmCrossChainTrade {
}

protected async getTransactionConfigAndAmount(
receiverAddress?: string | undefined
_receiverAddress?: string | undefined
): Promise<{ config: EvmEncodeConfig; amount: string }> {
const fromBlockchain = this.from.blockchain as StargateV2SupportedBlockchains;
const fromTokenSymbol = stargateV2TokenAddress[fromBlockchain][
this.fromTokenAddress
] as StargateV2BridgeToken;
const toAddress = receiverAddress || this.walletAddress
const sendParams = {
...this.stargateV2SendParams,
to: ethers.utils.hexZeroPad(toAddress, 32)
};
const contractAddress = stargateV2ContractAddress?.[fromBlockchain]?.[fromTokenSymbol];
if (!contractAddress) {
throw new RubicSdkError();
Expand All @@ -231,7 +225,7 @@ export class StargateV2CrossChainTrade extends EvmCrossChainTrade {
contractAddress,
stargateV2SendTokenAbi,
'sendToken',
[sendParams, this.messagingFee, this.walletAddress],
[this.stargateV2SendParams, this.messagingFee, this.walletAddress],
value
);
return {
Expand Down

0 comments on commit c182a9e

Please sign in to comment.