Skip to content

Commit

Permalink
Update contact-list.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
gruve-p committed Jun 18, 2024
1 parent d0c560e commit 7371761
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions class/contact-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BIP47Factory from '@spsina/bip47';
import { SilentPayment } from 'silent-payments';

import ecc from '../blue_modules/noble_ecc';
import * as bitcoin from 'bitcoinjs-lib';
import * as bitcoin from 'groestlcoinjs-lib';

export class ContactList {
isBip47PaymentCodeValid(pc: string) {
Expand All @@ -27,7 +27,7 @@ export class ContactList {
try {
bitcoin.address.toOutputScript(address); // throws, no?

if (!address.toLowerCase().startsWith('bc1')) return true;
if (!address.toLowerCase().startsWith('grs1')) return true;
const decoded = bitcoin.address.fromBech32(address);
if (decoded.version === 0) return true;
if (decoded.version === 1 && decoded.data.length !== 32) return false;
Expand Down

0 comments on commit 7371761

Please sign in to comment.