Skip to content

fix(idxdb-store): replace expect() with StoreError in get_transactions when tx_script is missing#24

Open
WiktorStarczewski wants to merge 1 commit intonextfrom
wiktor/migrate-2050-storeerror-txscript
Open

fix(idxdb-store): replace expect() with StoreError in get_transactions when tx_script is missing#24
WiktorStarczewski wants to merge 1 commit intonextfrom
wiktor/migrate-2050-storeerror-txscript

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

Migrated from miden-client#2050 (author: @bigeez) as part of the web-sdk split (web/WASM components moved out of miden-client into this dedicated repo — see miden-client #1992 / #2135).

Summary (per the original PR)

Replaces a .expect() panic with proper StoreError propagation in get_transactions() when a transaction has script_root set but tx_script is missing from the database.

The script_root and tx_script writes are non-atomic (two separate JS calls — idxdb_insert_transaction_script() then idxdb_upsert_transaction_record()); if one succeeds while the other fails (e.g. a JS-side error swallowed via logWebStoreError), the read path used to panic. Now it propagates a StoreError::DatabaseError through the existing Result.

The CHANGELOG and sqlite-store changes from the original PR stay on miden-client#2050.

…s when tx_script is missing

Migrated from 0xMiden/miden-client#2050 (author: bigeez) as part of the
web-sdk split. Original PR: 0xMiden/miden-client#2050
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.

1 participant