I'm trying to do quick swap with solana actions and Jupiter swap API V6. My goal is to swap sol to usdc. Once in a while it works with the same code. As well the simulation goes well. As you can see below I have got the VersionedTransaction transaction from quote-api and event try to rebuild this transaction with addressTableLookups but in the and I have got an error:
Error: Failed to get account keys because address table lookups were not resolved
at MessageV0.getAccountKeys (webpack-internal:///(rsc)/./node_modules/@solana/web3.js/lib/index.esm.js:1025:13)
at TransactionMessage.decompile (webpack-internal:///(rsc)/./node_modules/@solana/web3.js/lib/index.esm.js:2072:33)
at prepareVersionedTransaction (webpack-internal:///(rsc)/./node_modules/@solana/actions/lib/esm/createPostResponse.js:48:83)
I'm trying to do quick swap with solana actions and Jupiter swap API V6. My goal is to swap sol to usdc. Once in a while it works with the same code. As well the simulation goes well. As you can see below I have got the VersionedTransaction transaction from quote-api and event try to rebuild this transaction with addressTableLookups but in the and I have got an error:
Error: Failed to get account keys because address table lookups were not resolved at MessageV0.getAccountKeys (webpack-internal:///(rsc)/./node_modules/@solana/web3.js/lib/index.esm.js:1025:13) at TransactionMessage.decompile (webpack-internal:///(rsc)/./node_modules/@solana/web3.js/lib/index.esm.js:2072:33) at prepareVersionedTransaction (webpack-internal:///(rsc)/./node_modules/@solana/actions/lib/esm/createPostResponse.js:48:83)
` export async function swap(account: PublicKey, connection: Connection): Promise < VersionedTransaction > {
const coinToAddress = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"; const coinFromAddress = "So11111111111111111111111111111111111111112"; const amountToSwap = 1000000000;
} `