Skip to content

fix: only navigate deeplink when user signed in#869

Merged
jaymengxy merged 1 commit intodevelopfrom
deeplink
Apr 24, 2025
Merged

fix: only navigate deeplink when user signed in#869
jaymengxy merged 1 commit intodevelopfrom
deeplink

Conversation

@jaymengxy
Copy link
Copy Markdown
Contributor

Related Issue

Closes #827

Summary of Changes

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

@jaymengxy jaymengxy added this to the Release 2.8.3 milestone Apr 24, 2025
@jaymengxy jaymengxy self-assigned this Apr 24, 2025
@jaymengxy jaymengxy requested a review from a team as a code owner April 24, 2025 10:16
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2025

PR Summary

Enhanced security by adding a user authentication check before processing deeplinks. The PR ensures that users must be signed in and have a registered wallet before any deeplink navigation occurs. Added error messaging in multiple languages to inform users when deeplink navigation fails due to missing authentication.

Changes

File Summary
app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/Utils.kt Modified executePendingDeepLink to verify user authentication (isRegistered and isUserSignIn) before processing deeplinks. Added error toast message when authentication fails.
app/src/main/java/com/flowfoundation/wallet/page/main/MainActivity.kt Wrapped executePendingDeepLink call in uiScope to handle the new suspend function properly in the main activity.
app/src/main/res/values/strings.xml Added new string resource deeplink_login_failed for authentication failure message.
app/src/main/res/values-de-rDE/strings.xml Added German translations for deeplink error message and switch action.
app/src/main/res/values-en-rUS/strings.xml Added English translations for deeplink error message and switch action.
app/src/main/res/values-es-rES/strings.xml Added Spanish translations for deeplink error message and switch action.
app/src/main/res/values-es-rUS/strings.xml Added US Spanish translations for deeplink error message and switch action.
app/src/main/res/values-fr-rFR/strings.xml Added French translations for deeplink error message and switch action.
app/src/main/res/values-hi-rIN/strings.xml Added Hindi translations for deeplink error message and switch action.
app/src/main/res/values-it-rIT/strings.xml Added Italian translations for deeplink error message and switch action.
app/src/main/res/values-ja-rJP/strings.xml Added Japanese translations for deeplink error message and switch action.
app/src/main/res/values-ko-rKR/strings.xml Added Korean translations for deeplink error message and switch action.
app/src/main/res/values-ru-rRU/strings.xml Added Russian translations for deeplink error message and switch action.
app/src/main/res/values-zh-rCN/strings.xml Added Simplified Chinese translations for deeplink error message and switch action.

autogenerated by presubmit.ai

Copy link
Copy Markdown

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

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • 5ad7007: fix: only navigate deeplink when user signed in
Files Processed (14)
  • app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/Utils.kt (3 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/main/MainActivity.kt (1 hunk)
  • app/src/main/res/values-de-rDE/strings.xml (1 hunk)
  • app/src/main/res/values-en-rUS/strings.xml (1 hunk)
  • app/src/main/res/values-es-rES/strings.xml (1 hunk)
  • app/src/main/res/values-es-rUS/strings.xml (1 hunk)
  • app/src/main/res/values-fr-rFR/strings.xml (1 hunk)
  • app/src/main/res/values-hi-rIN/strings.xml (1 hunk)
  • app/src/main/res/values-it-rIT/strings.xml (1 hunk)
  • app/src/main/res/values-ja-rJP/strings.xml (1 hunk)
  • app/src/main/res/values-ko-rKR/strings.xml (1 hunk)
  • app/src/main/res/values-ru-rRU/strings.xml (1 hunk)
  • app/src/main/res/values-zh-rCN/strings.xml (1 hunk)
  • app/src/main/res/values/strings.xml (1 hunk)
Actionable Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/Utils.kt [58-59]

    possible issue: "Potential race condition in authentication check"

Skipped Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/page/main/MainActivity.kt [123-125]

    best practice: "Potential memory leak in coroutine scope"

@jaymengxy jaymengxy merged commit 2268168 into develop Apr 24, 2025
3 checks passed
@jaymengxy jaymengxy deleted the deeplink branch April 24, 2025 14:22
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.

Open in app browser with deeplinks

2 participants