diff --git a/SKILL.md b/SKILL.md index 0428855..7c47eb5 100644 --- a/SKILL.md +++ b/SKILL.md @@ -322,8 +322,8 @@ Manage routstrd as a system service using PM2, so it survives reboots. ## Wallet Commands -New wallets trust two mints out of the box: `https://mint.cubabitcoin.org` and -`https://mint.minibits.cash/Bitcoin`. `https://mint.cubabitcoin.org` is the +New wallets trust two mints out of the box: `https://mint.minibits.cash/Bitcoin` +and `https://mint.cubabitcoin.org`. `https://mint.minibits.cash/Bitcoin` is the default mint, and the default is used when a wallet command does not include `--mint-url`. An existing wallet keeps whatever default it already has; the shipped mints are only added as trusted, never as the default. Use @@ -400,7 +400,7 @@ Pay a Lightning invoice. ### `routstrd wallet mints list` -List configured wallet mints. Includes the mints trusted by default (`https://mint.cubabitcoin.org`, `https://mint.minibits.cash/Bitcoin`) plus any added manually. +List configured wallet mints. Includes the mints trusted by default (`https://mint.minibits.cash/Bitcoin`, `https://mint.cubabitcoin.org`) plus any added manually. ### `routstrd wallet mints add ` diff --git a/src/daemon/wallet/coco-client.test.ts b/src/daemon/wallet/coco-client.test.ts index 5c11927..959e798 100644 --- a/src/daemon/wallet/coco-client.test.ts +++ b/src/daemon/wallet/coco-client.test.ts @@ -96,9 +96,9 @@ describe("default mint functionality", () => { const mints = await client.listMints(); expect(mints).toEqual(expect.arrayContaining([...DEFAULT_TRUSTED_MINT_URLS])); - // Cuba still owns the default slot even though minibits is trusted too. + // Minibits owns the default slot even though Cuba is trusted too. const defaultMint = await client.getDefaultMint(); - expect(defaultMint).toBe("https://mint.cubabitcoin.org"); + expect(defaultMint).toBe("https://mint.minibits.cash/Bitcoin"); } finally { await client.dispose?.(); } @@ -160,18 +160,18 @@ describe("default mint functionality", () => { legacyPidPath: join(walletDir, "legacy-cocod.pid"), }); try { - // The initial default should be the auto-added Cuba mint + // The initial default should be the auto-added Minibits mint const initialDefault = await client.getDefaultMint(); - expect(initialDefault).toBe("https://mint.cubabitcoin.org"); + expect(initialDefault).toBe("https://mint.minibits.cash/Bitcoin"); // Setting the same mint should work const message = await client.setDefaultMint( - "https://mint.cubabitcoin.org", + "https://mint.minibits.cash/Bitcoin", ); - expect(message).toContain("https://mint.cubabitcoin.org"); + expect(message).toContain("https://mint.minibits.cash/Bitcoin"); const defaultMint = await client.getDefaultMint(); - expect(defaultMint).toBe("https://mint.cubabitcoin.org"); + expect(defaultMint).toBe("https://mint.minibits.cash/Bitcoin"); } finally { await client.dispose?.(); } diff --git a/src/daemon/wallet/trusted-mints.test.ts b/src/daemon/wallet/trusted-mints.test.ts index 90ac4b8..fb3312d 100644 --- a/src/daemon/wallet/trusted-mints.test.ts +++ b/src/daemon/wallet/trusted-mints.test.ts @@ -43,7 +43,7 @@ describe("seedTrustedMints", () => { expect(added).toEqual([...DEFAULT_TRUSTED_MINT_URLS]); expect(progress).toEqual([ `Adding default mint: ${DEFAULT_MINT_URL}`, - "Adding trusted mint: https://mint.minibits.cash/Bitcoin", + "Adding trusted mint: https://mint.cubabitcoin.org", ]); }); @@ -60,7 +60,7 @@ describe("seedTrustedMints", () => { it("skips mints that are already trusted", async () => { const { wallet, added } = makeHarness([ DEFAULT_MINT_URL, - "https://mint.minibits.cash/Bitcoin", + "https://mint.cubabitcoin.org", ]); await seedTrustedMints(wallet, DEFAULT_MINT_URL); @@ -71,7 +71,7 @@ describe("seedTrustedMints", () => { it("treats a trailing slash on a stored mint as already trusted", async () => { const { wallet, added } = makeHarness([ `${DEFAULT_MINT_URL}/`, - "https://mint.minibits.cash/Bitcoin/", + "https://mint.cubabitcoin.org/", ]); await seedTrustedMints(wallet, DEFAULT_MINT_URL); @@ -114,7 +114,7 @@ describe("seedTrustedMints", () => { }); it("keeps going when a non-default mint cannot be fetched", async () => { - const unavailable = "https://mint.minibits.cash/Bitcoin"; + const unavailable = "https://mint.cubabitcoin.org"; const { wallet, added, errors } = makeHarness([], [unavailable]); await seedTrustedMints(wallet, DEFAULT_MINT_URL, { diff --git a/src/daemon/wallet/trusted-mints.ts b/src/daemon/wallet/trusted-mints.ts index 9db640c..92b4925 100644 --- a/src/daemon/wallet/trusted-mints.ts +++ b/src/daemon/wallet/trusted-mints.ts @@ -5,7 +5,7 @@ import { normalizeMintUrl } from "@cashu/coco-core"; * always trusted, and a wallet is never allowed to point its default at a mint * it could not fetch. */ -export const DEFAULT_MINT_URL = "https://mint.cubabitcoin.org"; +export const DEFAULT_MINT_URL = "https://mint.minibits.cash/Bitcoin"; /** * Mints routstrd trusts out of the box. Every entry is added as a trusted mint @@ -16,7 +16,7 @@ export const DEFAULT_MINT_URL = "https://mint.cubabitcoin.org"; */ export const DEFAULT_TRUSTED_MINT_URLS: readonly string[] = [ DEFAULT_MINT_URL, - "https://mint.minibits.cash/Bitcoin", + "https://mint.cubabitcoin.org", ]; export interface TrustedMintSeeder { @@ -84,4 +84,4 @@ export async function seedTrustedMints( options.onError?.(`Could not add trusted mint ${mintUrl}`, error); } } -} \ No newline at end of file +}