Skip to content

Fix Bitwave CSV export issues - #6131

Merged
j0ntz merged 2 commits into
developfrom
jon/bitwave-csv-export-fixes
Aug 6, 2026
Merged

j0ntz merged 2 commits into
developfrom
jon/bitwave-csv-export-fixes

Conversation

@j0ntz

@j0ntz j0ntz commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Asana task

Fixes the four Bitwave CSV export issues tracked on CSV - Bitwave Export issues. Bitwave changed its import requirements, so the export no longer matched what its importer accepts, and one input defect corrupted the account id.

Timestamps use ISO 8601 UTC (subtask). makeBitwaveDateTime emitted MM/DD/YY HH:MM; it now emits YYYY-MM-DDTHH:MM:SSZ (4-digit year, T separator, seconds, trailing Z).

Fee columns stay blank (subtask). Column G (fee) and column H (feeTicker) now export as empty strings for every transaction. Bitwave calculates fees itself, so populated columns duplicated them after import. Dropping them leaves the wallet and parentMultiplier arguments unused, so those are removed along with the scene prop that supplied parentMultiplier.

Custom metadata 2 mirrors the description (subtask). Column W (metadata:myCustomMetadata2) was the transaction notes; it now carries the same value as column R (description). The notes are still exported in column K (memo), so nothing is lost.

Account id keeps the case and spacing it was entered with (subtask). Root cause: the account-id TextInputModal never passed autoCapitalize, TextInputModal forwards that undefined to ModalFilledTextInput, and FilledTextInput only defaults it to 'none' for secure inputs. So React Native's iOS default of sentences applied and capitalized the first character, turning pgM8cDt7bySnWTzs2MyI into PgM8cDt7bySnWTzs2MyI. The value was then persisted to disklet and reused as the modal's initial value, which is why the correction had to be reapplied at every import rather than sticking. The modal now passes autoCapitalize="none", and the entered value is trimmed since a pasted id often carries surrounding whitespace.

Column letters map to the row object's key order, which csv-stringify uses for the header: A id … G fee, H feeTicker, I time, M accountId, R description, W metadata:myCustomMetadata2.

Tests: src/__tests__/exportBitwaveResult.csv is a reference output file compared against the whole export, matching the existing CSV and QBO reference-file tests. Four further tests assert the individual behaviors above, each checking the header name at the column index it uses first, so a reordered row object fails loudly instead of silently invalidating the assertions.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Driven end to end on the iOS simulator against the edge-funds My Zano wallet: Export Transactions → Bitwave CSV → account id → share sheet. The exported file was pulled off the device and parsed; across all 7 real transactions columns G and H are empty, every timestamp matches ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$, column W equals column R, and column M is exactly pgM8cDt7bySnWTzs2MyI. tsc, eslint (0 errors) and the full jest suite (95 suites, 576 tests) pass.


Note

Low Risk
Scoped to transaction export formatting and Bitwave account-id input; no auth, payments, or core wallet logic changes.

Overview
Updates Bitwave CSV export so imports match Bitwave’s current rules: time is ISO 8601 UTC (YYYY-MM-DDTHH:MM:SSZ) instead of MM/DD/YY HH:MM, fee and feeTicker are always empty so Bitwave doesn’t double-count fees, and metadata:myCustomMetadata2 duplicates description (transaction name) instead of notes (notes remain in memo).

exportTransactionsToBitwave no longer takes the wallet or parent fee multiplier—only accountId, transactions, currency, and exchange multiplier. The export scene collects the Bitwave account id with autoCapitalize="none" and trims pasted values so ids aren’t corrupted on iOS or by whitespace.

Adds a reference CSV fixture plus focused tests (timestamps, blank fees, metadata, account id). Small TypeScript tweaks in CSV/QBO export paths and the export scene; those files are dropped from an eslint override list.

Reviewed by Cursor Bugbot for commit 4e88627. Bugbot is set up for automated code reviews on this repo. Configure here.

@j0ntz

j0ntz commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor Author

📸 Test evidence

export scene bitwave enabled

export scene bitwave enabled

account id preserved lowercase

account id preserved lowercase

bitwave csv exported share sheet

bitwave csv exported share sheet

before fix keyboard autocapitalized

before fix keyboard autocapitalized

Captured by the agent's in-app test run (build-and-test).

@j0ntz
j0ntz marked this pull request as ready for review August 3, 2026 20:49
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@peachbits peachbits left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We currently test the csv and qbo output files let's add a bitwave file test as well

@j0ntz

j0ntz commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Added src/__tests__/exportBitwaveResult.csv plus an export Bitwave matches reference data test, mirroring the existing CSV and QBO reference-file tests: the same 7-transaction fixture goes through exportTransactionsToBitwave and the whole output file is compared. The four property-based Bitwave tests stay, since they name the specific acceptance criteria (blank fee columns, ISO 8601 UTC time, description mirrored into metadata:myCustomMetadata2, exact account id).

Add explicit return types, replace truthy checks on nullable denominations
with explicit null checks, and type catch callback variables as unknown.
@j0ntz
j0ntz force-pushed the jon/bitwave-csv-export-fixes branch from 148388c to 2baeeb1 Compare August 6, 2026 20:18
@j0ntz
j0ntz enabled auto-merge August 6, 2026 20:19
@j0ntz j0ntz closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 20:37

Pull request was closed

@j0ntz j0ntz reopened this Aug 6, 2026
@j0ntz
j0ntz enabled auto-merge August 6, 2026 20:43
Bitwave changed its import requirements, so the export no longer matched
what the importer accepts:

- Timestamps use ISO 8601 UTC (YYYY-MM-DDTHH:MM:SSZ) instead of MM/DD/YY HH:MM.
- The fee and fee ticker columns stay blank, since Bitwave now calculates
  fees itself and populated columns duplicate them after import.
- The custom metadata 2 column mirrors the description column.
- The account id keeps the case and spacing it was entered with. The input
  modal inherited the platform default of capitalizing the first character,
  which silently corrupted ids beginning with a lowercase letter and forced
  a manual fix on every import.

Dropping the fee columns leaves the wallet and parent multiplier arguments
unused, so they are removed along with the scene prop that supplied them.
@j0ntz
j0ntz force-pushed the jon/bitwave-csv-export-fixes branch from 2baeeb1 to 4e88627 Compare August 6, 2026 20:45
@j0ntz
j0ntz disabled auto-merge August 6, 2026 21:14
@j0ntz
j0ntz merged commit 7f3c4f8 into develop Aug 6, 2026
5 of 6 checks passed
@j0ntz
j0ntz deleted the jon/bitwave-csv-export-fixes branch August 6, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants