-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
|
After enabling the 3 filtered wallets I tried to test each of them and found the following:
It is a very strange behavior that I wanted to know if @elena-zh has any experience about it. |
|
This comment has been minimized.
This comment has been minimized.
c442fdb
to
891e11f
Compare
Hey @henrypalacios , |
@henrypalacios , as for the not showing Connect button, I assume the issue might be connected with this behavior: #1187 : I noticed, that now the Swap form appears, but there is no 'connect' button for the described cases |
e643407
to
8ff122b
Compare
0c389f3
to
7aa7be5
Compare
* enable walletlink and upgrade package * Limiting the supported networks for CoinbaseWallet * Adding setDefaultInjected provider
CLA Assistant Lite All Contributors have signed the CLA. |
* Activate formatic wallet * Adding reconnect Uninjected Provider * Adding connecting web3Status after refresh * Upgrade fortmatic to v2.2.1 * Mute unnecessary Overlay useEffect * Adding new API 🔑 * Adding custom src/custom/connectors/Fortmaitc.ts * merger conflict resolution
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.
Both working great!
`} | ||
|
||
${({ clickable, pending }) => | ||
clickable !== false && |
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.
if this prop isn't fed clickable
explicitly (it's an optional prop with no default) it will still allow clicking, i.e undefined !== false // true
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.
Thank you for such detailed information.
I have moved to explicitly clickDisabled
state when disabling.
@@ -230,6 +243,17 @@ export function Web3StatusInner({ | |||
<Text>{error instanceof UnsupportedChainIdError ? <Trans>Wrong Network</Trans> : <Trans>Error</Trans>}</Text> | |||
</Web3StatusError> | |||
) | |||
} else if (thereWasAProvider) { | |||
return ( | |||
<Web3StatusConnected pending={true} clickable={false}> |
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.
ubernit: can just pass pending like so:
<Web3StatusConnected pending={true} clickable={false}> | |
<Web3StatusConnected pending clickable={false}> |
src/custom/connectors/Fortmatic.ts
Outdated
|
||
export const OVERLAY_READY = 'OVERLAY_READY' | ||
|
||
type FormaticSupportedChains = 1 | 3 | 4 | 42 |
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 only have chains we support here, should use SupportedChainId
enum
src/custom/connectors/Fortmatic.ts
Outdated
|
||
type FormaticSupportedChains = 1 | 3 | 4 | 42 | ||
|
||
const CHAIN_ID_NETWORK_ARGUMENT: { readonly [chainId in FormaticSupportedChains]: string | undefined } = { |
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 here probably
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.
Done!
src/custom/connectors/index.ts
Outdated
@@ -4,7 +4,7 @@ import { WalletConnectConnector } from '@web3-react/walletconnect-connector' | |||
import { WalletLinkConnector } from '@web3-react/walletlink-connector' | |||
import { PortisConnector } from '@web3-react/portis-connector' | |||
|
|||
import { FortmaticConnector } from 'connectors/Fortmatic' | |||
import { FortmaticConnector, getFortmaticApiKey } from 'custom/connectors/Fortmatic' |
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.
shouldn't need custom
in the import
import { FortmaticConnector, getFortmaticApiKey } from 'custom/connectors/Fortmatic' | |
import { FortmaticConnector, getFortmaticApiKey } from 'connectors/Fortmatic' |
src/custom/hooks/web3.ts
Outdated
} else { | ||
if (isMobile && window.ethereum) { | ||
const connectInjected = useCallback( | ||
(providerName = 'Metamask') => { |
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.
can you not use the WalletProvider.METAMASK
enum here? (or does it not exist for some reason?)
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.
It does not exist in WalletProvider
because it assumes that the INJECTED
provider is Metamask, I have created an enum
to distinguish between the injected ones.
src/custom/hooks/web3.ts
Outdated
@@ -84,3 +97,23 @@ export function useEagerConnect() { | |||
|
|||
return tried | |||
} | |||
|
|||
export function setDefaultInjected(providerName: 'MetaMask' | 'CoinbaseWallet') { |
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.
nit: use enum WalletProvider
enum here
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.
Accomplished...
Hey @henrypalacios , I have faced another issue with Coinbase wallet:
So here I would expected to connect to stop connection process with the Coinbase wallet. Anyways, it is a low priority. So let me know please If I need to create a separate issue for this. |
This issue is an important to fix: when press on the 'Connect Coinbase wallet' from mobile view, the app navigates to the Coinbase app browser and opens Uniswap app instead of the CowSwap. See the video: uni.mp4 |
Fortmatic works fine except this issue: I can't call keyboard in order to connect to the wallet when press on the email field in the connection modal fortm.mp4The only way to open the keyboard is to long press on the field, then tap it again (takes a lot of time to understand and find out how to manage this). |
4d1b6bc
to
44f489a
Compare
The issue is fixed: the app opens https://cowswap.exchange/#/swap instead of the Uniswap now. |
@@ -25,6 +25,9 @@ export const APP_DATA_HASH = getAppDataHash() | |||
export const PRODUCTION_URL = 'cowswap.exchange' | |||
export const BARN_URL = `barn.${PRODUCTION_URL}` | |||
|
|||
// Change the generated CoinbaseWallet link by going to the DApp on mobile via deeplink | |||
SUPPORTED_WALLETS_UNISWAP.COINBASE_LINK.href = 'https://go.cb-w.com/o0KpAwewQnb' |
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.
How did you generate the 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.
The only place I found now was within CoinbaseWallet itself 👇
Which is why it has become a challenge to comply with the following.
"... I'd propose to open an appropriate environment in the CB wallet according to the one a user is currently working on:
BARN - https://barn.cowswap.exchange/#/swap
Stage - https://cowswap.staging.gnosisdev.com/#/swap
Dev/PRs - https://cowswap.dev.gnosisdev.com/#/swap
Prod - https://cowswap.exchange/#/swap
I have tried to remove the COINBASE_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.
If it's not trivial to update the link, let's stick to PROD and move on.
As discussed on the meeting @elena-zh those 2 issues:
Are out of the scope of this change. The issue The issue Still, please open issues for them in the backlog, although I don't think we'll prioritize them any time soon. |
Summary
Closes #2165
Proposal:
Try to enable the wallets previously supported by Uniswap and verify that they work.
Detected problems along the way! 🕵️ :