Skip to content

Commit

Permalink
fix: typo in Address.isRaw regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlkv committed Sep 14, 2023
1 parent f9b5ac6 commit d4c50a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## Fixed
- `Address.isRaw` invalid address regexp

## [0.52.1] - 2023-09-10

## Fixed
Expand Down
1 change: 1 addition & 0 deletions src/address/Address.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('Address', () => {
let address1 = Address.parseFriendly('0QAs9VlT6S776tq3unJcP5Ogsj-ELLunLXuOb1EKcOQi4-QO');
let address2 = Address.parseFriendly('kQAs9VlT6S776tq3unJcP5Ogsj-ELLunLXuOb1EKcOQi47nL');
let address3 = Address.parseRaw('0:2cf55953e92efbeadab7ba725c3f93a0b23f842cbba72d7b8e6f510a70e422e3');
let address4 = Address.parse('-1:3333333333333333333333333333333333333333333333333333333333333333');
expect(address1.isBounceable).toBe(false);
expect(address2.isBounceable).toBe(true);
expect(address1.isTestOnly).toBe(true);
Expand Down
2 changes: 1 addition & 1 deletion src/address/Address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class Address {
}

// hash is not valid
if (!/[a-f][0-9]+/.test(hash.toLowerCase())) {
if (!/[a-f0-9]+/.test(hash.toLowerCase())) {
return false;
}

Expand Down

0 comments on commit d4c50a8

Please sign in to comment.