Skip to content

fix(fund): show a clear 'verification in progress' state instead of nagging KYC#1670

Merged
mellelieuwes merged 2 commits into
developfrom
fix/kyc-verification-waiting-state
Jul 23, 2026
Merged

fix(fund): show a clear 'verification in progress' state instead of nagging KYC#1670
mellelieuwes merged 2 commits into
developfrom
fix/kyc-verification-waiting-state

Conversation

@mellelieuwes

Copy link
Copy Markdown
Contributor

Summary

  • After the participant finishes iDEAL, the payment provider puts the bank account into a review state (`"pending"`) but often keeps returning a `verification_url`. `prepare_payout` matched by URL first and returned `{:error, {:kyc_required, ...}}` — so the home page kept showing the "please verify your bank account" modal for the several minutes the provider needs to review, even though the participant had done everything they could.
  • Fix at the domain: match on the bank status first — `"new"` is the only actionable state; any other non-approved status means the provider is reviewing — and return a new `{:error, :awaiting_verification}` branch.
  • Fix at the UI: `RewardsSummaryView` routes `:awaiting_verification` to a new "verification in progress, please try again shortly" info modal (single "OK" button, no redirect, doesn't retry the payout on confirm).
  • Small framework touch: `Pixel.ConfirmationModal` now accepts `cancel_label: nil` to render info-only variants (one primary button).

FX#10005449329 — https://3.basecamp.com/5734045/buckets/35926565/todos/10005449329

Test plan

  • Failing unit test in `fund/_public_test.exs`: `prepare_payout` returns `{:error, :awaiting_verification}` when the bank status is `"pending"` even with a lingering `verification_url`. Passes on this branch, fails on develop (returns `:kyc_required`).
  • Handler test in `rewards_summary_view_handlers_test.exs`: `:awaiting_verification` composes the awaiting modal (not the verify one).
  • Handler test: clicking "OK" on the awaiting modal only dismisses — no provider call, no payout completion event.
  • All fund + home + assignment + account + frameworks tests pass (753 tests).
  • Manual on eyra-next-dev: complete iDEAL, click Uitbetalen while OPP still reviewing → clear "wait a few minutes" copy instead of "please verify your bank account".

🤖 Generated with Claude Code

…agging KYC

After the participant completes iDEAL, the payment provider puts the bank
account in a review state ("pending") but often still returns a
verification_url. prepare_payout matched by URL first and returned
:kyc_required, so we kept showing the "please verify your bank account"
modal for several minutes — even though the participant had done
everything they could.

Fix: match on the bank status first ("new" is the only actionable state;
any other non-approved status means the provider is reviewing) and add a
new {:error, :awaiting_verification} branch. RewardsSummaryView routes
it to a "verification in progress, please try again shortly" info modal
(single OK button, no redirect). Also extend Pixel.ConfirmationModal
with cancel_label: nil to render info-only variants.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@JoeriDijkstra JoeriDijkstra 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.

Approved

# other non-approved status ("pending", etc.) means the provider is reviewing
# and the participant just needs to wait, even if a stale verification_url is
# still returned — so match on status first, URL second.
defp payout_ready_for(%{status: "new", verification_url: verification_url})

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.

This is something that is going to change, since we're going to store the status differently, but I'll pick that up in my branch after merging this

…on-waiting-state

# Conflicts:
#	core/priv/gettext/de/LC_MESSAGES/eyra-assignment.po
#	core/priv/gettext/en/LC_MESSAGES/eyra-assignment.po
#	core/priv/gettext/es/LC_MESSAGES/eyra-assignment.po
#	core/priv/gettext/eyra-assignment.pot
#	core/priv/gettext/it/LC_MESSAGES/eyra-assignment.po
#	core/priv/gettext/lt/LC_MESSAGES/eyra-assignment.po
#	core/priv/gettext/nl/LC_MESSAGES/eyra-assignment.po
#	core/priv/gettext/ro/LC_MESSAGES/eyra-assignment.po
@mellelieuwes
mellelieuwes merged commit ec4d5e9 into develop Jul 23, 2026
1 check passed
@mellelieuwes
mellelieuwes deleted the fix/kyc-verification-waiting-state branch July 23, 2026 08:31
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