diff --git a/package.json b/package.json index ad8e2b4d88..914240499c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "5.36.8", + "version": "5.36.9", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/core/blockchain/web3-private-service/web3-private/evm-web3-private/models/evm-transaction-options.ts b/src/core/blockchain/web3-private-service/web3-private/evm-web3-private/models/evm-transaction-options.ts index b2c3d652d5..43255668de 100644 --- a/src/core/blockchain/web3-private-service/web3-private/evm-web3-private/models/evm-transaction-options.ts +++ b/src/core/blockchain/web3-private-service/web3-private/evm-web3-private/models/evm-transaction-options.ts @@ -21,4 +21,9 @@ export interface EvmTransactionOptions extends EvmBasicTransactionOptions { * gasLimit multiplier (to change ratio for specific chain) */ gasLimitRatio?: number; + + /** + * Address send transaction to + */ + to?: string; } diff --git a/src/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/evm-cross-chain-trade.ts b/src/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/evm-cross-chain-trade.ts index 377bab16ee..7930e19681 100644 --- a/src/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/evm-cross-chain-trade.ts +++ b/src/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/evm-cross-chain-trade.ts @@ -176,15 +176,18 @@ export abstract class EvmCrossChainTrade extends CrossChainTrade { this.apiFromAddress = fromAddress; if (!options?.testMode) { - await this.checkWalletState(options?.testMode); + await this.checkWalletState(options.testMode); } await this.checkReceiverAddress( options.receiverAddress, @@ -291,15 +291,19 @@ export abstract class EvmOnChainTrade extends OnChainTrade { const { data, value, to } = await this.encode({ ...options, fromAddress }); try { - const gasfullOptions = await this.web3Private.simulateTransaction( - to, - { - data, - value - }, - this.from.blockchain - ); - return gasfullOptions; + if (!options?.testMode) { + const gasfullOptions = await this.web3Private.simulateTransaction( + to, + { + data, + value + }, + this.from.blockchain + ); + return gasfullOptions; + } + + return { data, value, to }; } catch (err) { throw err; }