PaymentOutput.sats is optional; paymentOutputsToTxOutputs
already defaults omitted sats to dustSats. _buildSizeLimitExceededChained
treated omitted sats as 0n (or assumed they were set), so a large XEC
action with default-dust recipients undercounted the chain and failed
to build. Use output.sats ?? dustSats, throw only if the output itself
is missing, and pass dustSats through the inner chain actions so
recipients keep the action dust value.
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABCa7ebe3f7be25: [ecash-wallet] Default omitted sats to dust in chained XEC builds
- cd modules/ecash-wallet && npm test
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) Program close to the problem domain. Design and code in your user's language.
────────────────────────────────────────────────────────────────────────
major [Functional Correctness] → ]8;;vscode://file//work/modules/ecash-wallet/src/wallet.ts:2208modules/ecash-wallet/src/wallet.ts:2208-2209]8;; Use the configured dust threshold for user change. Line 2170 decides whether to create user change with DEFAULT_DUST_SATS. These lines now pass a custom dustSats to the chain-alpha action. If userChange is 700 sats and dustSats is 1000 sats, the chain creates a 700-sat user-change output instead of treating it as below the configured threshold. Use dustSats in the needsUserChange condition. Add a regression test with userChange between the default and configured dust values. Proposed fix - const needsUserChange = userChange >= DEFAULT_DUST_SATS; + const needsUserChange = userChange >= dustSats;
────────────────────────────────────────
Review complete
1 finding ✔
Major 1
2 files reviewed:
- modules/ecash-wallet/src/wallet.test.ts
- modules/ecash-wallet/src/wallet.ts
────────────────────────────────────────
Print all AI prompts: coderabbit review --show-prompts
Honor action dustSats when deciding chained alpha user change. Slice remaining outputs from the action-output count so a below-dust leftover does not duplicate an alpha output onto omega.
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) Dr. CodeRabbit, or: How I Learned to Stop Worrying and Love the Code Review.
────────────────────────────────────────────────────────────────────────
major [Data Integrity & Integration] → ]8;;vscode://file//work/modules/ecash-wallet/src/wallet.ts:2124modules/ecash-wallet/src/wallet.ts:2124-2128]8;; Normalize omitted sats before UTXO updates. These calls allow chained outputs with omitted sats. If one such recipient uses a wallet script, the transaction output has dustSats, but the paymentOutputs entry passed to _updateUtxosAfterSuccessfulBuild still has sats: undefined. getWalletUtxoFromOutput then throws after removeSpentUtxos has removed the input. _getBuiltAction catches that error as a failed build, leaving the in-memory UTXO set incomplete. Resolve sats on finalized payment outputs before mutation, or use the built transaction output value during UTXO creation. Add a chained self-recipient regression test with omitted sats. Also applies to: 2143-2146, 2274-2280
────────────────────────────────────────
Review complete
1 finding ✔
Major 1
2 files reviewed:
- modules/ecash-wallet/src/wallet.test.ts
- modules/ecash-wallet/src/wallet.ts
────────────────────────────────────────
Print all AI prompts: coderabbit review --show-prompts
Fill omitted sats on finalizeOutputs paymentOutputs so a chained self-send does not throw in getWalletUtxoFromOutput after removeSpentUtxos. Add chained self-recipient and finalizeOutputs regression tests.
Tail of the build log:
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/cashtab-faucet-tests
Lockfile is up to date, resolution step is skipped
Done in 808ms using pnpm v10.24.0
> ecashaddrjs@2.0.1 build /work/modules/ecashaddrjs
> tsc
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/cashtab-faucet-tests
Scope: 2 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 842ms using pnpm v10.24.0
> chronik-client@4.3.0 build /work/modules/chronik-client
> tsc
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/cashtab-faucet-tests
Scope: 4 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 843ms using pnpm v10.24.0
> ecash-lib@4.13.0 build /work/modules/ecash-lib
> tsc && tsc -p ./tsconfig.build.json && rm -rf ./dist/ffi && cp -r ./src/ffi ./dist
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/cashtab-faucet-tests
Scope: 6 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 853ms using pnpm v10.24.0
> ecash-wallet@6.1.0 build /work/modules/ecash-wallet
> tsc -p ./tsconfig.build.json
src/wallet.ts(5902,13): error TS2322: Type 'PaymentOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is missing the following properties from type '{ sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }': tokenId, atoms, isMintBaton
src/wallet.ts(6016,19): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
src/wallet.ts(6044,29): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
/work/modules/ecash-wallet:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL ecash-wallet@6.1.0 build: `tsc -p ./tsconfig.build.json`
Exit status 2
Build cashtab-faucet-tests failed with exit code 2Tail of the build log:
Lockfile is up to date, resolution step is skipped
Done in 867ms using pnpm v10.24.0
> ecashaddrjs@2.0.1 build /work/modules/ecashaddrjs
> tsc
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/ecash-agora-integration-tests
Scope: 2 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 808ms using pnpm v10.24.0
> chronik-client@4.3.0 build /work/modules/chronik-client
> tsc
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/ecash-agora-integration-tests
Scope: 4 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 845ms using pnpm v10.24.0
> ecash-lib@4.13.0 build /work/modules/ecash-lib
> tsc && tsc -p ./tsconfig.build.json && rm -rf ./dist/ffi && cp -r ./src/ffi ./dist
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/ecash-agora-integration-tests
Scope: 6 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
. | +2 +
Progress: resolved 2, reused 0, downloaded 2, added 2, done
Done in 1s using pnpm v10.24.0
> ecash-wallet@6.1.0 build /work/modules/ecash-wallet
> tsc -p ./tsconfig.build.json
src/wallet.ts(5902,13): error TS2322: Type 'PaymentOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is missing the following properties from type '{ sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }': tokenId, atoms, isMintBaton
src/wallet.ts(6016,19): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
src/wallet.ts(6044,29): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
/work/modules/ecash-wallet:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL ecash-wallet@6.1.0 build: `tsc -p ./tsconfig.build.json`
Exit status 2
Build ecash-agora-integration-tests failed with exit code 2Tail of the build log:
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/alp-dex-tests
Lockfile is up to date, resolution step is skipped
Done in 840ms using pnpm v10.24.0
> ecashaddrjs@2.0.1 build /work/modules/ecashaddrjs
> tsc
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/alp-dex-tests
Scope: 2 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 804ms using pnpm v10.24.0
> chronik-client@4.3.0 build /work/modules/chronik-client
> tsc
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/alp-dex-tests
Scope: 4 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 829ms using pnpm v10.24.0
> ecash-lib@4.13.0 build /work/modules/ecash-lib
> tsc && tsc -p ./tsconfig.build.json && rm -rf ./dist/ffi && cp -r ./src/ffi ./dist
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/alp-dex-tests
Scope: 6 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 842ms using pnpm v10.24.0
> ecash-wallet@6.1.0 build /work/modules/ecash-wallet
> tsc -p ./tsconfig.build.json
src/wallet.ts(5902,13): error TS2322: Type 'PaymentOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is missing the following properties from type '{ sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }': tokenId, atoms, isMintBaton
src/wallet.ts(6016,19): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
src/wallet.ts(6044,29): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
/work/modules/ecash-wallet:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL ecash-wallet@6.1.0 build: `tsc -p ./tsconfig.build.json`
Exit status 2
Build alp-dex-tests failed with exit code 2Tail of the build log:
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/cashtab-tests
Lockfile is up to date, resolution step is skipped
Done in 820ms using pnpm v10.24.0
> ecashaddrjs@2.0.1 build /work/modules/ecashaddrjs
> tsc
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/cashtab-tests
Scope: 2 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 911ms using pnpm v10.24.0
> chronik-client@4.3.0 build /work/modules/chronik-client
> tsc
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/cashtab-tests
Scope: 4 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 833ms using pnpm v10.24.0
> ecash-lib@4.13.0 build /work/modules/ecash-lib
> tsc && tsc -p ./tsconfig.build.json && rm -rf ./dist/ffi && cp -r ./src/ffi ./dist
Preparing pnpm@10.24.0 for immediate activation...
/work /work/abc-ci-builds/cashtab-tests
Scope: 6 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 824ms using pnpm v10.24.0
> ecash-wallet@6.1.0 build /work/modules/ecash-wallet
> tsc -p ./tsconfig.build.json
src/wallet.ts(5902,13): error TS2322: Type 'PaymentOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is missing the following properties from type '{ sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }': tokenId, atoms, isMintBaton
src/wallet.ts(6016,19): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
src/wallet.ts(6044,29): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
/work/modules/ecash-wallet:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL ecash-wallet@6.1.0 build: `tsc -p ./tsconfig.build.json`
Exit status 2
Build cashtab-tests failed with exit code 2Tail of the build log:
[596/604] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/paymentrequestplus.cpp.o
[597/604] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletview.cpp.o
[598/604] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrc_bitcoin.cpp.o
[599/604] Linking CXX executable src/bench/bitcoin-bench
[600/604] Linking CXX static library src/qt/libbitcoin-qt-base.a
[601/604] Automatic MOC for target bitcoin-qt
[602/604] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.o
[603/604] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.o
[604/604] Linking CXX executable src/qt/bitcoin-qt
/work /work/abc-ci-builds/ecash-wallet-integration-tests
Scope: all 26 workspace projects
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +1578
Progress: resolved 1578, reused 99, downloaded 318, added 269
Progress: resolved 1578, reused 99, downloaded 886, added 1000
Progress: resolved 1578, reused 99, downloaded 1317, added 1387
Progress: resolved 1578, reused 99, downloaded 1462, added 1578, done
╭ Warning ─────────────────────────────────────────────────────────────────────╮
│ │
│ Ignored build scripts: @firebase/util, core-js, cypress, esbuild, │
│ styled-components. │
│ Run "pnpm approve-builds" to pick which dependencies should be allowed │
│ to run scripts. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Done in 6.4s using pnpm v10.24.0
Scope: 6 of 26 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 1s using pnpm v10.24.0
/work/abc-ci-builds/ecash-wallet-integration-tests
/work/modules/ecash-wallet /work/abc-ci-builds/ecash-wallet-integration-tests
> ecash-wallet@6.1.0 build /work/modules/ecash-wallet
> tsc -p ./tsconfig.build.json
src/wallet.ts(5902,13): error TS2322: Type 'PaymentOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; }' is missing the following properties from type '{ sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }': tokenId, atoms, isMintBaton
src/wallet.ts(6016,19): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
src/wallet.ts(6044,29): error TS2677: A type predicate's type must be assignable to its parameter's type.
Type 'PaymentTokenOutput' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: undefined; address: string; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; } | { ...; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script | undefined; address?: undefined; } | { sats: bigint; script?: Script | undefined; address?: undefined; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Type '{ sats?: bigint | undefined; script?: Script | undefined; address?: undefined; } & { tokenId: string; atoms: bigint; isMintBaton: boolean; }' is not assignable to type '{ sats: bigint; script?: Script; address?: never; tokenId: string; atoms: bigint; isMintBaton: boolean; }'.
Types of property 'sats' are incompatible.
Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
ELIFECYCLE Command failed with exit code 2.
Build ecash-wallet-integration-tests failed with exit code 2Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) Your code has 99 problems and bug fixes ain't none of 'em.
────────────────────────────────────────
Review complete
No findings ✔
2 files reviewed:
- modules/ecash-wallet/src/wallet.test.ts
- modules/ecash-wallet/src/wallet.ts
────────────────────────────────────────
Keep PaymentOutput[] typing when filling omitted sats: mutate the copy in place instead of spreading sats into a new object literal, which broke tsc.
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) I don't chase bugs; they surrender.
────────────────────────────────────────
Review complete
No findings ✔
2 files reviewed:
- modules/ecash-wallet/src/wallet.test.ts
- modules/ecash-wallet/src/wallet.ts
────────────────────────────────────────
| modules/ecash-wallet/src/wallet.ts | ||
|---|---|---|
| 2067 ↗ | (On Diff #61048) | this is the default behavior on other paths, but was missed in this path |