question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Split out default wallet prefs for Ethereum and Solana

See original GitHub issue

Description

If you set the Brave wallet as the default cryptocurrency wallet in v1.41.96 and have another Solana wallet extension such as the Phantom wallet installed, you can’t connect to dApps with the 3rd party wallet, even if you didn’t create any Solana account in the Brave wallet.

Steps to Reproduce

  1. Install the latest Brave browser (v1.41.96) on macOS (not tested on Windows or Linux, but I suspect it would be the same result)
  2. Set up the Brave wallet without creating a Solana wallet
  3. Set the Default Cryptocurrency Wallet to Brave Wallet at brave://settings/wallet
  4. Install a 3rd party Solana wallet extension (tested with the Phantom wallet)
  5. Import or set up a Solana wallet in the Phantom wallet
  6. Try to connect to any dApp (tested with magiceden.io, solsea.io and others) with your Phantom wallet

Actual result:

After trying to connect to a dApp with a 3rd party Solana Wallet (e.g. Phantom Wallet) nothing happens and the connection failed. In the console of the Dev Tools there is an error message:

Uncaught TypeError: Cannot redefine property: solana
screenshot 2022-07-15 at 12 54 45

Expected result:

The dApp should easily connect to the 3rd party Solana wallet extension even with the Brave Wallet as default wallet, if no Solana wallet was created in the Brave wallet.

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave: 1.41.96 Chromium: 103.0.5060.114 (Official Build) (x86_64) Revision: a1c2360c5b02a6d4d6ab33796ad8a268a6128226-refs/branch-heads/5060@{#1124} OS: macOS Version 12.4 (Build 21F79)

Version/Channel Information:

  • Can you reproduce this issue with the current release? YES
  • Can you reproduce this issue with the beta channel? UNTESTED
  • Can you reproduce this issue with the nightly channel? UNTESTED

I didn’t have any problems before the 1.41.96 release.

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? NO
  • Does the issue resolve itself when disabling Brave Rewards? UNTESTED
  • Is the issue reproducible on the latest version of Chrome? NO

The issue is only applicable if a Brave wallet is present. I couldn’t reproduce the issue with the Phantom extension in a private window, where the Brave wallet isn’t enabled. On other browsers such as Chrome the issue doesn’t appear.

Explanation:

It seems that the Solana part of the Brave wallet interferes with 3rd party Solana wallet extensions. Even if no Solana wallet has been created within the Brave wallet the window.solana object will be written before any other Solana wallets.

There is a temporary solution: The user can always set the Default cryptocurrency wallet to Brave Wallet (Prefer extensions) at brave://settings/wallet. This fixes it for now.

But many users would update the Brave browser without knowing that something has changed and would get this issue instantly. They wouldn’t think of changing this setting.

Possible Solution:

With the default wallet set to Brave Wallet, but no Solana wallet created, the window.solana object shouldn’t be written as well. So 3rd party Solana wallets would work as expected until the user creates or imports a Solana wallet within the Brave wallet.

Maybe you should also warn the user if changes like that wouldn’t work with current setting after an update.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
jamesmudgettcommented, Jul 20, 2022

Screen Shot 2022-07-20 at 9 55 38 AM

  1. Create a new row with identical default wallet options.
  2. Rename the two options @rmcfadden3 to confirm the text or offer up alternatives.

“Default Ethereum/EVM wallet” “Default Solana wallet”

1reaction
jamesmudgettcommented, Jul 20, 2022

That’s not the way defaults work 😉 unless you mean we should break into more granular defaults like:

  • Default Ethereum/EVM wallet
  • Default Solana wallet
Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-Wallet support for Ethereum and Solana - Coinbase Help
Each sub-wallet gives you a unique Ethereum and Solana address for you to send funds to that wallet. Note: Bitcoin, BTC, Dogecoin, ETC,...
Read more >
How to Add Alchemy RPC Endpoints to Metamask
Follow this guide if you're looking for an Infura alternative for Metamask.
Read more >
Exclusive: U.S. Justice Dept is split over charging Binance as ...
Splits between U.S. Department of Justice prosecutors are delaying the ... Solana crypto token loses most of its value in 2022, FTX collapse ......
Read more >
How To Create a Solana NFT With IPFS | Pinata - Medium
Solana recently overtook Ethereum in total transaction volume in November of 2021, ... To begin, make sure you sign up for a Pinata...
Read more >
Ethereum price prediction: Post-Merge ETH still struggling
For a round-up of ethereum price predictions, read on… ... as the introduction of shards, which split a blockchain into smaller sections, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found