Skip to content

KYC: Fix - Surface an error when identity verification cannot start - #2321

Open
cmgustavo wants to merge 1 commit into
bitpay:developfrom
cmgustavo:bug/kyc-silent-verify-failure-01
Open

KYC: Fix - Surface an error when identity verification cannot start#2321
cmgustavo wants to merge 1 commit into
bitpay:developfrom
cmgustavo:bug/kyc-silent-verify-failure-01

Conversation

@cmgustavo

Copy link
Copy Markdown
Member

Tapping "Verify My Identity" no longer does nothing. Every way the flow can fail before the SumSub SDK opens now shows the user a message, and the token mint gets a spinner.

The button was not unresponsive — it ran, failed, and said nothing. startKycVerification had three silent exits, and the only path with user feedback was the one that fails after the SDK is already open:

Path Before
No user / apiToken LogActions.error + return
Null access token ← the reported case LogActions.info + return
catch (token mint threw) LogActions.error only
result.status === 'Failed' already showed a modal

From a restricted region the backend does not mint a token, so we hit one of the silent paths and returned. There was also no spinner during the mint, so even the happy path reads as a dead button on a slow connection.

Copilot AI 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.

Pull request overview

Adds user feedback and loading state when identity verification cannot start.

Changes:

  • Shows localized errors for authentication, token minting, and unavailable verification.
  • Displays a spinner while requesting the SumSub token.
  • Adds failure-path and spinner tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/store/sumsub/sumsub.effects.ts Adds error modals and token-loading state.
src/store/sumsub/sumsub.effects.spec.ts Tests new feedback and spinner behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

dispatch(
showBottomNotificationModal(
CustomErrorMessage({
errMsg: msg || t('The verification process encountered an error.'),
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