diff --git a/package.json b/package.json index addc4c2..be522fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cake-to-cointracking-converter", - "version": "4.7.0", + "version": "4.7.1", "description": "CLI script to translate Cake export data to a valid CoinTracking import", "main": "./processCsv.js", "scripts": { diff --git a/services/generateIncomeOverview.js b/services/generateIncomeOverview.js index f7b00ea..b3b315c 100644 --- a/services/generateIncomeOverview.js +++ b/services/generateIncomeOverview.js @@ -4,7 +4,7 @@ const Decimal = require('decimal.js'); const { v5: uuidv5 } = require('uuid'); // Allow extreme small numbers with exponential notation -Decimal.set({ +Decimal.set({ toExpNeg: -9e15 }); @@ -13,8 +13,8 @@ const stats = new Map(); /** * Update stats map - * - * @param {*} record + * + * @param {*} record */ const updateStats = (record) => { // Generate own uuid to identify record groups @@ -43,7 +43,11 @@ const updateStats = (record) => { case 'Referral reward': case 'Referral signup bonus': case 'Signup bonus': - case 'Promotion bonus': + case 'Promotion bonus': + case 'Entry staking wallet: Referral signup bonus': + case 'Entry staking wallet: Bonus/Airdrop': + case 'Entry staking wallet: Freezer promotion bonus': + case 'Entry staking wallet: Lending DFI Bonus': hasProducedIncome = true; break; default: @@ -80,8 +84,8 @@ const updateStats = (record) => { /** * Generate monthly income overview output - * - * @param {*} records + * + * @param {*} records */ const generateIncomeOverview = (records) => { @@ -107,19 +111,19 @@ const generateIncomeOverview = (records) => { width: 30 }, columns: { - 0: { + 0: { width: 5 }, - 1: { + 1: { width: 5 }, - 2: { + 2: { width: 15 }, - 3: { + 3: { width: 25 }, - 43: { + 43: { width: 35 } }