Skip to content

Commit 63c40b8

Browse files
committed
allow for different lengths of btc addr
1 parent 80025f0 commit 63c40b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ export const detectBlockchain = (address: string): Blockchain | null => {
6161
return Blockchain.NEO
6262
}
6363
if (
64-
/^1[a-zA-Z0-9]{33}$/.test(address) ||
65-
/^3[a-zA-Z0-9]{33}$/.test(address) ||
66-
/^bc1[a-zA-Z0-9]{39}$/.test(address)
64+
/^1[a-zA-Z0-9]{25,35}$/.test(address) ||
65+
/^3[a-zA-Z0-9]{25,35}$/.test(address) ||
66+
/^bc1[a-zA-Z0-9]{39,64}$/.test(address)
6767
) {
6868
return Blockchain.BTC
6969
}

0 commit comments

Comments
 (0)