OriginProtocol / OriginProtocol/origin-dollar
Brave Wallet Connection
Nobody has claimed this yet.
- 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
trueforethereum.isMetaMaskbecause we aim to be fully compatible with MetaMask.It’s better to feature test for things rather than to rely on a flag like
isMetaMaskbut if you just want to give an indication that it is Brave that’s connected then you can useweb3_clientVersionhttps://github.com/brave/brave-browser/issues/19278Please 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_clientVersionand alsoisMetaMask == trueto tell if it’s really MetaMask and not Brave Wallet.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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