Add more data to summary msg

This commit is contained in:
chimp1984 2020-09-12 16:19:42 -05:00
parent 48066ae124
commit 0c46e7dd52
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3
2 changed files with 34 additions and 6 deletions

View File

@ -2459,12 +2459,15 @@ disputeSummaryWindow.reason.TRADE_ALREADY_SETTLED=Trade already settled
disputeSummaryWindow.summaryNotes=Summary notes
disputeSummaryWindow.addSummaryNotes=Add summary notes
disputeSummaryWindow.close.button=Close ticket
disputeSummaryWindow.close.msg=Ticket closed on {0}\n\n\
Summary:\n\
Payout amount for BTC buyer: {1}\n\
Payout amount for BTC seller: {2}\n\n\
Reason for dispute: {3}\n\n\
Summary notes:\n{4}
disputeSummaryWindow.close.msg=Ticket for trade {0} closed on {1}\n\
{2} node address: {3}\n\n\
Summary:\n\
Traded currency: {4}\n\
Trade amount: {5}\n\
Payout amount for BTC buyer: {6}\n\
Payout amount for BTC seller: {7}\n\n\
Reason for dispute: {8}\n\n\
Summary notes:\n{9}
disputeSummaryWindow.close.msgWithSigAndPubKey={0}{1}\
Signer node address: {2}\n\

View File

@ -803,8 +803,33 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
dispute.setIsClosed(true);
DisputeResult.Reason reason = disputeResult.getReason();
/* disputeSummaryWindow.close.msg=Ticket for trade {0} closed on {1}\n\n\
{2} node address: {3}\n\
Summary:\n\
Payout amount for BTC buyer: {4}\n\
Payout amount for BTC seller: {5}\n\n\
Reason for dispute: {6}\n\n\
Summary notes:\n{7}
.append("Currency: ")
.append(CurrencyUtil.getNameAndCode(contract.getOfferPayload().getCurrencyCode()))
.append("\n")
.append("Trade amount: ")
.append(contract.getTradeAmount().toFriendlyString())
*/
String role = isRefundAgent ? Res.get("shared.refundAgent") : Res.get("shared.mediator");
String agentNodeAddress = checkNotNull(disputeManager.getAgentNodeAddress(dispute)).getFullAddress();
Contract contract = dispute.getContract();
String currencyCode = contract.getOfferPayload().getCurrencyCode();
String amount = formatter.formatCoinWithCode(contract.getTradeAmount());
String textToSign = Res.get("disputeSummaryWindow.close.msg",
dispute.getShortTradeId(),
DisplayUtils.formatDateTime(disputeResult.getCloseDate()),
role,
agentNodeAddress,
currencyCode,
amount,
formatter.formatCoinWithCode(disputeResult.getBuyerPayoutAmount()),
formatter.formatCoinWithCode(disputeResult.getSellerPayoutAmount()),
Res.get("disputeSummaryWindow.reason." + reason.name()),