Skip to content

Commit

Permalink
Small cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
dickwolff committed Jan 20, 2025
1 parent 7df1f31 commit b4d346d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This tool allows you to convert CSV transaction exports to an import file that c
- [Parqet](https://www.parqet.com/)
- [Rabobank](https://rabobank.nl)
- [Revolut](https://revolut.com)
- [Saxo](https://www.home.saxo/nl-nl)
- [Saxo](https://www.home.saxo)
- [Schwab](https://www.schwab.com)
- [Swissquote](https://en.swissquote.com/)
- [Trading 212](https://trading212.com)
Expand Down
5 changes: 4 additions & 1 deletion src/converters/saxoConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export class SaxoConverter extends AbstractConverter {

// Parse numbers to floats (from string).
if (context.column === "amount" || context.column === "conversionRate") {
if (columnValue === "") {
return 0;
}

return parseFloat(columnValue);
}

Expand Down Expand Up @@ -120,7 +124,6 @@ export class SaxoConverter extends AbstractConverter {
continue;
}

//record.event = "Buy 3 @ 134.85 USD"
const actionDetails = record.event.match(/(\d+)\s+@\s+([\d.]+)/)

// Make negative numbers (on sell records) absolute.
Expand Down

0 comments on commit b4d346d

Please sign in to comment.