Skip to content

test: dismiss confirmed-only receive sheet in boost_1 - #231

Open
jvsena42 wants to merge 3 commits into
mainfrom
fix/797-notify-confirmed-onchain-receive
Open

jvsena42 wants to merge 3 commits into
mainfrom
fix/797-notify-confirmed-onchain-receive

Conversation

@jvsena42

Copy link
Copy Markdown
Member

Companion of synonymdev/bitkit-android#1299
Part of synonymdev/bitkit-android#797

@boost_1 - Can do CPFP restores the wallet from seed, reinstalls, and only then mines the block that confirms the boosted receive. The restored wallet never saw that transaction in the mempool, so on synonymdev/bitkit-android#1299 the confirmation is its first sight of the deposit and the received sheet opens over the screen. The next step is doNavigationClose(), which fails with element ("...resourceId("HeaderMenu")") still not displayed after 30000ms.

The sheet is correct there: the wallet really did receive a transaction it had not seen before, and the restore has already finished, so neither the restore guard nor the one-hour block-timestamp guard applies. The spec is what needs to change.

This PR:

  1. Adds dismissReceivedPaymentIfShown() to test/helpers/actions.ts, a tolerant wrapper around acknowledgeReceivedPayment() that returns false instead of throwing when no sheet appears.
  2. Calls it in @boost_1 between mineBlocks(1) and doNavigationClose().

The helper is tolerant on purpose: iOS does not notify confirmed-only receives yet (synonymdev/bitkit-ios#455), and neither does Android master, so the same spec has to pass with and without the sheet. acknowledgeReceivedPaymentIfPresent() could not be reused as is, because it is strict on the local backend that this shard runs on.

@boost_2 - Can do RBF also restores and mines, and is left alone: the block there confirms the outgoing RBF transaction, and the incoming 100k was already confirmed before the restore, so no confirmed-only receive follows the restore. It passes on synonymdev/bitkit-android#1299 today.

Not run locally: the change adds one helper call and a helper that only wraps an existing one in try/catch. test/specs/boost.e2e.ts is prettier-clean; test/helpers/actions.ts had pre-existing prettier warnings before this change and the added block is formatted to the repo config.

The branch is named after the app branch so determine-e2e-branch picks it up on synonymdev/bitkit-android#1299 and that PR's e2e-tests-local - onchain_boost_receive_widgets shard runs against this spec.

@jvsena42

Copy link
Copy Markdown
Member Author

Verified on CI: synonymdev/bitkit-android#1299 resolved its e2e branch to this one and e2e-tests-local - onchain_boost_receive_widgets passed, covering @boost_1 and @boost_2. It failed on that shard before this change.

@cursor

cursor Bot commented Sep 18, 2026

Copy link
Copy Markdown

Send-shard update (required): dismissBackgroundPaymentsTimedSheet is now a waitForToastBestEffort-style poll (same change as #234), pushed on top of the existing @boost_1 helper.

Android merge-gate e2e-tests-local - send now fails 3/3 on @send_2 with element BackgroundPaymentsIntro-later still not displayed after 30000ms even when E2E_BRANCH=fix/797-notify-confirmed-onchain-receive. determine-e2e-branch resolves android#1299 to this same-named harness branch, so the send shard still ran the old hard-wait. Without this update, android#1299 stays blocked on send even after the boost_1 helper landed.

Product changes on android#1299 are unrelated; this is a harness flake (timed sheet already gone / auto-dismissed). If the intro is shown we still tap Later / Cancel; if it is missing we log and continue.

jvsena42 and others added 2 commits September 18, 2026 16:45
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Hard-waiting on BackgroundPaymentsIntro-later flakes the Android send shard when the timed sheet is already gone or auto-dismissed. Poll like waitForToastBestEffort and still dismiss Later/Cancel when the intro is shown.

Co-authored-by: piotr-iohk <piotr-iohk@users.noreply.github.com>
@cursor
cursor Bot force-pushed the fix/797-notify-confirmed-onchain-receive branch from 9494c00 to 56232dc Compare September 18, 2026 16:46
@cursor

cursor Bot commented Sep 18, 2026

Copy link
Copy Markdown

Rebased onto latest main after #233 (settings toast soft-wait) and #235 (iOS Background Payments dismiss) landed.

  • Kept João’s unique intent: dismissReceivedPaymentIfShown() + the @boost_1 call after mineBlocks(1).
  • Kept best-effort dismissBackgroundPaymentsTimedSheet (still missing from main; same helper as fix: best-effort dismiss of Background Payments intro sheet #234). This branch name is what determine-e2e-branch will use for android#1299, including the send shard.
  • Dropped the stacked test: soft-wait settings balance toasts commit — that patch is already on main via test: soft-wait settings balance toasts #233. No settings.e2e.ts changes remain on this PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 9b95a97)
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