diff --git a/make_post_sell/lib/crypto_watcher/__init__.py b/make_post_sell/lib/crypto_watcher/__init__.py index 14a4fce..17b5e97 100644 --- a/make_post_sell/lib/crypto_watcher/__init__.py +++ b/make_post_sell/lib/crypto_watcher/__init__.py @@ -1094,10 +1094,16 @@ def auto_sweep_payment_doge(client, crypto_payment: CryptoPayment, dbsession=Non ) # Send the sweep transaction - tx_hash = client.sendtoaddress( - crypto_payment.shop_sweep_to_address, - float(sweep_amount), - f"Sweep for invoice {crypto_payment.invoice.id}", + # Use subtractfeefromamount=True so network fee is deducted from the sweep amount + tx_hash = client._call( + "sendtoaddress", + [ + crypto_payment.shop_sweep_to_address, + float(sweep_amount), + f"Sweep for invoice {crypto_payment.invoice.id}", + "", # comment_to + True, # subtractfeefromamount + ], ) if tx_hash: