Skip to content

Commit

Permalink
fix receiver address (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
IDIDOS authored Jul 19, 2024
2 parents bd68ef7 + c182a9e commit 03c5119
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rubic-sdk",
"version": "5.32.0",
"version": "5.32.1",
"description": "Simplify dApp creation",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +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 sendParams = {
...this.stargateV2SendParams,
to: receiverAddress || this.walletAddress
};
const contractAddress = stargateV2ContractAddress?.[fromBlockchain]?.[fromTokenSymbol];
if (!contractAddress) {
throw new RubicSdkError();
Expand All @@ -229,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 03c5119

Please sign in to comment.