Skip to content

Commit d57af68

Browse files
committed
Remove 'delay' dependency
1 parent 8c59ef1 commit d57af68

File tree

5 files changed

+4
-8
lines changed

5 files changed

+4
-8
lines changed

packages/cashscript/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"@cashscript/utils": "^0.11.4",
5050
"@electrum-cash/network": "^4.1.3",
5151
"@mr-zwets/bchn-api-wrapper": "^1.0.1",
52-
"delay": "^6.0.0",
5352
"fast-deep-equal": "^3.1.3",
5453
"pako": "^2.1.0",
5554
"semver": "^7.7.2"

packages/cashscript/src/Transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
Transaction as LibauthTransaction,
55
WalletTemplate,
66
} from '@bitauth/libauth';
7-
import delay from 'delay';
87
import {
98
AbiFunction,
109
encodeBip68,
@@ -32,6 +31,7 @@ import {
3231
calculateDust,
3332
getOutputSize,
3433
utxoTokenComparator,
34+
delay,
3535
} from './utils.js';
3636
import SignatureTemplate from './SignatureTemplate.js';
3737
import { P2PKH_INPUT_SIZE } from './constants.js';

packages/cashscript/src/TransactionBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
Transaction as LibauthTransaction,
88
WalletTemplate,
99
} from '@bitauth/libauth';
10-
import delay from 'delay';
1110
import {
1211
Unlocker,
1312
Output,
@@ -24,6 +23,7 @@ import { NetworkProvider } from './network/index.js';
2423
import {
2524
cashScriptOutputToLibauthOutput,
2625
createOpReturnOutput,
26+
delay,
2727
generateLibauthSourceOutputs,
2828
validateInput,
2929
validateOutput,

packages/cashscript/src/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,3 +390,5 @@ export const isFungibleTokenUtxo = (utxo: Utxo): boolean => (
390390
);
391391

392392
export const isNonTokenUtxo = (utxo: Utxo): boolean => utxo.token === undefined;
393+
394+
export const delay = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms));

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4719,11 +4719,6 @@ defined@^1.0.0:
47194719
resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
47204720
integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=
47214721

4722-
delay@^6.0.0:
4723-
version "6.0.0"
4724-
resolved "https://registry.yarnpkg.com/delay/-/delay-6.0.0.tgz#43749aefdf6cabd9e17b0d00bd3904525137e607"
4725-
integrity sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==
4726-
47274722
delayed-stream@~1.0.0:
47284723
version "1.0.0"
47294724
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"

0 commit comments

Comments
 (0)