Skip to content

Commit

Permalink
Added raw data to the transaction formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitryafanasenka committed Aug 23, 2021
1 parent 465c355 commit efadd49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/formatters/TransactionFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = (() => {

if (instruments.hasOwnProperty(position)) {
let instrument = instruments[position];
let formatted = { instrument: instrument };
let formatted = { instrument: instrument, raw: {} };

const formatterFunctions = formatters.get(transaction.type);

Expand Down Expand Up @@ -156,6 +156,8 @@ module.exports = (() => {
f.total = t.dividend.amount;
f.rate = t.dividend.rate;

f.raw.rate = t.dividend.rate.toFloat();

let shares;

if (!t.dividend.rate.getIsZero()) {
Expand Down

0 comments on commit efadd49

Please sign in to comment.