OriginProtocol / OriginProtocol/origin-dollar

Brave Wallet Connection

Open
#840 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dapp enhancement P3
Dominant language
Solidity
Stars
152
Forks
115
Avg merge
3d 20h
Merged PRs (30d)
17

Description

In #634, I mentioned that the built-in Brave wallet works out of the box with our injected connector (same for MetaMask and Coinbase Wallet) but I didn't know if there was a way to distinguish the built-in wallet from a MetaMask extension installed in the Brave Browser.

Similarly, @calvintoes mentioned in #838 that the built-in Brave wallet works via Wallet Link as well. I'm not sure if they distinguish Brave's wallet from MetaMask's either.

Here's some guidance from the Brave team if we decide to roll our own:

We’re not a MetaMask fork anymore but we do return true for ethereum.isMetaMask because we aim to be fully compatible with MetaMask.

It’s better to feature test for things rather than to rely on a flag like isMetaMask but if you just want to give an indication that it is Brave that’s connected then you can use web3_clientVersion https://github.com/brave/brave-browser/issues/19278

Please note that the value for Brave will be changing once that issue is implemented ,but at least you can check that it doesn’t give the same value as MetaMask for now to tell the difference between MetaMask and Brave Wallet. So you can check the value of web3_clientVersion and also isMetaMask == true to tell if it’s really MetaMask and not Brave Wallet.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing injected connector and Wallet Link approaches referenced in #634 and #838. Consult Brave's guidance on web3_clientVersion and determine what behavior would distinguish Brave Wallet from MetaMask; done means the supported connection paths reliably identify the wallet without depending only on isMetaMask.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.