@injectivelabs/wallet-trezor 1.20.64 → 1.20.65

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.
@@ -1,5 +1,4 @@
1
1
  let viem = require("viem");
2
- let __injectivelabs_sdk_ts_core_tx = require("@injectivelabs/sdk-ts/core/tx");
3
2
  let __injectivelabs_wallet_base = require("@injectivelabs/wallet-base");
4
3
  let __injectivelabs_sdk_ts_utils = require("@injectivelabs/sdk-ts/utils");
5
4
  let __injectivelabs_exceptions = require("@injectivelabs/exceptions");
@@ -534,19 +533,7 @@ var TrezorBase = class extends __injectivelabs_wallet_base.BaseConcreteStrategy
534
533
  }
535
534
  }
536
535
  async sendTransaction(transaction, options) {
537
- const { endpoints, txTimeout, txInclusion, onBroadcast } = options;
538
- if (!endpoints) throw new __injectivelabs_exceptions.WalletException(/* @__PURE__ */ new Error("You have to pass endpoints.grpc within the options for using Ethereum native wallets"));
539
- const response = await new __injectivelabs_sdk_ts_core_tx.TxGrpcApi(endpoints.grpc).broadcast(transaction, {
540
- txTimeout,
541
- ...txInclusion,
542
- onBroadcast
543
- });
544
- if (response.code !== 0) throw new __injectivelabs_exceptions.TransactionException(new Error(response.rawLog), {
545
- code: __injectivelabs_exceptions.UnspecifiedErrorCode,
546
- contextCode: response.code,
547
- contextModule: response.codespace
548
- });
549
- return response;
536
+ return (0, __injectivelabs_wallet_base.broadcastTxRaw)(transaction, options);
550
537
  }
551
538
  async signEip712TypedData(eip712json, address) {
552
539
  const TrezorConnect = await loadTrezorConnect();
@@ -1,6 +1,6 @@
1
- import { TxResponse } from "@injectivelabs/sdk-ts/core/tx";
2
1
  import { BaseConcreteStrategy, ConcreteEvmWalletStrategyArgs, ConcreteWalletStrategy, Eip1193Provider, SendTransactionOptions, StdSignDoc, WalletDeviceType, WalletMetadata } from "@injectivelabs/wallet-base";
3
2
  import { AccountAddress, EvmChainId } from "@injectivelabs/ts-types";
3
+ import { TxResponse } from "@injectivelabs/sdk-ts/core/tx";
4
4
  import { AminoSignResponse, DirectSignResponse, TxRaw } from "@injectivelabs/sdk-ts/types";
5
5
 
6
6
  //#region src/types.d.ts
package/dist/esm/index.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import { serializeTransaction, toHex } from "viem";
2
- import { TxGrpcApi } from "@injectivelabs/sdk-ts/core/tx";
3
- import { BaseConcreteStrategy, DEFAULT_ADDRESS_SEARCH_LIMIT, DEFAULT_BASE_DERIVATION_PATH, DEFAULT_NUM_ADDRESSES_TO_FETCH, WalletAction, WalletDeviceType, getEvmChainConfig, getViemPublicClient, getViemWalletClient } from "@injectivelabs/wallet-base";
2
+ import { BaseConcreteStrategy, DEFAULT_ADDRESS_SEARCH_LIMIT, DEFAULT_BASE_DERIVATION_PATH, DEFAULT_NUM_ADDRESSES_TO_FETCH, WalletAction, WalletDeviceType, broadcastTxRaw, getEvmChainConfig, getViemPublicClient, getViemWalletClient } from "@injectivelabs/wallet-base";
4
3
  import { SignTypedDataVersionV4, TypedDataUtilsHashStruct, TypedDataUtilsSanitizeData, addHexPrefix, hexToUint8Array, publicKeyToAddress, sanitizeTypedData, stringToUint8Array, toUtf8, uint8ArrayToHex } from "@injectivelabs/sdk-ts/utils";
5
- import { ErrorType, GeneralException, TransactionException, TrezorException, UnspecifiedErrorCode, WalletException } from "@injectivelabs/exceptions";
4
+ import { ErrorType, GeneralException, TrezorException, UnspecifiedErrorCode, WalletException } from "@injectivelabs/exceptions";
6
5
 
7
6
  //#region src/types.ts
8
7
  const TrezorDerivationPathType = {
@@ -534,19 +533,7 @@ var TrezorBase = class extends BaseConcreteStrategy {
534
533
  }
535
534
  }
536
535
  async sendTransaction(transaction, options) {
537
- const { endpoints, txTimeout, txInclusion, onBroadcast } = options;
538
- if (!endpoints) throw new WalletException(/* @__PURE__ */ new Error("You have to pass endpoints.grpc within the options for using Ethereum native wallets"));
539
- const response = await new TxGrpcApi(endpoints.grpc).broadcast(transaction, {
540
- txTimeout,
541
- ...txInclusion,
542
- onBroadcast
543
- });
544
- if (response.code !== 0) throw new TransactionException(new Error(response.rawLog), {
545
- code: UnspecifiedErrorCode,
546
- contextCode: response.code,
547
- contextModule: response.codespace
548
- });
549
- return response;
536
+ return broadcastTxRaw(transaction, options);
550
537
  }
551
538
  async signEip712TypedData(eip712json, address) {
552
539
  const TrezorConnect = await loadTrezorConnect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@injectivelabs/wallet-trezor",
3
- "version": "1.20.64",
3
+ "version": "1.20.65",
4
4
  "description": "Trezor wallet strategy for use with @injectivelabs/wallet-core.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -46,10 +46,10 @@
46
46
  "@trezor/connect": "^9.7.3",
47
47
  "@trezor/connect-web": "^9.7.3",
48
48
  "viem": "^2.54.6",
49
- "@injectivelabs/exceptions": "1.20.64",
50
- "@injectivelabs/ts-types": "1.20.64",
51
- "@injectivelabs/sdk-ts": "1.20.64",
52
- "@injectivelabs/wallet-base": "1.20.64"
49
+ "@injectivelabs/sdk-ts": "1.20.65",
50
+ "@injectivelabs/ts-types": "1.20.65",
51
+ "@injectivelabs/wallet-base": "1.20.65",
52
+ "@injectivelabs/exceptions": "1.20.65"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"