-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add target configs for multiple platforms, add deep links and refactor social connection list #125
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
feat: add deep links refactor: unify connectionOptions instead of social/web3
f6a05f1
to
93bba5d
Compare
@@ -162,24 +157,15 @@ export const Connection = (props: ConnectionProps): JSX.Element => { | |||
<Icon name={showMore ? 'chevron up' : 'chevron down'} /> | |||
</Button> | |||
)} | |||
{showMore && hasSocialSecondaryOptions && ( | |||
{showMore && hasExtraOptions && connectionOptions.extraOptions && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{showMore && hasExtraOptions && connectionOptions.extraOptions && ( | |
{showMore && hasExtraOptions && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that I'm already considering it in hasExtraOptions
, but the compiler doesn't realize and it throws an error
npm run build
, removing the connectionOptions.extraOptions &&
:
src/components/Connection/Connection.tsx:163:13 - error TS2322: Type 'ConnectionOptionType[] | undefined' is not assignable to type 'ConnectionOptionType[]'.
Type 'undefined' is not assignable to type 'ConnectionOptionType[]'.
163 options={connectionOptions.extraOptions}
~~~~~~~
src/components/Connection/Connection.tsx:58:3
58 options: ConnectionOptionType[]
~~~~~~~
The expected type comes from property 'options' which is declared here on type 'IntrinsicAttributes & { options: ConnectionOptionType[]; tooltipDirection: "top center" | "bottom center"; testId?: string | undefined; loadingOption?: ConnectionOptionType | undefined; onConnect: (wallet: ConnectionOptionType) => unknown; }'
Found 1 error in src/components/Connection/Connection.tsx:163
…secondary->extra, and add tests from feedback
PR Summary
In our alternative explorer on Android and iOS platforms, we've updated our login methods to streamline the sign-in process and reduce the need to switch tabs when signing actions are required.
Android:
iOS:
These features are secure since they leverage the official Android and iOS SDKs.
Adaptations Needed on the
auth
FrontendTo support these changes, some modifications are required in the
auth
front. When using WebKit and Chrome Custom Tabs, we lose control on our end (Explorer
) since the OS takes over the application's runtime. The only way to return to our app is via adeep link
. This PR adds the option to include adeep link
parameter, enabling a callback that directs users back to our app.For example:
deep link
is provided, it opens a designated link, which is handled by a callback in our app. This is the standard way on Android and iOS to return users to the app.Trust Wallet Integration
Additionally, we are using WebView to open Trust Wallet, as it does not require credentials. Attempts to integrate Trust Wallet with Chrome Custom Tabs encountered limitations (e.g., changing the app closes the view). Therefore, for Wallet Connect logins, the target configuration will be set to
androidWeb3
. A new UI has been added to the mobile app to allow users to select the appropriate configuration.Summary of Changes
ios
,android
,androidSocial
, andandroidWeb3
totargetConfigIds
.web3Options
andsocialOptions
into a newconnectionOption
for simplicity.