Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteimen committed Feb 24, 2023
2 parents 0b07430 + 258282a commit ec7e148
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ public WalletInfo[] list(Wallet wallet) throws WalletInfoLookupException {
var list = new ArrayList<WalletInfo>();

for (var o : trustlineCache.get(WalletConverter.from(wallet))) {
var limitText = MoneyFormatter.formatFiat(o.getLimit());
var sb = new StringBuilder();
var ccy = o.getLimit().getCcy();
sb.append(String.format("%s (%s)", ccy.getCode(), toText(ccy.getIssuer())));
sb.append(", limit: " + MoneyFormatter.formatFiat(o.getLimit()));
var transferFeeText = CurrencyFormatter.formatTransferFee(ccy);
var value = String.format("%s (%s), limit: %s, transfer fee: %s", ccy.getCode(), toText(ccy.getIssuer()), limitText, transferFeeText);
list.add(new WalletInfo(this, "", value, 50));
if (transferFeeText.length() > 0) {
sb.append(", transfer fee: " + transferFeeText);
}
list.add(new WalletInfo(this, "", sb.toString(), 50));
}

return list.toArray(new WalletInfo[0]);
Expand Down

0 comments on commit ec7e148

Please sign in to comment.