Skip to content

Commit d02c35c

Browse files
OttoAllmendingerllm-git
andcommitted
feat(abstract-utxo): use internal coin impls and modern fs/promises
Use internal coin implementations from abstract-utxo instead of the sdk modules for test files. Replace fs-extra with node's fs/promises. Issue: BTC-2652 Co-authored-by: llm-git <[email protected]>
1 parent e8a1166 commit d02c35c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

modules/abstract-utxo/test/unit/recovery/mock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { bitgo } from '@bitgo/utxo-lib';
22
import { AddressInfo, TransactionIO } from '@bitgo/blockapis';
33
import * as utxolib from '@bitgo/utxo-lib';
4-
import { Bch } from '@bitgo/sdk-coin-bch';
5-
import { Bsv } from '@bitgo/sdk-coin-bsv';
64

75
import { AbstractUtxoCoin, RecoveryProvider } from '../../../src';
6+
import { Bch } from '../../../src/impl/bch';
7+
import { Bsv } from '../../../src/impl/bsv';
88

99
type Unspent<TNumber extends number | bigint = number> = bitgo.Unspent<TNumber>;
1010
export class MockRecoveryProvider implements RecoveryProvider {

modules/abstract-utxo/test/unit/util/fixtures.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'should';
22
import * as mpath from 'path';
3-
4-
import * as fs from 'fs-extra';
3+
import * as fs from 'fs/promises';
54

65
import { AbstractUtxoCoin } from '../../../src';
76

@@ -22,7 +21,7 @@ async function getFixtureWithName<T>(name: string, defaultValue: T, rawCoinName:
2221
if (e.code !== 'ENOENT') {
2322
throw e;
2423
}
25-
await fs.mkdirp(dirname);
24+
await fs.mkdir(dirname, { recursive: true });
2625
}
2726
try {
2827
let textContent = await fs.readFile(path, 'utf8');

0 commit comments

Comments
 (0)