-
Notifications
You must be signed in to change notification settings - Fork 64
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: sort wallets [OTE-825] #1063
feat: sort wallets [OTE-825] #1063
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
10e3242
to
933ca3b
Compare
933ca3b
to
1e73dcf
Compare
src/hooks/useDisplayedWallets.ts
Outdated
const metamaskWallet = injectedMetaMask | ||
? { | ||
connectorType: ConnectorType.Injected, | ||
icon: injectedMetaMask.detail.info.icon, | ||
name: injectedMetaMask.detail.info.name, | ||
rdns: injectedMetaMask.detail.info.rdns, | ||
} | ||
: { | ||
connectorType: ConnectorType.DownloadWallet, | ||
name: WalletType.MetaMask, | ||
downloadLink: METAMASK_DOWNLOAD_LINK, | ||
}; | ||
|
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 metamaskWallet = injectedMetaMask | |
? { | |
connectorType: ConnectorType.Injected, | |
icon: injectedMetaMask.detail.info.icon, | |
name: injectedMetaMask.detail.info.name, | |
rdns: injectedMetaMask.detail.info.rdns, | |
} | |
: { | |
connectorType: ConnectorType.DownloadWallet, | |
name: WalletType.MetaMask, | |
downloadLink: METAMASK_DOWNLOAD_LINK, | |
}; | |
const metamaskWallet = injectedMetaMask ?? { | |
connectorType: ConnectorType.DownloadWallet, | |
name: WalletType.MetaMask, | |
downloadLink: METAMASK_DOWNLOAD_LINK, | |
}; | |
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.
injectedMetaMask
isn't the right format D: it needs to go through the same transformation that we have in the .map
function
src/hooks/useDisplayedWallets.ts
Outdated
const enabledInjectedWallets = injectedWallets | ||
.filter( | ||
(wallet) => | ||
// Remove Metamask. We will show it no matter what at the front of |
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.
fix grammar? 😆
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.
lmao, this comment got mangled 😆 what happened to the second line?!
25cbcee
to
bab5d61
Compare
bab5d61
to
32aace9
Compare
sorts wallets according to spec https://linear.app/dydx/issue/OTE-825/sort-for-wallets-show-default-wallets-and
metamask
phantom
keplr
^ these three will go first and default to a download link if the extension isn't already installed
walletconnect
coinbase
email or social (privy)
coinbase
okx wallet
https://www.loom.com/share/01711f85a43045fc9e252f91ccf3b352