mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-23 14:06:56 +01:00
fakewallet: convert sat to msat (#899)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user