Page MenuHomePhabricator

[native] derive SIWE url instead of hardcoding it
ClosedPublic

Authored by derek on Oct 17 2022, 9:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 10:58 PM
Unknown Object (File)
Sat, Apr 20, 10:58 PM
Unknown Object (File)
Sat, Apr 20, 10:58 PM
Unknown Object (File)
Sat, Apr 20, 10:58 PM
Unknown Object (File)
Sat, Apr 20, 10:58 PM
Unknown Object (File)
Sat, Apr 20, 10:57 PM
Unknown Object (File)
Apr 14 2024, 11:54 PM
Unknown Object (File)
Apr 12 2024, 5:09 PM

Details

Summary

we now derive the SIWE url so it works the same regardless if it's a sim/physical device or in prod. linear task

Test Plan

run app, sign out & tap SIWE on sim, then physical device. i also tested ignoring __DEV__ flag to ensure we visit https://comm.app/siwe & it worked.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat requested changes to this revision.Oct 17 2022, 9:53 AM
ashoat added inline comments.
native/utils/url-utils.js
13 ↗(On Diff #17621)

Let's call this productionLandingURL for now. We can refactor to productionURL later if we change the name of the landing folder

53 ↗(On Diff #17621)

You're hard-coding an assumption here that basePath for landing will always be basePath for web with landing suffixed. This assumption is hard to grok from reading the code, and there's no reason that we have to bring web into this.

Instead, you should (1) simplify your assumptions, and (2) be explicit with your assumptions. The reader should understand what the assumptions are from a quick glance at the code.

Let's start with a function similar to getDevNodeServerURLFromHostname that returns http://${hostname}/commlanding

This revision now requires changes to proceed.Oct 17 2022, 9:53 AM

Please address feedback before landing

native/utils/url-utils.js
33 ↗(On Diff #17622)

This should be renamed to clarify that it only applies to dev, similar to its counterpart above

This revision is now accepted and ready to land.Oct 17 2022, 10:24 AM

(Looks like intermittent buildkite issue caused the iOS failure. Looks like you already kicked it off again though)

updated function name to reflect dev only

This revision was landed with ongoing or failed builds.Oct 17 2022, 10:47 AM
This revision was automatically updated to reflect the committed changes.