Skip to content

Commit

Permalink
chore(connect): import messages-schema instead of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
martykan authored and mroz22 committed Jan 5, 2024
1 parent e9aea38 commit c5e9d50
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
CardanoNativeScriptHashDisplayFormat,
CardanoTxSigningMode,
} from '@trezor/protobuf/lib/messages';
} from '@trezor/protobuf/lib/messages-schema';

export const cardanoDerivationType = {
name: 'derivationType',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CardanoAddressType } from '@trezor/protobuf/lib/messages';
import { CardanoAddressType } from '@trezor/protobuf/lib/messages-schema';

import { cardanoDerivationType } from './common';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CardanoNativeScriptType } from '@trezor/protobuf/lib/messages';
import { CardanoNativeScriptType } from '@trezor/protobuf/lib/messages-schema';

import { cardanoDerivationType, cardanoNativeScriptHashDisplayFormat } from './common';

Expand Down
2 changes: 1 addition & 1 deletion packages/connect/e2e/__fixtures__/cardanoGetAddress.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NETWORK_IDS, PROTOCOL_MAGICS } from '../../src/constants/cardano';
import { CardanoAddressType } from '@trezor/protobuf/lib/messages';
import { CardanoAddressType } from '@trezor/protobuf/lib/messages-schema';

const legacyResults = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @ts-ignore
import commonFixtures from '../../../../submodules/trezor-common/tests/fixtures/cardano/get_base_address.derivations.json';

import { CardanoAddressType, CardanoDerivationType } from '@trezor/protobuf/lib/messages';
import { CardanoAddressType, CardanoDerivationType } from '@trezor/protobuf/lib/messages-schema';

export default {
method: 'cardanoGetAddress',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
CardanoNativeScriptHashDisplayFormat,
CardanoNativeScriptType,
} from '@trezor/protobuf/lib/messages';
} from '@trezor/protobuf/lib/messages-schema';

export default {
method: 'cardanoGetNativeScriptHash',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
CardanoCertificateType,
CardanoTxOutputSerializationFormat,
CardanoTxSigningMode,
} from '@trezor/protobuf/lib/messages';
} from '@trezor/protobuf/lib/messages-schema';

// vectors from https://github.com/trezor/trezor-firmware/tree/main/python/trezorlib/tests/device_tests/test_msg_cardano_sign_transaction.py

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
EthereumNetworkInfo,
EthereumSignMessage as EthereumSignMessageSchema,
} from '../../../types';
import type { EthereumDefinitions } from '@trezor/protobuf/lib/messages';
import type { EthereumDefinitions } from '@trezor/protobuf/lib/messages-schema';
import { Assert } from '@trezor/schema-utils';

type Params = PROTO.EthereumSignMessage & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
EthereumNetworkInfo,
EthereumSignTransaction as EthereumSignTransactionSchema,
} from '../../../types';
import type { EthereumDefinitions } from '@trezor/protobuf/lib/messages';
import type { EthereumDefinitions } from '@trezor/protobuf/lib/messages-schema';
import { Assert } from '@trezor/schema-utils';

type Params = {
Expand Down
2 changes: 1 addition & 1 deletion packages/connect/src/api/ethereum/ethereumDefinitions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fetch from 'cross-fetch';

import { EthereumDefinitions } from '@trezor/protobuf/lib/messages';
import { EthereumDefinitions } from '@trezor/protobuf/lib/messages-schema';
import { trzd } from '@trezor/protocol';
import { parseConfigure, decode as decodeProtobuf } from '@trezor/protobuf';
import { DataManager } from '../../data/DataManager';
Expand Down
2 changes: 1 addition & 1 deletion packages/connect/src/api/ethereum/ethereumSignTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Common, Chain, Hardfork } from '@ethereumjs/common';
import { FeeMarketEIP1559TxData, TransactionFactory, LegacyTxData } from '@ethereumjs/tx';

import { EthereumDefinitions } from '@trezor/protobuf/lib/messages';
import { EthereumDefinitions } from '@trezor/protobuf/lib/messages-schema';
import { PROTO, ERRORS } from '../../constants';
import type { TypedCall } from '../../device/DeviceCommands';
import type { EthereumAccessList } from '../../types/api/ethereum';
Expand Down
2 changes: 1 addition & 1 deletion packages/connect/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export * as NETWORK from './network';
export * as CARDANO from './cardano';
export * as NEM from './nem';
// NOTE: Protobuf file is intentionally exported directly
export * as PROTO from '@trezor/protobuf/src/messages-schema';
export * as PROTO from '@trezor/protobuf/lib/messages-schema';
2 changes: 1 addition & 1 deletion packages/connect/src/device/DeviceCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { randomBytes } from 'crypto';
import { Transport } from '@trezor/transport';
import * as Messages from '@trezor/protobuf/src/messages-schema';
import * as Messages from '@trezor/protobuf/lib/messages-schema';
import { versionUtils } from '@trezor/utils';
import { ERRORS, NETWORK } from '../constants';
import { DEVICE } from '../events';
Expand Down

0 comments on commit c5e9d50

Please sign in to comment.