Skip to content

Commit

Permalink
chore(connect): use resolveAfter from @trezor/utilsf
Browse files Browse the repository at this point in the history
  • Loading branch information
karliatto committed Dec 17, 2024
1 parent b9d3b25 commit 87f4193
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/connect/src/api/composeTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/ComposeTransaction.js

import { BigNumber } from '@trezor/utils/src/bigNumber';
import { resolveAfter } from '@trezor/utils/src/resolveAfter';
import type { ComposeOutput, TransactionInputOutputSortingStrategy } from '@trezor/utxo-lib';

import { AbstractMethod } from '../core/AbstractMethod';
Expand All @@ -9,7 +10,6 @@ import { UI, createUiMessage } from '../events';
import { Discovery } from './common/Discovery';
import { validateParams, getFirmwareRange } from './common/paramsValidator';
import * as pathUtils from '../utils/pathUtils';
import { resolveAfter } from '../utils/promiseUtils';
import { formatAmount } from '../utils/formatUtils';
import { getBitcoinNetwork, fixCoinInfoNetwork } from '../data/coinInfo';
import { isBackendSupported, initBlockchain } from '../backend/BlockchainLink';
Expand Down
3 changes: 2 additions & 1 deletion packages/connect/src/api/getAccountInfo.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/GetAccountInfo.js

import { resolveAfter } from '@trezor/utils/src/resolveAfter';

import { AbstractMethod, MethodReturnType, DEFAULT_FIRMWARE_RANGE } from '../core/AbstractMethod';
import { Discovery } from './common/Discovery';
import { validateParams, getFirmwareRange } from './common/paramsValidator';
import { validatePath, getSerializedPath } from '../utils/pathUtils';
import { getAccountLabel, isUtxoBased } from '../utils/accountUtils';
import { resolveAfter } from '../utils/promiseUtils';
import { getCoinInfo } from '../data/coinInfo';
import { PROTO, ERRORS } from '../constants';
import { UI, createUiMessage } from '../events';
Expand Down
2 changes: 1 addition & 1 deletion packages/connect/src/device/DeviceList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
isTransportInstance,
} from '@trezor/transport';
import { Descriptor, PathPublic } from '@trezor/transport/src/types';
import { resolveAfter } from '@trezor/utils/src/resolveAfter';

import { ERRORS } from '../constants';
import { DEVICE, TransportInfo } from '../events';
Expand All @@ -23,7 +24,6 @@ import {
} from '../types';
import { getBridgeInfo } from '../data/transportInfo';
import { initLog } from '../utils/debug';
import { resolveAfter } from '../utils/promiseUtils';
import { typedObjectKeys } from '../types/utils';

// custom log
Expand Down
13 changes: 0 additions & 13 deletions packages/connect/src/utils/promiseUtils.ts

This file was deleted.

0 comments on commit 87f4193

Please sign in to comment.