-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: adapter connection issue #3489
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
if (!authConnector || type !== 'ID_AUTH' || origin.includes(CommonConstantsUtil.SECURE_SITE)) { | ||
if ( | ||
!authConnector || | ||
connector !== 'ID_AUTH' || |
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.
Same for hard coded strings, smth like UtilConstantsUtil.CONNECTOR_ID.AUTH
const activeNamespace = StorageUtil.getActiveNamespace() | ||
|
||
if (connectedConnector === UtilConstantsUtil.CONNECTOR_TYPE_WALLET_CONNECT && activeNamespace) { | ||
if (connectedConnector === UtilConstantsUtil.WALLET_CONNECT_CONNECTOR_ID && activeNamespace) { |
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.
What about an object like UtilConstantsUtil.CONNECTOR_ID.WALLET_CONNECT
?
@@ -88,7 +88,7 @@ export const SIWXUtil = { | |||
|
|||
const message = siwxMessage.toString() | |||
|
|||
if (StorageUtil.getConnectedConnector() === 'ID_AUTH') { | |||
if (StorageUtil.getConnectedConnectorId() === 'ID_AUTH') { |
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.
What about using constant here instead of hard coded?
@@ -174,7 +174,7 @@ export const SwapController = { | |||
const caipAddress = ChainController.state.activeCaipAddress | |||
const address = CoreHelperUtil.getPlainAddress(caipAddress) | |||
const networkAddress = ChainController.getActiveNetworkTokenAddress() | |||
const type = StorageUtil.getConnectedConnector() | |||
const connector = StorageUtil.getConnectedConnectorId() |
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.
const connector = StorageUtil.getConnectedConnectorId() | |
const connectorId = StorageUtil.getConnectedConnectorId() |
@@ -131,6 +131,14 @@ export const StorageUtil = { | |||
} | |||
}, | |||
|
|||
setConnectedConnectorId(connectorId: string) { |
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.
we should probably remove setConnectedConnector
Description
Please include a brief summary of the change.
Type of change
Associated Issues
For Linear issues: Closes APKT-xxx
For GH issues: closes #...
Showcase (Optional)
If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.
Checklist