Skip to content
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

Optimized 'ethers' imports don't work on the Marketplace #360

Open
fzavalia opened this issue Feb 8, 2023 · 0 comments
Open

Optimized 'ethers' imports don't work on the Marketplace #360

fzavalia opened this issue Feb 8, 2023 · 0 comments

Comments

@fzavalia
Copy link
Contributor

fzavalia commented Feb 8, 2023

Version v13.31.3 Includes a change to optimize ethers imports reducing the bundle size of importers considerably.

However, this change has brought some issues when being imported into the Marketplace.

One example is when the user attempts to sign-in the flow breaks with:

image.png

Which is caused by https://github.com/decentraland/decentraland-dapps/blob/master/src/modules/wallet/utils/buildWallet.ts#L20

The issue is fixed by changing:

import { Web3Provider } from '@ethersproject/providers/lib/web3-provider';
...

export async function buildWallet(appChainId: ChainId): Promise<Wallet> {
  ...
  const eth = new Web3Provider(provider);

into:

import { ethers } from 'ethers';
...

export async function buildWallet(appChainId: ChainId): Promise<Wallet> {
  ...
  const eth = new ethers.providers.Web3Provider(provider);

With this the user can start signing up, however, balances cannot be fetched and transactions cannot be sent, meaning it covers a lot of other aspects of the application.

To prevent blocking the marketplace from using any dapps updates, the changes to ethers can be reverted and re-evaluated on the future to work on all dapps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant