4
votes
How to bring up the wallet multi adapter select screen manually in a react app
import { useWalletModal } from '@solana/wallet-adapter-react-ui';
This gives you access to:
const { setVisible } = useWalletModal();
… then you can call setVisible(true) to show the menu.
4
votes
React Native build error when installing @solana/wallet-adapter "Module parse failed"
Your build problems stem from the fact that the version of React Native you're using runs code in a JavaScript environment that doesn't support BigInt, and BigInt is required by versions of @solana/...
4
votes
React Native build error when installing @solana/wallet-adapter "Module parse failed"
Two problems here:
Your compiler looks like it's using a transform that turns 2n ** 64n into Math.pow(2n, 64n). This is actually illegal because Math.pow() does not support BigInt – only number. An ...
4
votes
Accepted
Wallet throws WalletNotReadyError when on remote, but works fine locally
The issue is that the solana wallet adapter refuses to work on HTTP unless it's locally. In order to get it to work make sure you access your next app via HTTPS
3
votes
Webpack < 5 polyfill problem when using @solana/wallet-adapter on [email protected]
To understand this issue, Webpack 4, which is used by Create React App 4, doesn't handle ESM imports well. And Webpack 5 does, but it doesn't polyfill things you need by default.
But here's the ...
3
votes
Accepted
Wallet Adapter (Standard) doesn't work on the iOS device
Unfortunately most wallets can't be autodetected by iOS. On Windows/Mac they're injected into the page by a browser extension, and on Android they can use Mobile Wallet Adapter (MWA), which is ...
3
votes
Accepted
Solana-wallet-adapter is not working properly in react app
The topmost error ‘You have tried to read wallets on a WalletContext without providing one’ is the error to heed.
Make sure to include a <WalletProvider> at least one component above the one in ...
2
votes
Accepted
Is there a disconnect method for custom wallet buttons?
There is a disconnect method on useWallet.
console.log(useWallet());
{
autoConnect: false,
wallets: [ { adapter: [PhantomWalletAdapter], readyState: 'Unsupported' } ],
wallet: null,
publicKey: ...
2
votes
how do I use the anza-xyz/wallet-adapter with my create-react-app?
Here's the page/connections guide for front end daps https://github.com/anza-xyz/wallet-adapter/blob/master/APP.md
Using JS shouldn't be an issue, just remove the TS typings and you should be good to ...
2
votes
Solana wallet adapter '{ children: Element[]; }'?
After doing some research, it seems it is a error in react as @kafinsalim stated, I dont know if this is a good workaround but to solve the issue and create a build while keeping everything working ...
2
votes
How to get Solana address from wallet adapter
The terms ‘public key’ and ‘address’ are interchangeable. The public key of a wallet is the wallet’s address.
At a fundamental level, the address is a 256-bit number. In practice you see addresses ...
1
vote
Latest implementation of wallet adapter
You can find the repo here, -> https://github.com/anza-xyz/wallet-adapter
Different folks have different ways to accomplish this. For Some, they'll have the IDL in the frontend repo and call their ...
1
vote
Is there a disconnect method for custom wallet buttons?
There is not "disconnect" request. (Metamask does not have either). to hack around, you define a state with useState:
const [connectedWallet,setConnectedWallet]=useState(false)
then if you ...
1
vote
how to wallet adapter still connect if i am change url
Solana wallet adapter provides autoConnect option which is what you need. Take a look at this answer for more instructions.
1
vote
Webpack < 5 polyfill problem when using @solana/wallet-adapter on [email protected]
Fought with this issue a lot during our start as well. We are using CRA5, Webpack 5, and react-app-rewired. Webpack 5 no longer polyfills.
Our config-overrides.js:
const webpack = require('webpack')
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
walletadapter × 23solana-wallet-adapter × 14
react × 6
wallet × 5
web3.js × 4
walletprovider × 2
phantom-wallet × 2
anchor × 1
spl-token × 1
token × 1
spl × 1
staking × 1
typescript × 1
smart-contract × 1
idl × 1
sendtransactionerror × 1
balance × 1
frontend × 1
documentation × 1
compute-budget × 1
gemfarm × 1
mobile-wallet-adapter × 1
js × 1
transaction × 1
versionedtransactions × 1