Merge pull request #2643 from devinbileck/update-insufficient-funds-warning-for-proposal

Update insufficient BTC warning for issuance proposals
This commit is contained in:
Manfred Karrer 2019-04-04 18:28:37 -05:00 committed by GitHub
commit 32264070b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View file

@ -1846,8 +1846,14 @@ dao.proposal.create.missingBsqFundsForBond=You don''t have sufficient BSQ funds
Missing: {0}
dao.proposal.create.missingMinerFeeFunds=You don''t have sufficient BTC funds for creating the proposal transaction. \
Any BSQ transaction require also a miner fee in BTC.\n\
All BSQ transactions require a miner fee in BTC.\n\
Missing: {0}
dao.proposal.create.missingIssuanceFunds=You don''t have sufficient BTC funds for creating the proposal transaction. \
All BSQ transactions require a miner fee in BTC, and issuance transactions also require BTC for the requested BSQ \
amount ({0} Satoshis/BSQ).\n\
Missing: {1}
dao.feeTx.confirm=Confirm {0} transaction
dao.feeTx.confirm.details={0} fee: {1}\n\
Mining fee: {2} ({3} Satoshis/byte)\n\

View file

@ -310,8 +310,14 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
new Popup<>().warning(Res.get("dao.proposal.create.missingBsqFunds",
bsqFormatter.formatCoinWithCode(e.missing))).show();
} else {
new Popup<>().warning(Res.get("dao.proposal.create.missingMinerFeeFunds",
btcFormatter.formatCoinWithCode(e.missing))).show();
if (type.equals(ProposalType.COMPENSATION_REQUEST) || type.equals(ProposalType.REIMBURSEMENT_REQUEST)) {
new Popup<>().warning(Res.get("dao.proposal.create.missingIssuanceFunds",
100,
btcFormatter.formatCoinWithCode(e.missing))).show();
} else {
new Popup<>().warning(Res.get("dao.proposal.create.missingMinerFeeFunds",
btcFormatter.formatCoinWithCode(e.missing))).show();
}
}
} catch (ProposalValidationException e) {
String message;