[Mint] Add support for BTC and EUR in StrikeWallet backend, add EUR to FakeWallet (#561)

* strike for btc and eur

* strike works with eur

* backend check
This commit is contained in:
callebtc
2024-06-26 14:50:39 +02:00
committed by GitHub
parent 6b38ef6c29
commit 1766b6e92e
9 changed files with 86 additions and 25 deletions

View File

@@ -262,7 +262,7 @@ async def invoice(ctx: Context, amount: float, id: str, split: int, no_check: bo
wallet: Wallet = ctx.obj["WALLET"]
await wallet.load_mint()
await print_balance(ctx)
amount = int(amount * 100) if wallet.unit == Unit.usd else int(amount)
amount = int(amount * 100) if wallet.unit in [Unit.usd, Unit.eur] else int(amount)
print(f"Requesting invoice for {wallet.unit.str(amount)}.")
# in case the user wants a specific split, we create a list of amounts
optional_split = None
@@ -546,7 +546,7 @@ async def send_command(
include_fees: bool,
):
wallet: Wallet = ctx.obj["WALLET"]
amount = int(amount * 100) if wallet.unit == Unit.usd else int(amount)
amount = int(amount * 100) if wallet.unit in [Unit.usd, Unit.eur] else int(amount)
if not nostr and not nopt:
await send(
wallet,