Skip to content

Commit

Permalink
fix: when exporting in another ccy then received, table still showed …
Browse files Browse the repository at this point in the history
…received ledger ccy
  • Loading branch information
rsteimen committed Aug 17, 2022
1 parent 0d33e01 commit 682a415
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public Object getValueAt(int row, int col) {
} else if (getColumnIndex(COL_AMOUNT) == col) {
return item.getAmount(actor);
} else if (getColumnIndex(COL_CCY) == col) {
return item.getCcy(actor);
return item.getCcy();
} else if (getColumnIndex(COL_TRX_STATUS) == col) {
return item.payment.getTransmission();
} else if (getColumnIndex(COL_DETAIL) == col) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ public void setAmount(Double value) {
amount = value;
}

public Object getCcy(Actor actor) {
return actor == Actor.Sender ? payment.getFiatCcy() : payment.getLedgerCcy();
public Object getCcy() {
// When exporting 'As received" return received ccy instance to let user know more about issuer.
return payment.getLedgerCcy().getCcy().equals(payment.getFiatCcy())
? payment.getLedgerCcy()
: payment.getFiatCcy();
}

@Override
Expand Down

0 comments on commit 682a415

Please sign in to comment.