diff --git a/crates/xxi-node/src/on_chain_wallet.rs b/crates/xxi-node/src/on_chain_wallet.rs index 79cdad7ec..c9a1e651d 100644 --- a/crates/xxi-node/src/on_chain_wallet.rs +++ b/crates/xxi-node/src/on_chain_wallet.rs @@ -299,7 +299,7 @@ where amount_sat_or_drain: u64, fee_config: FeeConfig, ) -> Result { - if amount_sat_or_drain.is_dust(&recipient.script_pubkey()) { + if amount_sat_or_drain > 0 && amount_sat_or_drain.is_dust(&recipient.script_pubkey()) { bail!("Send amount below dust: {amount_sat_or_drain} sat"); } diff --git a/mobile/lib/features/wallet/application/wallet_service.dart b/mobile/lib/features/wallet/application/wallet_service.dart index 124b0ff2d..b0b6b0e3b 100644 --- a/mobile/lib/features/wallet/application/wallet_service.dart +++ b/mobile/lib/features/wallet/application/wallet_service.dart @@ -72,7 +72,7 @@ class WalletService { Future sendOnChainPayment(Destination destination, Amount? amount, {FeeConfig? feeConfig}) { var feeConfigApi = feeConfig!.toAPI(); - var sats = amount!.sats; + var sats = amount?.sats ?? 0; var address = destination.raw; logger.i("Sending payment of $amount to $address with fee $feeConfigApi");