aboutsummaryrefslogtreecommitdiffstats
path: root/src/wallet.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-15 21:10:56 -0700
committerAdam Soltys <[email protected]>2026-06-15 21:10:56 -0700
commit011d18f65ca7895260370bbc2d29b513705593e3 (patch)
tree28bf6f8926620e6853b643603aa8ae0efabe2043 /src/wallet.js
parent36057966438b26327285e43ee00ce4895fd179c3 (diff)
downloadcoinosv3-011d18f65ca7895260370bbc2d29b513705593e3.tar.gz
coinosv3-011d18f65ca7895260370bbc2d29b513705593e3.zip
Route explorer traffic through VPS proxy (temporary)
This IP is rate-limited/banned by mempool.space, so REST + WS now go through an nginx CORS proxy on the OVH VPS (mempool via /mp, blockstream via /bs). Controlled by a single PROXY constant in api.js — set it to '' to revert to the public explorers once the ban is lifted. Hosts are tagged by kind so fee format detection still works. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/wallet.js')
-rw-r--r--src/wallet.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wallet.js b/src/wallet.js
index 241572a..b3c6a25 100644
--- a/src/wallet.js
+++ b/src/wallet.js
@@ -16,7 +16,7 @@ import { sha256 } from '@noble/hashes/sha256';
import * as btc from '@scure/btc-signer';
import { p2wpkh } from '@scure/btc-signer/payment';
-import { Api, pool } from './api.js';
+import { Api, pool, wsUrl } from './api.js';
// No look-ahead: stop scanning a chain at the first unused address. This wallet
// only ever exposes ONE unused address at a time (freshReceive = first unused;
@@ -481,9 +481,7 @@ export class Wallet {
// Pushes us new mempool/confirmed transactions for our addresses so history
// and balances update with no polling.
wsUrl() {
- return this.netName === 'testnet'
- ? 'wss://mempool.space/testnet/api/v1/ws'
- : 'wss://mempool.space/api/v1/ws';
+ return wsUrl(this.netName);
}
// Addresses worth watching: those holding coins (to catch spends) plus a