Skip to content

fix(dashboard): guard pending-transactions emits against post-close StateError#678

Open
joshuakrueger-dfx wants to merge 1 commit into
RealUnitCH:developfrom
joshuakrueger-dfx:joshua/fix-657-p3-16-pending-isclosed
Open

fix(dashboard): guard pending-transactions emits against post-close StateError#678
joshuakrueger-dfx wants to merge 1 commit into
RealUnitCH:developfrom
joshuakrueger-dfx:joshua/fix-657-p3-16-pending-isclosed

Conversation

@joshuakrueger-dfx
Copy link
Copy Markdown
Collaborator

Addresses Issue #657 — Part 3, finding #16.

PendingTransactionsCubit fires an un-awaited fetch from its constructor and emits the result (or [] on error) with no isClosed guard. If the cubit is closed (page popped) before the fetch resolves, emit throws Cannot emit new states after calling close — and the catch's emit([]) throws again, uncaught. Both emits are now guarded. New RED→GREEN regression (proven), suite 4/4 green, analyze clean.

🤖 Fleet-confirmed defect, hand-finished by operator. Ref #657.

…tateError

PendingTransactionsCubit fires an un-awaited fetch from its constructor and
emits the result (or [] on error) with no isClosed guard. If the cubit is
closed (page popped) before the fetch resolves, emit throws
'Cannot emit new states after calling close' — and the catch's emit([]) throws
again, uncaught. Guard both emits with isClosed.

Regression: test/screens/dashboard/pending_transactions_cubit_test.dart
("does not emit if closed before the fetch resolves")

Issue RealUnitCH#657 — Part 3, finding RealUnitCH#16.
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