Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tx display for BTC withdrawal from BSQ wallet #2655

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -297,7 +297,7 @@ private void addSendBtcGroup() {
Transaction signedTx = bsqWalletService.signTx(txWithBtcFee);
Coin miningFee = signedTx.getFee();

if (miningFee.getValue() > receiverAmount.getValue())
if (miningFee.getValue() >= receiverAmount.getValue())
GUIUtil.showWantToBurnBTCPopup(miningFee, receiverAmount, btcFormatter);
else {
int txSize = signedTx.bitcoinSerialize().length;
Expand Down
Expand Up @@ -501,9 +501,17 @@ public void updateItem(final BsqTxListItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
TxType txType = item.getTxType();
setText(item.getConfirmations() > 0 && isValidType(txType) ?
bsqFormatter.formatCoin(item.getAmount()) :
Res.get("shared.na"));

String bsqAmount = Res.get("shared.na");

if (item.getConfirmations() > 0) {
if (isValidType(txType))
bsqAmount = bsqFormatter.formatCoin(item.getAmount());
else if (item.isWithdrawalToBTCWallet())
bsqAmount = bsqFormatter.formatBSQSatoshis(0L);
}

setText(bsqAmount);
} else
setText("");
}
Expand Down