diff --git a/backend/src/api/common.ts b/backend/src/api/common.ts index 04f380418..c1c998fb8 100644 --- a/backend/src/api/common.ts +++ b/backend/src/api/common.ts @@ -292,7 +292,7 @@ export class Common { dustSize += getVarIntLength(dustSize); // add value size dustSize += 8; - if (['v0_p2wpkh', 'v0_p2wsh', 'v1_p2tr'].includes(vout.scriptpubkey_type)) { + if (Common.isWitnessProgram(vout.scriptpubkey)) { dustSize += 67; } else { dustSize += 148; diff --git a/frontend/src/app/shared/transaction.utils.ts b/frontend/src/app/shared/transaction.utils.ts index 7bc986330..6803ef489 100644 --- a/frontend/src/app/shared/transaction.utils.ts +++ b/frontend/src/app/shared/transaction.utils.ts @@ -181,7 +181,7 @@ export function isNonStandard(tx: Transaction): boolean { dustSize += getVarIntLength(dustSize); // add value size dustSize += 8; - if (['v0_p2wpkh', 'v0_p2wsh', 'v1_p2tr'].includes(vout.scriptpubkey_type)) { + if (isWitnessProgram(vout.scriptpubkey)) { dustSize += 67; } else { dustSize += 148;