Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix redirecting on webviews #1119

Merged
merged 3 commits into from
Feb 24, 2024

Conversation

pedrorosarioo
Copy link
Contributor

@pedrorosarioo pedrorosarioo commented Feb 23, 2024

Summary

Navigating to CB Wallet app deeplink via window.open and not replacing window.href was causing a broken behavior when the SDK is running from inside a webview. This PR replaces the redirecting strategy in order to fix this bug

How did you test your changes?

Manually tested using an RN test app that renders the test dapp from inside a webview

Before After
Untitled-ezgif.com-resize-video.1.mp4
Untitled-ezgif.com-resize-video.mp4

@pedrorosarioo pedrorosarioo marked this pull request as ready for review February 23, 2024 22:36
fan-zhang-sv
fan-zhang-sv previously approved these changes Feb 23, 2024
bangtoven
bangtoven previously approved these changes Feb 24, 2024
@bangtoven bangtoven merged commit db3995e into coinbase:master Feb 24, 2024
9 checks passed
bangtoven added a commit that referenced this pull request Feb 29, 2024
* rename the package

* Squashed commit of the following:

commit 26e68f9f6d1eac389c6329d06e20ca538484522c
Author: Jungho Bang <[email protected]>
Date:   Wed Feb 28 19:27:38 2024 -0700

    duh

commit 8ce4d4acabf6f1d5419ddd2561446e374ac0dcd7
Author: Jungho Bang <[email protected]>
Date:   Wed Feb 28 19:20:54 2024 -0700

    merge latest public

commit f047e9b975d1e92505aedeacb7cc16a4b38b3b3a
Merge: 9652bed4 c57516a
Author: Jungho Bang <[email protected]>
Date:   Wed Feb 28 19:19:30 2024 -0700

    Merge branch 'master' into jungho/publish-ready

    # Conflicts:
    #	apps/testapp/package.json
    #	packages/wallet-sdk/package.json
    #	packages/wallet-sdk/src/relay/mobile/MobileRelay.ts
    #	packages/wallet-sdk/src/relay/mobile/MobileRelayUI.ts
    #	packages/wallet-sdk/src/version.ts
    #	yarn.lock

commit 9652bed40a5e01fc9aefb7c8d1dac0f3150dd075
Author: Jungho Bang <[email protected]>
Date:   Wed Feb 28 19:16:08 2024 -0700

    move relay ui file for merging

commit c57516a
Author: Pedro Rosário <[email protected]>
Date:   Sat Feb 24 01:03:36 2024 -0300

    Fix/deeplink from webview for android (#1121)

    * fix: anchor tag approach to cover both iOS and Android cases

    * fix: add expected target

    ---------

    Co-authored-by: Pedro Rosario <[email protected]>

commit 9aba4c2
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Fri Feb 23 16:20:26 2024 -0800

    v3.9.2 (#1120)

    Co-authored-by: bangtoven <[email protected]>

commit db3995e
Author: Pedro Rosário <[email protected]>
Date:   Fri Feb 23 21:17:34 2024 -0300

    fix redirecting on webviews (#1119)

    * fix redirecting on webviews

    * remove dead code

    * fix: typecheck

    ---------

    Co-authored-by: Pedro Rosario <[email protected]>

commit ae895de
Author: Jungho Bang <[email protected]>
Date:   Fri Dec 8 15:18:29 2023 -0500

    use 3.9.1 on the test app (#1097)

* update yarn.lock

* cleanup release script

* update license / year

* update yarn.lock

* cleanup license

* Revert "update yarn.lock"

This reverts commit 4354e48dbffdb5698e722dbe09c26587dc8d7ace.

* fuck

* revert to public gha

* Revert "revert to public gha"

This reverts commit 45ee8551c34de59dd05c95591cef364483754dd4.

* update version
bangtoven added a commit that referenced this pull request Feb 29, 2024
* rename the package

* Squashed commit of the following:

commit 26e68f9f6d1eac389c6329d06e20ca538484522c
Author: Jungho Bang <[email protected]>
Date:   Wed Feb 28 19:27:38 2024 -0700

    duh

commit 8ce4d4acabf6f1d5419ddd2561446e374ac0dcd7
Author: Jungho Bang <[email protected]>
Date:   Wed Feb 28 19:20:54 2024 -0700

    merge latest public

commit f047e9b975d1e92505aedeacb7cc16a4b38b3b3a
Merge: 9652bed4 c57516a
Author: Jungho Bang <[email protected]>
Date:   Wed Feb 28 19:19:30 2024 -0700

    Merge branch 'master' into jungho/publish-ready

    # Conflicts:
    #	apps/testapp/package.json
    #	packages/wallet-sdk/package.json
    #	packages/wallet-sdk/src/relay/mobile/MobileRelay.ts
    #	packages/wallet-sdk/src/relay/mobile/MobileRelayUI.ts
    #	packages/wallet-sdk/src/version.ts
    #	yarn.lock

commit 9652bed40a5e01fc9aefb7c8d1dac0f3150dd075
Author: Jungho Bang <[email protected]>
Date:   Wed Feb 28 19:16:08 2024 -0700

    move relay ui file for merging

commit c57516a
Author: Pedro Rosário <[email protected]>
Date:   Sat Feb 24 01:03:36 2024 -0300

    Fix/deeplink from webview for android (#1121)

    * fix: anchor tag approach to cover both iOS and Android cases

    * fix: add expected target

    ---------

    Co-authored-by: Pedro Rosario <[email protected]>

commit 9aba4c2
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Fri Feb 23 16:20:26 2024 -0800

    v3.9.2 (#1120)

    Co-authored-by: bangtoven <[email protected]>

commit db3995e
Author: Pedro Rosário <[email protected]>
Date:   Fri Feb 23 21:17:34 2024 -0300

    fix redirecting on webviews (#1119)

    * fix redirecting on webviews

    * remove dead code

    * fix: typecheck

    ---------

    Co-authored-by: Pedro Rosario <[email protected]>

commit ae895de
Author: Jungho Bang <[email protected]>
Date:   Fri Dec 8 15:18:29 2023 -0500

    use 3.9.1 on the test app (#1097)

* update yarn.lock

* cleanup release script

* update license / year

* update yarn.lock

* cleanup license

* Revert "update yarn.lock"

This reverts commit 4354e48dbffdb5698e722dbe09c26587dc8d7ace.

* fuck

* revert to public gha

* Revert "revert to public gha"

This reverts commit 45ee8551c34de59dd05c95591cef364483754dd4.

* update version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants