Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix receiver address #681

Merged
merged 3 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -200,22 +200,18 @@
value
};
} catch (err) {
console.log(err?.message);

Check warning on line 203 in src/features/cross-chain/calculation-manager/providers/stargate-v2-provider/stargate-v2-cross-chain-trade.ts

View workflow job for this annotation

GitHub Actions / Check code base before merge to master

Unexpected console statement
throw new RubicSdkError(err?.message);
}
}

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 @@
contractAddress,
stargateV2SendTokenAbi,
'sendToken',
[sendParams, this.messagingFee, this.walletAddress],
[this.stargateV2SendParams, this.messagingFee, this.walletAddress],
value
);
return {
Expand Down
Loading