Skip to content

Commit

Permalink
referenced xhr2 to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
niyid committed Dec 18, 2024
1 parent b260268 commit 3d3e249
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
22 changes: 19 additions & 3 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
Expand Up @@ -17,6 +17,6 @@
"typescript": "^5.7.2"
},
"dependencies": {
"haveno-ts": "^0.0.30"
"haveno-ts": "file:../haveno-ts/haveno-ts-0.0.30.tgz"
}
}
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import XMLHttpRequest from "xhr2"; // Import the class directly
(global as any).XMLHttpRequest = XMLHttpRequest;

import { HavenoClient } from "haveno-ts";

main();
Expand All @@ -10,4 +13,4 @@ async function main() {
// get available balance
const balances = await client.getBalances();
console.log("Available balance: " + balances.getAvailableBalance());
}
}

0 comments on commit 3d3e249

Please sign in to comment.