@injectivelabs/wallet-core 1.16.25-alpha.1 → 1.16.25-alpha.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.
@@ -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.1",
4
+ "version": "1.16.25-alpha.3",
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.1",
60
- "@injectivelabs/networks": "1.16.25-alpha.1",
61
- "@injectivelabs/sdk-ts": "1.16.25-alpha.1",
62
- "@injectivelabs/ts-types": "1.16.25-alpha.1",
63
- "@injectivelabs/utils": "1.16.25-alpha.1",
64
- "@injectivelabs/wallet-base": "1.16.25-alpha.1",
59
+ "@injectivelabs/exceptions": "1.16.25-alpha.3",
60
+ "@injectivelabs/networks": "1.16.25-alpha.3",
61
+ "@injectivelabs/sdk-ts": "1.16.25-alpha.3",
62
+ "@injectivelabs/ts-types": "1.16.25-alpha.3",
63
+ "@injectivelabs/utils": "1.16.25-alpha.3",
64
+ "@injectivelabs/wallet-base": "1.16.25-alpha.3",
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": "e59fe33d170260cc2214f5db7e48e0c7223dc37f"
71
+ "gitHead": "84488e40668d8240af96e45f6e2568a74c986101"
72
72
  }