@cryptorubic/web3 1.6.1 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptorubic/web3",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "dependencies": {
5
5
  "@ethersproject/bignumber": "^5.8.0",
6
6
  "@mysten/sui": "^1.24.0",
@@ -362,8 +362,8 @@ class EvmAdapter extends abstract_adapter_1.AbstractAdapter {
362
362
  });
363
363
  const gasfulViemOptions = {
364
364
  ...gaslessParams,
365
- ...(0, options_1.getViemGasOptions)(options),
366
- gas: gas.toString()
365
+ gas: gas.toString(),
366
+ gasPriceOptions: (0, options_1.getGasOptions)(options)
367
367
  };
368
368
  const receipt = await this.signer.executeContractMethod(tokenAddress, erc20_token_abi_1.erc20TokenAbi, 'approve', [spenderAddress, BigInt(rawValue.toFixed(0))], gasfulViemOptions);
369
369
  return receipt.transactionHash;
@@ -79,8 +79,8 @@ class EvmAdapterSigner extends abstract_adapter_signer_1.AbstractAdapterSigner {
79
79
  : gas;
80
80
  const gasfulParams = {
81
81
  ...gaslessParams,
82
- ...(0, options_1.getGasOptions)(params.txOptions),
83
- gas: calculatedGas.toString()
82
+ gas: calculatedGas.toString(),
83
+ gasPriceOptions: (0, options_1.getGasOptions)(params.txOptions)
84
84
  };
85
85
  const gasfulViemParams = {
86
86
  ...gaslessParams,
@@ -91,8 +91,7 @@ class EvmAdapterSigner extends abstract_adapter_signer_1.AbstractAdapterSigner {
91
91
  const sendParams = {
92
92
  ...gasfulParams,
93
93
  ...(params.txOptions.onTransactionHash && {
94
- onTransactionHash: params.txOptions.onTransactionHash,
95
- gasPriceOptions: params.txOptions?.gasPriceOptions
94
+ onTransactionHash: params.txOptions.onTransactionHash
96
95
  })
97
96
  };
98
97
  const receipt = await this.sendTransaction({ txOptions: sendParams });
@@ -25,7 +25,7 @@ class SuiAdapter extends abstract_adapter_1.AbstractAdapter {
25
25
  }
26
26
  async getTransactionStatus(srcTxHash) {
27
27
  try {
28
- const txDetails = await this.public.getTransactionBlock({ digest: srcTxHash });
28
+ const txDetails = await this.public.getTransactionBlock({ digest: srcTxHash, options: { showEffects: true } });
29
29
  const status = txDetails?.effects?.status.status;
30
30
  if (!status) {
31
31
  return tx_status_1.TX_STATUS.PENDING;