Skip to content

Conversation

@lealobanov
Copy link
Contributor

@lealobanov lealobanov commented Dec 11, 2025

Closes #896

Screenshot 2025-12-12 at 2 02 53 AM

🔗 Related Issues

Linked automatically from the branch name. If incorrect, edit:

Self-Checklist

  • I read through my own diff
  • I ran at least one manual check
  • No mock / debug code left in production code

📝 Description

📸 Screenshots/Videos

@github-actions
Copy link

github-actions bot commented Dec 11, 2025

PR Summary

Updated the account registration flow to use the v4 API endpoint. Added a new getV4RegistrationSignatures method that signs in anonymously to Firebase, retrieves a JWT, and signs it with both Flow and EVM keys derived from the mnemonic. The registration now includes flowSignature, evmSignature, and eoaAddress parameters. Removed the deprecated v3 register method from ProfileService in favor of registerV4.

Changes

File Summary
apps/react-native/src/bridge/NativeFRWBridge.ts Added V4RegistrationSignaturesResponse interface containing flowSignature, evmSignature, and eoaAddress. Added getV4RegistrationSignatures method to the Spec interface that derives signing keys from a mnemonic and returns signatures for v4 API registration.
apps/react-native/src/bridge/PlatformImpl.ts Added getV4RegistrationSignatures method implementation that delegates to NativeFRWBridge.getV4RegistrationSignatures. Includes error logging and re-throws errors on failure.
packages/context/src/interfaces/PlatformSpec.ts Added optional getV4RegistrationSignatures method to the PlatformSpec interface. Returns a promise with flowSignature, evmSignature, and eoaAddress for v4 API registration.
packages/screens/src/onboarding/ConfirmRecoveryPhraseScreen.query.tsx Updated the account creation flow to call bridge.getV4RegistrationSignatures to obtain Flow and EVM signatures. Changed from profileService().register to profileService().registerV4, passing flowSignature, evmSignature, eoaAddress, and weight in the account key.
packages/services/src/ProfileService.ts Removed the register method that used the v3 API endpoint (Userv3GoService). Removed the Userv3GoService import. Registration now uses registerV4 method instead.

autogenerated by presubmit.ai

@github-actions
Copy link

github-actions bot commented Dec 11, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • c4405d4: feat: update to register v4

Closes #896

Files Processed (1)
  • packages/services/src/ProfileService.ts (3 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • packages/services/src/ProfileService.ts [454-459]

    possible bug: "Non-null assertion on potentially undefined value."

  • packages/services/src/ProfileService.ts [477-479]

    possible issue: "Response structure handling may be inconsistent."

@lealobanov lealobanov marked this pull request as ready for review December 11, 2025 17:02
@lealobanov lealobanov requested a review from a team as a code owner December 11, 2025 17:02
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)

Closes #896

Files Processed (4)
  • apps/react-native/src/bridge/NativeFRWBridge.ts (1 hunk)
  • apps/react-native/src/bridge/PlatformImpl.ts (1 hunk)
  • packages/context/src/interfaces/PlatformSpec.ts (1 hunk)
  • packages/screens/src/onboarding/ConfirmRecoveryPhraseScreen.query.tsx (2 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • packages/screens/src/onboarding/ConfirmRecoveryPhraseScreen.query.tsx [194-207]

    possible issue: "Uninitialized variable could lead to undefined usage."

  • packages/screens/src/onboarding/ConfirmRecoveryPhraseScreen.query.tsx [200-200]

    security: "Ensure signature value is not logged."

public_key: accountKey.publicKey,
sign_algo: accountKey.signAlgo,
hash_algo: accountKey.hashAlgo,
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add evmAccountInfo

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 356dfc2: feat: update v4 register sign methods

Closes #896

Files Processed (5)
  • apps/react-native/src/bridge/NativeFRWBridge.ts (2 hunks)
  • apps/react-native/src/bridge/PlatformImpl.ts (1 hunk)
  • packages/context/src/interfaces/PlatformSpec.ts (1 hunk)
  • packages/screens/src/onboarding/ConfirmRecoveryPhraseScreen.query.tsx (1 hunk)
  • packages/services/src/ProfileService.ts (2 hunks)
Actionable Comments (0)
Skipped Comments (2)
  • packages/screens/src/onboarding/ConfirmRecoveryPhraseScreen.query.tsx [216-227]

    possible issue: "Missing deviceInfo parameter in registerV4 call."

  • packages/screens/src/onboarding/ConfirmRecoveryPhraseScreen.query.tsx [198-200]

    enhancement: "Late capability check may lead to poor user experience."

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (1)
  • 614706c: Merge branch 'dev' into 896-register-v4
Files Processed (0)
Actionable Comments (0)
Skipped Comments (0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RN] Upgrade register endpoint from v3 to v4

3 participants