Skip to content

Commit 23b0f15

Browse files
OttoAllmendingerllm-git
andcommitted
feat(abstract-utxo): simplify replay protection unspent check
Simplify the signature of isReplayProtectionUnspent to accept any object with an address property instead of requiring a full utxolib unspent. Issue: BTC-2916 Co-authored-by: llm-git <llm-git@ttll.de>
1 parent 3ca7432 commit 23b0f15

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

modules/abstract-utxo/src/transaction/fixedScript/replayProtection.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ export function getReplayProtectionAddresses(
4242
}
4343
}
4444

45-
export function isReplayProtectionUnspent<TNumber extends number | bigint>(
46-
u: utxolib.bitgo.Unspent<TNumber>,
47-
network: utxolib.Network
48-
): boolean {
45+
export function isReplayProtectionUnspent(u: { address: string }, network: utxolib.Network): boolean {
4946
return getReplayProtectionAddresses(network).includes(u.address);
5047
}

0 commit comments

Comments
 (0)