Questions tagged [react]
The react tag has no usage guidance.
44
questions
0
votes
1
answer
27
views
How to Transfer Sol from External Wallet to Connected Wallet in React
I hope you're doing well. I'm currently working on a React app where users can withdraw rewards to their connected wallet. I want to ensure the security of the process and avoid exposing the private ...
0
votes
0
answers
25
views
Vite + React + Wallet Adapter
Trying to use the simplest example, getting react-dom.development.js:22839 Uncaught TypeError: off is not a function error.
Below the code, error and vite.config.ts.
import './App.css'
import {Wheel} ...
0
votes
1
answer
41
views
WalletConnectionError: Unexpected error at StandardWalletAdapter._StandardWalletAdapter_connect
I am creating an app where I need to connect my wallet with Phantom for Solana.
Here is the public repo link for the code where I am getting this (WalletConnectionError: Unexpected error at ...
0
votes
2
answers
31
views
Display Updated Wallet Balance After Transaction Confirmed
i'm learning solana development from Buildspace and this is the tutorial source code for the next.js app
https://github.com/buildspace/solana-send-sol-frontend.git
the component to display the solana ...
1
vote
1
answer
102
views
Why does my react web app break on mobile when trying to sign an off-chain message
The user journey is as follows:
user lands on my react website
user connects their wallet
user is then prompted to "Sign this message for authentication: "
user signs the message and sends ...
1
vote
1
answer
119
views
Uncaught ReferenceError: process is not defined at node_modules/@solana/web3.js/lib/index.browser.esm.js
i'm using react, vite, @solana/wallet-adapter-wallets to connect phantom wallet but i stuck with this error:
Help me, thank you.
2
votes
2
answers
51
views
How to flag inefficient funds Spl-tokens candy machine v3 metaplex js
I’m using react typescript, not next js, to make a candy machine v3 minting dapp using metaplex js. The mint is paid in Spl-token instead of Sol.
How do you check and flag if user does not have enough ...
1
vote
1
answer
44
views
How to mint audio NFT
I want to mint audio and image nft at the same time. Using Web3.js and Arweave.
I am uploading audio and image to arweave and then nft metadata with those links for audio and image. It is successful.
...
1
vote
0
answers
95
views
Anchor Error: InstructionDidNotDeserialize
I was following this tutorial: "Build a TikTok Web 3.0 Blockchain App with Solana" and got around the 2:50:00 timestamp when I tried adding a TikTok, and it gave me this error:
Then I ...
3
votes
1
answer
78
views
How to bring up the wallet multi adapter select screen manually in a react app
I've got a unity game that has a 'connect wallet' button within it. In my react app I am listening for that being clicked, and what I would like to do is then pop up the standard multi wallet connect ...
2
votes
1
answer
195
views
Transaction is not getting signed while using glow wallet from solana-wallet-adapters
Signing using glow wallet is not working with @solana/wallet-adapter-react , I am getting the signature as 11111111111111111111111111111111111111.
import { useWallet } from '@solana/wallet-adapter-...
3
votes
1
answer
67
views
I need help with changing the contents of a page once a wallet has been connected
Im currently building a project using Create React App with Typescript, web3.js and ChakraUI.
I've set up the 'connect to wallet' button using the Solana Wallet Adapter, and the wallet stays connected ...
4
votes
4
answers
681
views
Get NFTs by collection address and owner
I'm trying to get all the NFTs in a collection that a wallet owns, but I only achieved get all the NFTs of a collection, or all the NFTs of a wallet (multi collections).
import { useConnection, ...
3
votes
2
answers
368
views
How to use the wallet standard?
I am switching my app from wallet-adapter to wallet-standard. Based on my reading, the wallets that support wallet-standard will be automatically detected.
So I pass an empty array to the wallets ...
3
votes
1
answer
344
views
How can I create a transaction that creates an NFT when signed by the user using Metaplex?
I made TypeScript code where I could make an NFT using an image-link as the metadata (taking help from the Solana Stack Exchange site). Now. When I tried to implement it in my frontend, I was getting ...
0
votes
0
answers
47
views
Use Solana Wallet Adapter with a Browser Extension
I'm trying to build a browser extension using React.
I want to let user connect to their wallet like a regular website dApp using solana-wallet-adapter.
It works well when I'm running my browser ...
1
vote
1
answer
44
views
Keeping your personal rpc endpoint address private in a react front end hosted by Netlify
a somewhat specific question here but maybe someone has the same set up as me..
I have a javascript app that is hosted on Netlify, that interacts with the solana mainnet. I've recently discovered the ...
4
votes
2
answers
1k
views
Phantom wallet error - Transaction expired
I'm trying to submit a transaction on my app, which works with different wallets such as Solflare, but if I try to use Phantom I always get the error message:
You waited too long to approve the ...
1
vote
0
answers
38
views
CreateListingRequiresSignerError [MetaplexError]: AuctionHouse > Create Listing Requires Signer [closed]
I create a list, but when passing and creating a list, an error comes out:
CreateListingRequiresSignerError [MetaplexError]: AuctionHouse > Create Listing Requires Signer
Source: Plugin > ...
2
votes
1
answer
60
views
Solana wallet adapter issues [closed]
I found this very annoying with solana wallet adapter issue with webpack 5 and react scripts version > 5
A smooth solution is to clone this repo and use create-react-app-started which is inside ...
2
votes
1
answer
44
views
Conflicting package versions when installing @solana packages
I am building a React-based app that uses many dependencies and I am running into a problem with @metaplex-foundation/js and @solana/spl-token in particular.
I want to use the newest versions of both ...
2
votes
0
answers
119
views
WalletMultiButton in react/typescript application does not seem to be functioning as a button
I have followed along with a few tutorials at this point, but I pulled code directly from the following website:
https://www.0xdev.co/how-to-connect-to-a-solana-wallet-to-your-react-app/
After ...
2
votes
2
answers
186
views
getOrCreateAssociatedTokenAccount() throws TokenAccountNotFoundError
I am trying to figure out why createAssociatedAccount does not work. This is the code:
const SendTransaction = ({ children }) => {
const { connection } = useConnection();
const { publicKey, ...
0
votes
1
answer
39
views
Conditional rendering with Solana Wallet Adapter & NextJS
I was wondering whether this was a safe way to render certain elements only for specific pubkeys when connected through Solana wallet adapter in Nextjs.
This code returns an < AdminPanel /> when ...
0
votes
2
answers
102
views
Solflare web wallet
GM everyone,
Very specific question here ⁉️
Is there any way to connect to solflare web wallet directly, from a program point of view ?
When I try to connect to solflare wallet, I have a pop-up asking ...
3
votes
1
answer
67
views
Disconnect and Connect hook for WalletConnectButton
i am using the WalletConnectButton from @solana/wallet-adapter-react-ui in my React app. I want to execute additional logic when the user connects and disconnects their wallet. Is there a way to do ...
0
votes
2
answers
216
views
Solana Package breaking React App with TypeError
I am deploying a react app that uses some Solana packages and the app is breaking with the following type error:
Uncaught TypeError: Cannot convert a BigInt value to a number
at Math.pow (<...
0
votes
1
answer
54
views
How do I alter the css on the solana react module? (with typescript & tailwind)
I am creating a web application and am working to add the solana wallet button using @solana/wallet-adapter. I have gotten the button to work but it wont accept custom css. Does anyone know how to do ...
3
votes
2
answers
376
views
Can I use @solana/wallet-adapter with react JS?
I create a new React JS (npx create-react-app) I install the dependencies to connect a Wallet to my application:
"@project-serum/anchor": "^0.17.0",
"@solana/spl-token&...
1
vote
1
answer
235
views
How do I use "onAccountChange" to subscribe to a Solana web socket?
const [reloadMessageList, setReloadMessageList] = useState(false);
useEffect(() => {
fetchChatMessages().then(() => {});
}, [reloadMessageList]);
const connection = new Connection(...
4
votes
2
answers
359
views
React Native build error when installing @solana/wallet-adapter "Module parse failed"
I recently installed the @solana packages in order to use the Solana Wallet Adapter but am now running into build errors. The packages I installed using npm are
@solana/wallet-adapter-base ^0.9.16
@...
0
votes
1
answer
29
views
How to create custom UI controls for metaplex
I'm having difficulty getting WalletMultiButton and WalletDisconnectButton exactly the way I want it. Is it possible to create my own buttons? This is for React
1
vote
2
answers
115
views
Generate keypair based on string longer than 32 bytes
It seems that the function to create a new keypair (https://solana-labs.github.io/solana-web3.js/classes/Keypair.html#fromSeed) can only take an input string of 32 bytes. This makes sense, but is ...
2
votes
1
answer
55
views
What is the best way to manage private routes with solana-wallet-adapter?
Currently, I am using a combination of local storage and public key to managing the private-public route. But this approach fails when user decides to revoke access to this application
const ...
0
votes
2
answers
70
views
How to mint an existing spl token with React?
I'm building a platform where users play games and receive tokens. Once user have some tokens I'd like to have a "claim" button to transfer (or should I say mint?) these tokens to user's ...
2
votes
1
answer
47
views
Solana Package Breaking React App UX
I am adding quite a few solana related packages to an existing React-App I've been building and it seems one of the packages has a dependency that's breaking my UX.
Anyone seen this error? It seems ...
0
votes
1
answer
311
views
Wallet Adapter - WalletNotSelectedError while trying to connect wallet to dApp
I'm trying to connect the user wallet to my dApp programmatically. That is, I created my own "connect wallet" button and when clicked it should execute the connect function that wallet-...
1
vote
1
answer
105
views
How to immediately get NFT metadata after mint using candy machine v2?
Using Candy Machine v2, Candy Machine UI and metaplex-foundation/js.
Following https://solanacookbook.com/references/nfts.html#how-to-get-nft-metadata as my basis, I am trying to get the metadata of ...
1
vote
0
answers
98
views
How to get Solana mobile wallet adapter working [closed]
I have created a web app using react and https://github.com/solana-labs/wallet-adapter. This works fine with the desktop wallet adapters, but I would like to use the mobile wallet adapters also so I ...
0
votes
1
answer
426
views
Phantom wallet extension not detected using @solana/wallet-adapter-react
i'm currently building a react-native webapp. My phantom wallet extension network is changed to 127.0.0.1:8899, but the app seems to not be able to detect the phantom wallet itself. Would appreciate ...
0
votes
1
answer
34
views
How do I upload this canvas png as an NFT? [closed]
I'm trying to create a basic message sender that allows you to type a message and send it to any SOL address. I know HTML & CSS but new to react and know little basic js.
This was built using npx ...
2
votes
1
answer
60
views
How to send a short message / memo to a specific address
Hello Solana lovers / buidlers,
I would love to send short message to Solana users to their address. For example by sending a transaction on the block chain.
Is there a simple way to do this ?
I found ...
9
votes
5
answers
4k
views
Uncaught ReferenceError: Buffer is not defined. Using Phantom Wallet, Solana and React to make a transaction
I've created a simple app to figure out how to use a Phantom wallet to make Solana transactions. I'm trying to follow SolDev course: https://soldev.app/course/interact-with-wallets.
When I test the ...
15
votes
3
answers
395
views
Get NFT transaction history
I'm implementing a web tool using React and I want to show to the user the transaction history of a given NFT. How can I retrieve those information?
Update:
Let's do a practical example. Using Devnet ...