Comments (9)
Hi @rodweb2103 can you provide a reproducible example?
from web3-onboard.
A screenshot ?
from web3-onboard.
@rodweb2103 no, a Minimal Reproducible example - please see link within the description above
from web3-onboard.
screenshot_wallet-onboard.mov
from web3-onboard.
@rodweb2103 this video doesnt really help - I have no idea how you have the provider setup in your codebase and cannot help with out that.
from web3-onboard.
const walletConnectSDK = walletConnectModule(wcInitOptions);
const coinbase = coinbaseWalletModule({ darkMode: true })
const onboard = init({
wallets: [walletConnectSDK,metamask,coinbase,injected],
appMetadata: {
name: "Payadox", // change to your dApp name
description: "Payadox",
recommendedInjectedWallets: [
{ name: 'MetaMask', url: 'https://metamask.io' },
{ name: 'Coinbase', url: 'https://wallet.coinbase.com/' }
]
},
chains: [
{
id: '0x1',
token: 'ETH',
label: 'Ethereum Mainnet',
rpcUrl: MAINNET_RPC_URL
},
{
id: '0x2105',
token: 'ETH',
label: 'Base',
rpcUrl: 'https://mainnet.base.org'
}
]
})
const { wallets, connectWallet, disconnectConnectedWallet, connectedWallet } = useOnboard()
const connect = async () => {
const wallets = await onboard.connectWallet()
console.log(wallets)
console.log(connectedWallet);
if (wallets[0]) {
const rawObject = {...wallets[0].provider};
//const { wallets } = useOnboard()
console.log(wallets);
// create an ethers provider with the last connected wallet provider
const ethersProvider = new ethers.providers.Web3Provider(connectedWallet.provider, 'any')
// if using ethers v6 this is:
// ethersProvider = new ethers.BrowserProvider(wallet.provider, 'any')
const signer = ethersProvider.getSigner()
// send a transaction with the ethers provider
const txn = await signer.sendTransaction({
to: '0x',
value: 100000000000000
})
const receipt = await txn.wait()
console.log(receipt)
}
}
from web3-onboard.
Looks like you may need to use the return from connect to create the provider. If you could create a small project using repl or codepen I could help you debug but I am not able to without a reproducible example
from web3-onboard.
ok but i used that code based on your documentation
from web3-onboard.
it seems that your library is working fine only with react and is not working properly with vue 2 or vue 3
from web3-onboard.
Related Issues (20)
- [Feature]: ALI Token Support
- connectWallet with autoSelect disables all wallets list
- [Feature]: Bloom Wallet Integration HOT 1
- curl -X GET "https://api.w3.org/ecosystems" -H "accept: application/json"
- WalletConnect not working with my custom evm chain
- Impossible to use transaction-preview package
- Bug: (SSR) Warning: Extra attributes from the server: style
- Message signing for fox wallet HOT 2
- a disconnect error by default value or other reason can not set local storage HOT 13
- Safe integration does not work on https://app.safe.global with @web3-onboard/gnosis HOT 5
- Add chain method if chain is not available
- connect({}) throws runtime error, yet compiles according to type system HOT 2
- web3auth provider not changing chains when calling `switchChain`, but `connectedChain` does HOT 2
- accountSelect should throw if rpcUrl is missing in chainValidation (hw-common)
- disconnect button not working HOT 1
- deuces9ers
- vue3 example doesn't work
- Current network dropdown not adhering to theme
- 8 vulnerabilities (4 high, 4 critical)
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 web3-onboard.