[bisq-network/bisq] Prevent dust outputs from being created during withdraw from wallet (#4093)

James Cox notifications at github.com
Sun Mar 29 02:48:36 UTC 2020


Here are some tests I found useful:

### TEST 1 - sending full wallet balance minus 1 satoshi

-  Setup - you have funds in your wallet, potentially split into more than 1 UTXO
-  Send your complete wallet balance minus 1 satoshi, option "Amount includes fee".
-  Verify that the confirmation dialog displays: Warning about dust (1 sats) added to fees;
Sending = the full amount of your wallet; Recipient will receive full amount of your wallet - fee
-  Click yes to make the transaction
-  Verify that the receiver gets full amount of your wallet - fee
-  Verify that the transaction gets confirmed on the blockchain.

### TEST 2 - avoid dusty change output (amount excludes fee)

- Setup - Set custom fee to 18 sats per byte
- Setup - you have 1 UTXO in wallet = 1.0 BTC
- Send 0.99995501, option "Amount excludes fee"
- Verify that the confirmation dialog displays: Warning about dust (431 sats) added to fees; Sending 1.0 BTC; Recipient will receive 0.99995501 BTC; Fee is 4499 sats
- Click yes to make the transaction
- Verify that the receiver 0.99995501 BTC
- Verify that the transaction gets confirmed on the blockchain.
 
    
### TEST 3 - avoid dusty change output (amount includes fee)

- Setup - Set custom fee to 18 sats per byte
- Setup - you have 1 UTXO in wallet = 1.0 BTC
- Send 0.99999999, option "Amount includes fee"
- Verify that the confirmation dialog displays:Warning about dust (1 sats) added to fees; Sending 1.0 BTC; Recipient will receive 0.99995930 BTC; Fee is 4069 sats
- Click yes to make the transaction
- Verify that the receiver gets 0.99995931 BTC
- Verify that the transaction gets confirmed on the blockchain.
 

### TEST 4 - normal transaction with change output (amount excludes fee)

- Setup - Set custom fee to 18 sats per byte
- Setup - you have 1 UTXO in wallet = 1.0 BTC
- Send 0.99990000, option "Amount excludes fee"
- Verify that the confirmation dialog displays: Sending 0.99994050 BTC; Recipient will receive 0.9999 BTC; Fee is 4050 sats
- Click yes to make the transaction
- Verify that the receiver gets 0.9999 BTC
- Verify that the transaction gets confirmed on the blockchain.


### TEST 5 - normal transaction with change output (amount includes fee)

- Setup - Set custom fee to 18 sats per byte
- Setup - you have 1 UTXO in wallet = 1.0 BTC
- Send 0.99990000, option "Amount includes fee"
- Verify that the confirmation dialog displays: Sending 0.9999 BTC; Recipient will receive 0.99985950 BTC; Fee is 4050 sats
- Click yes to make the transaction
- Verify that the receiver gets 0.9999 BTC
- Verify that the transaction gets confirmed on the blockchain.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4093#issuecomment-605550112
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200328/cd0032fd/attachment-0001.html>


More information about the bisq-github mailing list