Skip to content

Commit 1d54643

Browse files
fix(utxo-ord): update assert imports for Node 22
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> TICKET: WP-5599
1 parent 7a057c2 commit 1d54643

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

modules/utxo-ord/src/inscriptions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ export function createInscriptionRevealData(
134134
const payment = createPaymentForInscription(pubkey, contentType, inscriptionData);
135135

136136
const { output: commitOutput, controlBlock } = payment;
137-
assert(commitOutput);
138-
assert(controlBlock);
139-
assert(payment.redeem?.output);
137+
assert.ok(commitOutput);
138+
assert.ok(controlBlock);
139+
assert.ok(payment.redeem?.output);
140140
const commitAddress = address.fromOutputScript(commitOutput, network);
141141

142142
const tapLeafScript: utxolib.bitgo.TapLeafScript[] = [
@@ -164,7 +164,7 @@ export function createInscriptionRevealData(
164164
export function createOutputScriptForInscription(pubkey: Buffer, contentType: string, inscriptionData: Buffer): Buffer {
165165
const payment = createPaymentForInscription(pubkey, contentType, inscriptionData);
166166

167-
assert(payment.output, 'Failed to create inscription output script');
167+
assert.ok(payment.output, 'Failed to create inscription output script');
168168
return payment.output;
169169
}
170170

modules/utxo-ord/test/psbt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('OutputLayout to PSBT conversion', function () {
8080
const values = [inscriptionUnspent, ...supplementaryUnspents].map((u) => u.value);
8181
it(`finds layout for unspents [${values}, {minimizeInputs=${minimizeInputs}]`, function () {
8282
const satPoint = inscriptionUnspent.id + ':0';
83-
assert(isSatPoint(satPoint));
83+
assert.ok(isSatPoint(satPoint));
8484
const f = () =>
8585
createPsbtForSingleInscriptionPassingTransaction(
8686
network,
@@ -108,7 +108,7 @@ describe('OutputLayout to PSBT conversion', function () {
108108
const result = findOutputLayoutForWalletUnspents(expectedUnspentSelection, satPoint, outputs, {
109109
feeRateSatKB: 1000,
110110
});
111-
assert(result);
111+
assert.ok(result);
112112
assert.deepStrictEqual(result.layout, expectedResult);
113113
const expectedOutputs = toArray(expectedResult).filter((v) => v !== BigInt(0)).length - 1;
114114
const psbt = createPsbtFromOutputLayout(network, inputBuilder, expectedUnspentSelection, outputs, result.layout);

0 commit comments

Comments
 (0)