Using an API I get the tx data needed to send a transaction to buy a NFT, and I have to turn that transaction data array into a Transaction, I tried using new solanaWeb3.Transaction().from()
but I get a "Function not defined" error, any help? I use plain js btw
Asked
Active
Viewed 79 times
0

Mario Badea
- 31
- 4
-
`Transaction` is a type, and not a function, so try `new solanaWeb3.Transaction.from()` – Jon C Jul 27 '22 at 12:50
-
doesnt work, i get : Uncaught TypeError: solanaWeb3.Transaction.from is not a constructor – Mario Badea Jul 27 '22 at 13:12
-
Ah right, sorry, you can remove `new`. – Jon C Jul 27 '22 at 14:47