diff --git a/crates/cdk-fake-wallet/src/lib.rs b/crates/cdk-fake-wallet/src/lib.rs index 38d241b7..eeebfa55 100644 --- a/crates/cdk-fake-wallet/src/lib.rs +++ b/crates/cdk-fake-wallet/src/lib.rs @@ -352,7 +352,12 @@ impl MintPayment for FakeWallet { } IncomingPaymentOptions::Bolt11(bolt11_options) => { let description = bolt11_options.description.unwrap_or_default(); - let amount = bolt11_options.amount; + let amount = if unit == &CurrencyUnit::Sat { + to_unit(bolt11_options.amount, unit, &CurrencyUnit::Msat) + .unwrap_or(bolt11_options.amount * Amount::from(1000)) + } else { + bolt11_options.amount + }; let expiry = bolt11_options.unix_expiry; // Since this is fake we just use the amount no matter the unit to create an invoice