diff --git a/src/services/main/sanityChecker.ts b/src/services/main/sanityChecker.ts index 69251f75..6ef7419a 100644 --- a/src/services/main/sanityChecker.ts +++ b/src/services/main/sanityChecker.ts @@ -36,7 +36,7 @@ export default class SanityChecker { return { type: fullData, data: fullData } } else if (LN_INVOICE_REGEX.test(fullData)) { return { type: 'invoice', data: fullData } - } else if (BITCOIN_ADDRESS_REGEX.test(fullData)) { + } else if (BITCOIN_ADDRESS_REGEX.test(fullData) || fullData.startsWith("bcrt1")) { return { type: 'address', data: fullData } } else { return { type: 'u2u', data: fullData } @@ -45,7 +45,7 @@ export default class SanityChecker { const [prefix, data] = parts if (prefix === 'routing_fee_refund' || prefix === 'payment_refund') { return { type: prefix, data } - } else if (BITCOIN_ADDRESS_REGEX.test(prefix)) { + } else if (BITCOIN_ADDRESS_REGEX.test(prefix) || prefix.startsWith("bcrt1")) { return { type: 'address', data: prefix, txHash: data } } else { return { type: 'u2u', data: prefix, serialId: +data }