@injectivelabs/wallet-core 1.16.25-alpha.0 → 1.16.25-alpha.2
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/dist/cjs/index.cjs +3 -6
- package/dist/esm/index.js +3 -6
- package/package.json +8 -8
package/dist/cjs/index.cjs
CHANGED
|
@@ -366,7 +366,7 @@ var MsgBroadcaster = class {
|
|
|
366
366
|
if (!evmChainId) throw new __injectivelabs_exceptions.GeneralException(/* @__PURE__ */ new Error("Please provide evmChainId"));
|
|
367
367
|
/** Account Details * */
|
|
368
368
|
const { baseAccount, latestHeight } = await this.fetchAccountAndBlockDetails(tx.injectiveAddress);
|
|
369
|
-
const timeoutHeight = (0, __injectivelabs_utils.toBigNumber)(latestHeight).plus(txTimeoutInBlocks);
|
|
369
|
+
const timeoutHeight = (0, __injectivelabs_utils.toBigNumber)(latestHeight.toString()).plus(txTimeoutInBlocks);
|
|
370
370
|
const txTimeoutTimeInSeconds = txTimeoutInBlocks * __injectivelabs_utils.DEFAULT_BLOCK_TIME_IN_SECONDS;
|
|
371
371
|
const txTimeoutTimeInMilliSeconds = txTimeoutTimeInSeconds * 1e3;
|
|
372
372
|
const gas = (((_tx$gas = tx.gas) === null || _tx$gas === void 0 ? void 0 : _tx$gas.gas) || (0, __injectivelabs_sdk_ts.getGasPriceBasedOnMessage)(msgs)).toString();
|
|
@@ -551,10 +551,7 @@ var MsgBroadcaster = class {
|
|
|
551
551
|
const txTimeoutTimeInSeconds = txTimeoutInBlocks * __injectivelabs_utils.DEFAULT_BLOCK_TIME_IN_SECONDS;
|
|
552
552
|
const txTimeoutTimeInMilliSeconds = txTimeoutTimeInSeconds * 1e3;
|
|
553
553
|
let timeoutHeight = void 0;
|
|
554
|
-
if (txTimeoutOnFeeDelegation)
|
|
555
|
-
const latestHeight = (await new __injectivelabs_sdk_ts.ChainGrpcTendermintApi(endpoints.grpc).fetchLatestBlock()).header.height;
|
|
556
|
-
timeoutHeight = (0, __injectivelabs_utils.toBigNumber)(latestHeight).plus(txTimeoutInBlocks).toNumber();
|
|
557
|
-
}
|
|
554
|
+
if (txTimeoutOnFeeDelegation) timeoutHeight = (0, __injectivelabs_utils.toBigNumber)((await new __injectivelabs_sdk_ts.ChainGrpcTendermintApi(endpoints.grpc).fetchLatestBlock()).header.height.toString()).plus(txTimeoutInBlocks).toNumber();
|
|
558
555
|
walletStrategy.emit(WalletStrategyEmitterEventType.TransactionPreparationStart);
|
|
559
556
|
const prepareTxResponse = await transactionApi.prepareTxRequest({
|
|
560
557
|
timeoutHeight,
|
|
@@ -964,7 +961,7 @@ var MsgBroadcaster = class {
|
|
|
964
961
|
const { baseAccount } = accountDetails;
|
|
965
962
|
return {
|
|
966
963
|
baseAccount,
|
|
967
|
-
latestHeight: (await tendermintClient.fetchLatestBlock()).header.height,
|
|
964
|
+
latestHeight: (await tendermintClient.fetchLatestBlock()).header.height.toString(),
|
|
968
965
|
accountDetails
|
|
969
966
|
};
|
|
970
967
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -366,7 +366,7 @@ var MsgBroadcaster = class {
|
|
|
366
366
|
if (!evmChainId) throw new GeneralException(/* @__PURE__ */ new Error("Please provide evmChainId"));
|
|
367
367
|
/** Account Details * */
|
|
368
368
|
const { baseAccount, latestHeight } = await this.fetchAccountAndBlockDetails(tx.injectiveAddress);
|
|
369
|
-
const timeoutHeight = toBigNumber(latestHeight).plus(txTimeoutInBlocks);
|
|
369
|
+
const timeoutHeight = toBigNumber(latestHeight.toString()).plus(txTimeoutInBlocks);
|
|
370
370
|
const txTimeoutTimeInSeconds = txTimeoutInBlocks * DEFAULT_BLOCK_TIME_IN_SECONDS;
|
|
371
371
|
const txTimeoutTimeInMilliSeconds = txTimeoutTimeInSeconds * 1e3;
|
|
372
372
|
const gas = (((_tx$gas = tx.gas) === null || _tx$gas === void 0 ? void 0 : _tx$gas.gas) || getGasPriceBasedOnMessage(msgs)).toString();
|
|
@@ -551,10 +551,7 @@ var MsgBroadcaster = class {
|
|
|
551
551
|
const txTimeoutTimeInSeconds = txTimeoutInBlocks * DEFAULT_BLOCK_TIME_IN_SECONDS;
|
|
552
552
|
const txTimeoutTimeInMilliSeconds = txTimeoutTimeInSeconds * 1e3;
|
|
553
553
|
let timeoutHeight = void 0;
|
|
554
|
-
if (txTimeoutOnFeeDelegation)
|
|
555
|
-
const latestHeight = (await new ChainGrpcTendermintApi(endpoints.grpc).fetchLatestBlock()).header.height;
|
|
556
|
-
timeoutHeight = toBigNumber(latestHeight).plus(txTimeoutInBlocks).toNumber();
|
|
557
|
-
}
|
|
554
|
+
if (txTimeoutOnFeeDelegation) timeoutHeight = toBigNumber((await new ChainGrpcTendermintApi(endpoints.grpc).fetchLatestBlock()).header.height.toString()).plus(txTimeoutInBlocks).toNumber();
|
|
558
555
|
walletStrategy.emit(WalletStrategyEmitterEventType.TransactionPreparationStart);
|
|
559
556
|
const prepareTxResponse = await transactionApi.prepareTxRequest({
|
|
560
557
|
timeoutHeight,
|
|
@@ -964,7 +961,7 @@ var MsgBroadcaster = class {
|
|
|
964
961
|
const { baseAccount } = accountDetails;
|
|
965
962
|
return {
|
|
966
963
|
baseAccount,
|
|
967
|
-
latestHeight: (await tendermintClient.fetchLatestBlock()).header.height,
|
|
964
|
+
latestHeight: (await tendermintClient.fetchLatestBlock()).header.height.toString(),
|
|
968
965
|
accountDetails
|
|
969
966
|
};
|
|
970
967
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-core",
|
|
3
3
|
"description": "Core wallet strategy",
|
|
4
|
-
"version": "1.16.25-alpha.
|
|
4
|
+
"version": "1.16.25-alpha.2",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": {
|
|
@@ -56,17 +56,17 @@
|
|
|
56
56
|
"lint": "eslint . --ext .ts,.js"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@injectivelabs/exceptions": "1.16.25-alpha.
|
|
60
|
-
"@injectivelabs/networks": "1.16.25-alpha.
|
|
61
|
-
"@injectivelabs/sdk-ts": "1.16.25-alpha.
|
|
62
|
-
"@injectivelabs/ts-types": "1.16.25-alpha.
|
|
63
|
-
"@injectivelabs/utils": "1.16.25-alpha.
|
|
64
|
-
"@injectivelabs/wallet-base": "1.16.25-alpha.
|
|
59
|
+
"@injectivelabs/exceptions": "1.16.25-alpha.2",
|
|
60
|
+
"@injectivelabs/networks": "1.16.25-alpha.2",
|
|
61
|
+
"@injectivelabs/sdk-ts": "1.16.25-alpha.2",
|
|
62
|
+
"@injectivelabs/ts-types": "1.16.25-alpha.2",
|
|
63
|
+
"@injectivelabs/utils": "1.16.25-alpha.2",
|
|
64
|
+
"@injectivelabs/wallet-base": "1.16.25-alpha.2",
|
|
65
65
|
"@keplr-wallet/types": "^0.12.159",
|
|
66
66
|
"eventemitter3": "^5.0.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"shx": "^0.3.3"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "bfa4ecff376de6cb71007524bde7de4f5a8e9de0"
|
|
72
72
|
}
|