From 24ffc113bbac85c95b7ae17c50df539fe8a9bb36 Mon Sep 17 00:00:00 2001 From: Logan Yu Date: Tue, 20 Jun 2023 09:56:56 -0400 Subject: [PATCH] fix errors in lookup tables code example (#32055) * fix errors in lookup tables code example * Update lookup-tables.md * add missing = and change variable name to txid --- docs/src/developing/lookup-tables.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/src/developing/lookup-tables.md b/docs/src/developing/lookup-tables.md index 810b14f461..1d02c899fa 100644 --- a/docs/src/developing/lookup-tables.md +++ b/docs/src/developing/lookup-tables.md @@ -84,9 +84,7 @@ Similar to requesting another account (or PDA) from the cluster, you can fetch a const lookupTableAddress = new web3.PublicKey(""); // get the table from the cluster -const lookupTableAccount = await connection - .getAddressLookupTable(lookupTableAddress) - .then((res) => res.value); +const lookupTableAccount = (await connection.getAddressLookupTable(lookupTableAddress)).value; // `lookupTableAccount` will now be a `AddressLookupTableAccount` object @@ -135,7 +133,7 @@ transactionV0.sign([payer]); const txid = await web3.sendAndConfirmTransaction(connection, transactionV0); console.log( - `Transaction: https://explorer.solana.com/tx/${txidV0}?cluster=devnet`, + `Transaction: https://explorer.solana.com/tx/${txid}?cluster=devnet`, ); ```