Skip to content

Release: develop -> main - #1235

Merged
TaprootFreak merged 1 commit into
mainfrom
develop
Aug 1, 2026
Merged

Release: develop -> main#1235
TaprootFreak merged 1 commit into
mainfrom
develop

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

* feat(kyc): explain a staff KYC block and offer to start KYC

Staff endpoints now answer 403 { code: 'STAFF_KYC_REQUIRED' } when the role is fine but
the account behind it has not completed an identification. Surfacing that as a raw error
would leave staff with a bare 403 and no idea that their own KYC is what unblocks it.

useGuardedApi handles the code centrally, next to the existing TFA_REQUIRED redirect, so
every staff hook is covered rather than one dashboard. It routes to a screen that states
the role is unchanged, explains that the identification is missing, and offers a button
that starts the regular KYC onboarding via useKycHelper.

Translations added for de, fr and it.

* fix(kyc): reach every staff screen and stop the back-bounce

Review found that the handling did not reach every staff screen, contradicting the
comment this branch added. Six staff screens and the dashboard hook called useApi()
directly instead of useGuardedApi(), so they would keep showing a raw 403 - and they
already missed the 2FA redirect for the same reason, which the hook has required all
along. All seven now use the guarded call; each used only `call`, so this is a
one-to-one swap.

The redirect no longer stores the blocked path. Unlike 2FA, which resolves in one step,
the screen stays blocked until an identification is completed, so remembering it sent
the user straight back into the same 403. The regular KYC flow never consumes the stored
path either, so it would linger and misdirect a later goBack(). The Back button now goes
to the account page, which is reachable without staff clearance.

* fix(kyc): clear the stored redirect and correct the hook claim

Back now clears the stored redirect path explicitly. Dropping goBack() also dropped the
only place that cleared it, so a path set by an unrelated flow before the block would
survive the detour and misdirect a later consumer of that single slot.

Corrects the comment as well: it claimed every staff call goes through the guarded hook.
The staff data hooks and screens do, but individual SDK calls such as useKyc().getFile in
the compliance screens do not, and those still surface the error inline.
@TaprootFreak
TaprootFreak merged commit ff3027c into main Aug 1, 2026
8 checks passed
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