Multisig proposal polling#513
Conversation
…e interceptor to guardian
…Network/quantus-apps into beast/execute-proposal-flow
Review of PR #513The PR's overall approach is right — it does not add a new polling timer. It hooks multisig proposal invalidation into the four existing refresh paths (background poll, manual refresh, silent refresh on app-resume, account switch) and reuses the existing 1. Critical:
|
…Network/quantus-apps into beast/execute-proposal-flow
…tus-Network/quantus-apps into beast/cancel-proposal-flow
…us-Network/quantus-apps into beast/multisig-proposal-polling
…us-Network/quantus-apps into beast/multisig-proposal-polling
n13
left a comment
There was a problem hiding this comment.
Review (agent-assisted, diffed against beast/cancel-proposal-flow)
Verdict: GTG — small, focused diff; three minor, non-blocking notes.
Minor
-
Manual refresh skips reconciliation on proposal-refresh failure — in
GlobalHistoryPollingService.triggerManualRefresh,await refreshActiveMultisigProposals(_ref)runs beforereconcilePendingTransactions(). If any proposal/block provider future fails, the method throws and reconciliation never runs for that refresh. The home screen catches the error, but consider try/catching the proposal refresh (or reordering) so reconciliation still happens. -
Silent catch in timezone fallback —
local_notifications_service.darthas a last-resortcatch (_) {}with no logging when even the UTC fallback fails. Per repo convention (no silent failures), this should at leastdebugPrint/telemetry the error. Also, the message'Failed to set device timezone "$e"'interpolates the exception where the timezone identifier is implied — minor wording nit. -
Transient duplicate proposal rows possible — the background poll now invalidates open proposals (
invalidateActiveMultisigProposals) independently of pending-event cleanup, so a just-indexed proposal can briefly render alongside its still-pending "Proposing…" row in the Open Proposals section until reconciliation removes the pending event. Cosmetic and self-healing, but worth knowing.
Checked and fine
multisigAccountFromActivehelper + unit tests cover multisig/regular/entrusted/null cases.- Pull-to-refresh, manual global refresh, silent refresh, and account switch all consistently route through the new
polling_refresh_scopehelpers — good DRY consolidation (also removes the deadtriggerManualRefreshinHistoryPollingManager). - Reordering polling-service registration before notification init in
AppInitializermakes listener attachment robust to notification init failures.
…Network/quantus-apps into beast/multisig-proposal-polling
* msig implementation 1 * linter fixes and package updates * Create multisig flow (#505) * feat: localize copy writing * Format and regrenate runtime apis * feat: finish create multisig flow * fix: code reviews * fix: code reviews * feat: finish adding in-flight tracking for multisig creation - reconcilate pending multisig creation - track multisig creation * feat: improve multisig creation - make nonce calculated on the fly - only show history for creator * feat: add checksum and not truncate checksum * fix: create multisig screen * fix: add logging on error * feat: improve UX multisig creation pending and details sheet * fix: preflight balance check * fix: DRY violation * fix: silent or masking bad data * fix: persisting pending multisig creation * chore: formatting * Discover multisig flow (#506) * feat: finish adding discover multisig * fix: code review issues * fix: another code review issues * feat: add checksum on discover list item * fix: listview item non properly ordered without key * feat: refactor repeating multisig graphql handling * feat: make json reading throw early instead of silently droping it. Also have intFromJson for supporting hasura stringify number. * fix: use variable instead of string interpolation * feat: propagate error as to not confuse user * Create proposal flow (#507) * wip: create proposal - finish create flow - create history of proposal * feat: improve UX of propose amount and review screen * feat: finish improving the lifecycle of proposal creation and event listing presentation * feat: address code review issues * feat: another code reviews fixes * chore: formatting * fix: dart rule violation * fix: redudancy * fix: graphql query for multisig * fix: circle dependency * feat: explicitly show failed fee fetch - add retry button - show message - silently refetch network fee unless failed * fix: reduce risk of double proposal creation * fix: handle last effort before timeout * chore: formatting * Sign proposal flow (#510) * feat: finish approve proposal flow from multisig account * feat: show approve event in signer account * feat: resolve DRY and simplicity issues * feat: best effort timout and balance refresh * chore: formatting * chore: revert constants * chore: remove dead code * Execute proposal flow (#511) * feat: finish approve proposal flow from multisig account * feat: show approve event in signer account * feat: resolve DRY and simplicity issues * feat: best effort timout and balance refresh * chore: formatting * wip: add execute flow * feat: regenerate polkadart metadata, clean up deposit field and rename interceptor to guardian * fix: live state resolution and update executed proposal UI * feat: improve UX executed proposals * chore: formatting * chore: revert constants * feat: show activity in executor * chore: formatting * chore: revert back chain url * fix: code reviews * fix: execute event query and data model * chore: revert constants * chore: formatting * Cancel proposal flow (#512) * feat: finish approve proposal flow from multisig account * feat: show approve event in signer account * feat: resolve DRY and simplicity issues * feat: best effort timout and balance refresh * chore: formatting * wip: add execute flow * feat: regenerate polkadart metadata, clean up deposit field and rename interceptor to guardian * fix: live state resolution and update executed proposal UI * feat: improve UX executed proposals * chore: formatting * chore: revert constants * feat: show activity in executor * chore: formatting * feat: add cancel proposal flow * feat: display cancel proposal event in proposer activity * chore: formatting * chore: revert constants * chore: revert back chain url * fix: code reviews * fix: execute event query and data model * chore: revert constants * chore: formatting * fix: code review issues * Multisig proposal polling (#513) * feat: finish approve proposal flow from multisig account * feat: show approve event in signer account * feat: resolve DRY and simplicity issues * feat: best effort timout and balance refresh * chore: formatting * wip: add execute flow * feat: regenerate polkadart metadata, clean up deposit field and rename interceptor to guardian * fix: live state resolution and update executed proposal UI * feat: improve UX executed proposals * chore: formatting * chore: revert constants * feat: show activity in executor * chore: formatting * feat: add cancel proposal flow * feat: display cancel proposal event in proposer activity * chore: formatting * chore: revert constants * feat: finish implementing polling and refresh proposals * chore: formatting * chore: revert back chain url * fix: code reviews * fix: execute event query and data model * chore: revert constants * chore: formatting * fix: code review issues * fix: code review issues * fix: broken initialization of timezone * chore: add debug on error * fix: code review issues --------- Co-authored-by: Nikolaus Heger <nheger@gmail.com>
Summary
Note
Low Risk
Read-only provider invalidation/refetch scoped to the active multisig account; no changes to signing, auth, or transaction submission.
Overview
Multisig proposal data now stays in sync with the same refresh paths that already update balances and transaction history when a multisig account is selected.
polling_refresh_scopegainsmultisigAccountFromActive,invalidateActiveMultisigProposals, andrefreshActiveMultisigProposals(invalidates open/past proposal providers and current block, then awaits reload). Background global history polls invalidate proposals; manual global refresh, home pull-to-refresh, silent refresh via the history polling manager, and account switch all hook into these helpers (pull-to-refresh and manual global refresh wait for fresh proposal data).Unit tests cover
multisigAccountFromActivefor multisig vs regular/entrusted/null active accounts.Reviewed by Cursor Bugbot for commit f4f175f. Configure here.