Export-To-Ghostfolio
Export-To-Ghostfolio copied to clipboard
XTB import fails with `TypeError: Cannot read properties of null (reading '1')`
Hello.
I'm using the latest 0.16.0 version and when I try to import the XTB transactions, I get the following error: TypeError: Cannot read properties of null (reading '1')
This is the last block of the import plus the error:
{
iD: '519422100',
type: 'Swap',
time: '21.03.2024 13:30:19',
symbol: 'DIS.US',
comment: 'Swap of position #994025001',
amount: -142.12
}
/app/src/converters/xtbConverter.ts:114
const quantity = parseFloat(match[1]);
^
TypeError: Cannot read properties of null (reading '1')
at <anonymous> (/app/src/converters/xtbConverter.ts:114:45)
Node.js v20.15.1
And on the csv, the corresponding line of the message and the next one (not sure if the error is about the block already presented or when picking the next one) is:
519422100;Swap;21.03.2024 13:30:19;DIS.US;Swap of position #994025001;-142.12
519422099;Profit/Loss (FX/CFD);21.03.2024 13:30:19;DIS.US;Profit of position #994025001;500.79