Skip to content

Commit

Permalink
1.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rosmcmahon committed Mar 15, 2023
1 parent 01e824c commit bd82276
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arweave",
"version": "1.13.2",
"version": "1.13.3",
"description": "Arweave JS client library",
"main": "./node/index.js",
"react-native": "./node/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/common/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export default class Transactions {
}

public async getTransactionAnchor(): Promise<string> {
const res = await this.api.get<string>(`tx_anchor`)
if(!res.data.match(/^[a-z0-9_-]{43,}/i) || !res.ok){
const res = await this.api.get<string>(`tx_anchor`);
if (!res.data.match(/^[a-z0-9_-]{43,}/i) || !res.ok) {
throw new Error(
`Could not getTransactionAnchor. Received: ${res.data}. Status: ${res.status}, ${res.statusText}`
)
);
}
return res.data;
}
Expand Down

0 comments on commit bd82276

Please sign in to comment.