Skip to content

Commit f99aa90

Browse files
feat(abstract-utxo): enable esModuleInterop
Also remove deprecated `@prettier` pragma from source files. Issue: BTC-1450
1 parent f8dc4e8 commit f99aa90

File tree

10 files changed

+20
-44
lines changed

10 files changed

+20
-44
lines changed

modules/abstract-utxo/src/abstractUtxoCoin.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
/**
2-
* @prettier
3-
*/
1+
import assert from 'assert';
2+
import { randomBytes } from 'crypto';
3+
import _ from 'lodash';
44
import * as utxolib from '@bitgo/utxo-lib';
55
import { bip32, BIP32Interface, bitgo, getMainnet, isMainnet, isTestnet } from '@bitgo/utxo-lib';
6-
import * as assert from 'assert';
76
import * as bitcoinMessage from 'bitcoinjs-message';
8-
import { randomBytes } from 'crypto';
9-
import * as debugLib from 'debug';
10-
import * as _ from 'lodash';
7+
import debugLib from 'debug';
118
import BigNumber from 'bignumber.js';
129

1310
import {

modules/abstract-utxo/src/descriptor/assertDescriptorWalletAddress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as assert from 'assert';
1+
import assert from 'assert';
22
import * as t from 'io-ts';
33
import * as utxolib from '@bitgo/utxo-lib';
44
import { Descriptor } from '@bitgo/wasm-miniscript';

modules/abstract-utxo/src/parseOutput.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
/**
2-
* @prettier
3-
*/
4-
5-
import * as debugLib from 'debug';
6-
import * as _ from 'lodash';
1+
import debugLib from 'debug';
2+
import _ from 'lodash';
73
import {
84
AddressVerificationData,
95
IRequestTracer,

modules/abstract-utxo/src/recovery/backupKeyRecovery.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
/**
2-
* @prettier
3-
*/
4-
5-
import * as assert from 'assert';
6-
import * as _ from 'lodash';
1+
import assert from 'assert';
2+
import _ from 'lodash';
73
import * as utxolib from '@bitgo/utxo-lib';
84
const { getInternalChainCode, scriptTypeForChain, outputScripts, getExternalChainCode } = utxolib.bitgo;
95

modules/abstract-utxo/src/recovery/baseApi.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
/**
2-
* @prettier
3-
*/
4-
import * as superagent from 'superagent';
1+
import superagent from 'superagent';
52
import { BitGoJsError } from '@bitgo/sdk-core';
63

74
export class ApiNotImplementedError extends BitGoJsError {

modules/abstract-utxo/src/recovery/coingeckoApi.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/**
2-
* @prettier
3-
*/
41
import { BaseApi } from './baseApi';
52

63
const familyNamesToCoinGeckoIds = new Map()

modules/abstract-utxo/src/recovery/crossChainRecovery.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
/**
2-
* @prettier
3-
*/
4-
import * as Bluebird from 'bluebird';
5-
1+
import Bluebird from 'bluebird';
62
import * as utxolib from '@bitgo/utxo-lib';
73
import { bip32, BIP32Interface } from '@bitgo/utxo-lib';
84

modules/abstract-utxo/src/recovery/mempoolApi.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
/**
2-
* @prettier
3-
*/
4-
import * as _ from 'lodash';
1+
import _ from 'lodash';
52

63
import { ApiNotImplementedError, BaseApi } from './baseApi';
74

modules/abstract-utxo/src/sign.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
/**
2-
* @prettier
3-
*/
41
import * as utxolib from '@bitgo/utxo-lib';
5-
const { isWalletUnspent, signInputWithUnspent, toOutput } = utxolib.bitgo;
6-
type Unspent<TNumber extends number | bigint = number> = utxolib.bitgo.Unspent<TNumber>;
7-
type RootWalletKeys = utxolib.bitgo.RootWalletKeys;
82

9-
import * as debugLib from 'debug';
3+
import debugLib from 'debug';
104

115
import { isReplayProtectionUnspent } from './replayProtection';
126

137
const debug = debugLib('bitgo:v2:utxo');
148

9+
const { isWalletUnspent, signInputWithUnspent, toOutput } = utxolib.bitgo;
10+
11+
type Unspent<TNumber extends number | bigint = number> = utxolib.bitgo.Unspent<TNumber>;
12+
13+
type RootWalletKeys = utxolib.bitgo.RootWalletKeys;
14+
1515
type PsbtParsedScriptTypes =
1616
| 'p2sh'
1717
| 'p2wsh'

modules/abstract-utxo/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"outDir": "./dist",
55
"rootDir": "./",
66
"strictPropertyInitialization": false,
7-
"esModuleInterop": false,
7+
"esModuleInterop": true,
88
"typeRoots": ["../../types", "./node_modules/@types", "../../node_modules/@types"]
99
},
1010
"include": ["src/**/*"],

0 commit comments

Comments
 (0)