Comments (7)
Same thought.
from coinbase-wallet-sdk.
Does initializing ethers with WalletLinkProvider not work for you?
from coinbase-wallet-sdk.
Does initializing ethers with WalletLinkProvider not work for you?
What do you mean? WalletLinkProvider
is not an option as a provider? Did I miss something
However I got it to half-work using
let walletlink = walletLink.makeWeb3Provider(ETH_JSONRPC_URL, CHAIN_ID)
accounts = await walletlink.request({ method: 'eth_requestAccounts' })
// successfully gets accounts
this.provider = new ethers.providers.Web3Provider(walletlink , 'any')
// creates a provider that's half-broken
It successfully creates a provider. and I can obtain accounts.
BUUUUT, that provider is super broken.
For example, If I decide to check the chainId I'm currently connected to :
// (using metamask)
this.provider.network //returns {name: "homestead", chainId: 1, ensAddress: ".....", _defaultProvider: ƒ}
await this.provider.getNetwork() //returns {name: "homestead", chainId: 1, ensAddress: ".....", _defaultProvider: ƒ}
this.provider = new ethers.providers.Web3Provider(walletlink , 'any')
// using wallellink
this.provider.network //returns undefined
await this.provider.getNetwork() // (apparently doesn't exist) => Error: could not detect network (chainId="[object Object]",
ethers also has the app.provider._networkPromise
function which I guess is used internally and running that function returns the following (in the console for walletlink):
Promise { <state>: "rejected", <reason>: Error }
<state>: "rejected"
<reason>: Error: could not detect network (chainId="[object Object]", event="invalidNetwork", serverError="Error: invalid BigNumber value (argument=\"value\", value=\"[object Object]\", code=INVALID_ARGUMENT, version=bignumber/5.3.0)", code=NETWORK_ERROR, version=providers/5.3.1
from coinbase-wallet-sdk.
Ok, I think I was at fault here. When doing
this.provider = new ethers.providers.Web3Provider(walletlink , 'any')
walletlink was somehow badly instanciated. It seems to work nicely now
The w
in this photo is the ethers Web3provider made with walletlink
from coinbase-wallet-sdk.
from coinbase-wallet-sdk.
from coinbase-wallet-sdk.
What is this? Daniel Wayne coen
from coinbase-wallet-sdk.
Related Issues (20)
- Question: this is a test HOT 1
- Bug: does not respect reloadOnDisconnect when set via injected provider HOT 3
- Bug:
- Unreviewed commit on master! HOT 5
- Unreviewed commit on master! HOT 4
- Bug: Stackblitz (WebContainers): Uncaught TypeError: Class extends value undefined is not a constructor or null HOT 1
- Bug: Buffer is not defined HOT 3
- Bug: Dapp connects to user Coinbase wallet without authorization pop-up window
- Bug: Universal Link for the deep link is not working HOT 1
- Feature Request: wallet_watchAsset API should support ERC721 or ERC1155 standard tokens
- [email protected]
- Bug: Incompatible with Strict CSP style-src
- Unreviewed commit on 4.0! HOT 3
- Hello
- Bug: Cannot read properties of undefined (reading 'type')
- Bug: @solana/web3.js needs to be update to 1.77.4 or later. High Severity
- Bug: Error in Coinbase Wallet SDK Documentation for Smart Wallet Creation HOT 2
- Very Very nice
- Feature Request: SmartWallet - Allow owners to be initialized implicitly at time of setup
- Bug: Arc browser. 401 cors to /rpc/v3/scw/getAccounts HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coinbase-wallet-sdk.