Skip to content

Commit

Permalink
use testnet4 for mempool.space
Browse files Browse the repository at this point in the history
  • Loading branch information
bucko13 committed Sep 10, 2024
1 parent 84bf7b9 commit aab1b6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/caravan-clients/src/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ describe("BlockchainClient", () => {
type: ClientType.MEMPOOL,
network: Network.TESTNET,
});
expect(mempool.host).toEqual("https://unchained.mempool.space/testnet/api");
expect(mempool.host).toEqual(
"https://unchained.mempool.space/testnet4/api",
);
});

it("should set the signet host for a public client", () => {
Expand Down
3 changes: 3 additions & 0 deletions packages/caravan-clients/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ export class BlockchainClient extends ClientBase {
if (type !== ClientType.PRIVATE && network !== Network.MAINNET) {
host += `/${network}`;
}
if (type === ClientType.MEMPOOL && network === Network.TESTNET) {
host += "4";
}
if (type !== ClientType.PRIVATE) {
host += "/api";
}
Expand Down

0 comments on commit aab1b6a

Please sign in to comment.