You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running the code below with some logs and at the point of running wallet.signTransaction it fails with the error given in the title. The entire error below. The code to get connections and setup and connect the wallet all work. As does the setup of the Transaction itself.
I am running:
devnet
solana: 1.6.6
sol-wallet-adapter: 0.2.0
web3.js: 1.9.1
react_devtools_backend.js:2557 Failed TypeError: Cannot read property 'toString' of undefined
at transaction.ts:271
at Array.forEach ()
at Transaction.compileMessage (transaction.ts:270)
at Transaction._compile (transaction.ts:376)
at Transaction.serializeMessage (transaction.ts:402)
at Wallet.signTransaction (index.js:184)
at sendTransaction (wallet.js:33)
`
import Wallet from "@project-serum/sol-wallet-adapter";
import {
Connection,
SystemProgram,
Transaction,
clusterApiUrl,
sendAndConfirmTransaction,
} from "@solana/web3.js";
I'm running the code below with some logs and at the point of running wallet.signTransaction it fails with the error given in the title. The entire error below. The code to get connections and setup and connect the wallet all work. As does the setup of the Transaction itself.
I am running:
devnet
solana: 1.6.6
sol-wallet-adapter: 0.2.0
web3.js: 1.9.1
react_devtools_backend.js:2557 Failed TypeError: Cannot read property 'toString' of undefined
at transaction.ts:271
at Array.forEach ()
at Transaction.compileMessage (transaction.ts:270)
at Transaction._compile (transaction.ts:376)
at Transaction.serializeMessage (transaction.ts:402)
at Wallet.signTransaction (index.js:184)
at sendTransaction (wallet.js:33)
`
import Wallet from "@project-serum/sol-wallet-adapter";
import {
Connection,
SystemProgram,
Transaction,
clusterApiUrl,
sendAndConfirmTransaction,
} from "@solana/web3.js";
const network = clusterApiUrl("devnet");
const connection = new Connection("https://devnet.solana.com", "confirmed");
const wallet = new Wallet("https://www.sollet.io", network);
export async function sendTransaction() {
try {
await wallet.connect();
console.log("network", network);
console.log("connection", connection);
console.log("wallet", wallet);
} catch (e) {
console.warn("Failed", e);
}
}
`
The text was updated successfully, but these errors were encountered: