Skip to content

Commit

Permalink
Fix (another) error case in getTx()
Browse files Browse the repository at this point in the history
  • Loading branch information
assafmo committed Nov 20, 2023
1 parent 457e249 commit 98235bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog & Version Info

## 1.12.2

Fix (another case of) error handling for "tx not found" in `getTx()`

## 1.12.1

Fix error handling for "tx not found" in `getTx()`
Expand Down
4 changes: 3 additions & 1 deletion src/secret_network_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,9 @@ export class SecretNetworkClient {
} catch (error) {
if (
typeof error?.message == "string" &&
error?.message?.includes(`tx not found: ${hash}`)
(error?.message as String).match(
new RegExp(`tx not found:.+?${hash}`, "i"),
) !== null
) {
return null;
} else {
Expand Down

0 comments on commit 98235bf

Please sign in to comment.