Skip to content

Commit

Permalink
Fix error handling for "tx not found" in
Browse files Browse the repository at this point in the history
getTx()
  • Loading branch information
assafmo committed Nov 9, 2023
1 parent aa22bd1 commit c569a35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/secret_network_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,10 @@ export class SecretNetworkClient {
? this.decodeTxResponse(tx_response, ibcTxOptions)
: null;
} catch (error) {
if (error?.message === `tx not found: ${hash}`) {
if (
typeof error?.message == "string" &&
error?.message?.includes(`tx not found: ${hash}`)
) {
return null;
} else {
throw error;
Expand Down

0 comments on commit c569a35

Please sign in to comment.