Skip to content

Commit 188a161

Browse files
authored
Merge pull request #48 from nash-io/ts/fix-btc-addr-validation
Ts/fix btc addr validation
2 parents 80025f0 + d5166f5 commit 188a161

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
<a name="5.2.15"></a>
6+
## [5.2.15](https://github.com/nash-io/api-client-typescript/compare/v5.2.13...v5.2.15) (2020-10-23)
7+
8+
9+
510
<a name="5.2.13"></a>
611
## [5.2.13](https://github.com/nash-io/api-client-typescript/compare/v5.2.11...v5.2.13) (2020-10-05)
712

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@neon-exchange/api-client-typescript",
3-
"version": "5.2.13",
3+
"version": "5.2.15",
44
"description": "Official TypeScript client for interacting with the Nash exchange",
55
"main": "build/main/index.js",
66
"typings": "build/main/index.d.ts",

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)