rm sixty nuts mention

This commit is contained in:
Shroominic
2026-01-20 09:46:21 +08:00
parent 9094a1a493
commit ec6a3aadf1
3 changed files with 16 additions and 9 deletions
+4 -2
View File
@@ -113,7 +113,7 @@ class TestmintWallet:
self.refund_history: List[Dict[str, Any]] = []
async def init(self) -> None:
"""Initialize the sixty_nuts wallet"""
"""Initialize the cashu wallet"""
# In mock mode, we don't actually create a real wallet
# This is just a placeholder for the mock implementation
self.wallet = None
@@ -518,7 +518,9 @@ async def integration_app(
with (
patch("routstr.core.db.engine", integration_engine),
patch.object(_settings, "cashu_mints", [mint_url]),
patch("routstr.payment.wallet.credit_balance", testmint_wallet.credit_balance),
patch(
"routstr.payment.wallet.credit_balance", testmint_wallet.credit_balance
),
patch("routstr.payment.wallet.send_token", testmint_wallet.send_token),
patch("routstr.payment.wallet.recieve_token", testmint_wallet.redeem_token),
patch("routstr.payment.wallet.get_balance", testmint_wallet.get_balance),
+9 -4
View File
@@ -1,18 +1,18 @@
"""
Real Cashu mint integration for integration tests.
This module provides a real sixty_nuts Wallet implementation that can be used
This module provides a real cashu Wallet implementation that can be used
with an actual Cashu mint instance for more thorough integration testing.
"""
import os
from typing import Optional, Tuple
from sixty_nuts import Wallet
from cashu.wallet.wallet import Wallet
class RealMintWallet:
"""Real Cashu mint wallet using sixty_nuts library"""
"""Real Cashu mint wallet using cashu library"""
def __init__(self, mint_url: str, nsec: str):
self.mint_url = mint_url
@@ -22,7 +22,12 @@ class RealMintWallet:
async def init(self) -> None:
"""Initialize the wallet connection"""
if not self._wallet:
self._wallet = await Wallet.create(nsec=self.nsec)
self._wallet = await Wallet.with_db(
self.mint_url,
db="sqlite+aiosqlite:///:memory:",
load_all_keysets=True,
unit="sat",
)
@property
def wallet(self) -> Wallet:
+3 -3
View File
@@ -9,7 +9,7 @@ import os
try:
from .real_testmint import create_real_mint_wallet
except ImportError:
# sixty_nuts not available, tests will be skipped
# cashu not available, tests will be skipped
create_real_mint_wallet = None # type: ignore
@@ -17,9 +17,9 @@ async def test_real_wallet() -> None:
"""Test basic operations with a real Cashu mint wallet"""
print("Testing real Cashu mint wallet...")
# Check if sixty_nuts dependency is available
# Check if cashu dependency is available
if create_real_mint_wallet is None:
print("sixty_nuts not available. Skipping real mint tests.")
print("cashu not available. Skipping real mint tests.")
return
# Check if real mint is enabled