@cryptorubic/web3 1.0.0-alpha.no-sdk.13 → 1.0.0-alpha.no-sdk.15
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
|
@@ -4,7 +4,7 @@ exports.EvmAdapterClient = void 0;
|
|
|
4
4
|
const core_1 = require("@cryptorubic/core");
|
|
5
5
|
const abstract_adapter_client_1 = require("../../common/client/abstract-adapter-client");
|
|
6
6
|
const viem_1 = require("viem");
|
|
7
|
-
const
|
|
7
|
+
const actions_1 = require("viem/actions");
|
|
8
8
|
const options_1 = require("../../utils/options");
|
|
9
9
|
const viem_blockchain_mapping_1 = require("../../../constants/viem-blockchain-mapping");
|
|
10
10
|
const bignumber_js_1 = require("bignumber.js");
|
|
@@ -119,10 +119,9 @@ class EvmAdapterClient extends abstract_adapter_client_1.AbstractAdapterClient {
|
|
|
119
119
|
...(params.txOptions.gas && { gas: BigInt(params.txOptions.gas) }),
|
|
120
120
|
chain
|
|
121
121
|
};
|
|
122
|
-
|
|
123
|
-
const hash = await this.web3.sendTransaction(viemParams);
|
|
122
|
+
const hash = await this.clientWallet.sendTransaction(viemParams);
|
|
124
123
|
params.txOptions?.onTransactionHash?.(hash);
|
|
125
|
-
return (0,
|
|
124
|
+
return (0, actions_1.waitForTransactionReceipt)(this.clientWallet, { hash });
|
|
126
125
|
}
|
|
127
126
|
catch (err) {
|
|
128
127
|
console.error('Send transaction error', err);
|
|
@@ -210,7 +209,7 @@ class EvmAdapterClient extends abstract_adapter_client_1.AbstractAdapterClient {
|
|
|
210
209
|
};
|
|
211
210
|
const hash = await this.clientWallet.writeContract(sendParams);
|
|
212
211
|
options?.onTransactionHash?.(hash);
|
|
213
|
-
return (0,
|
|
212
|
+
return (0, actions_1.waitForTransactionReceipt)(this.clientWallet, { hash });
|
|
214
213
|
}
|
|
215
214
|
catch (err) {
|
|
216
215
|
console.error(`Method execution error. ${err}`);
|