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
This commit is contained in:
parent
ce929bead2
commit
24ffc113bb
|
@ -84,9 +84,7 @@ Similar to requesting another account (or PDA) from the cluster, you can fetch a
|
||||||
const lookupTableAddress = new web3.PublicKey("");
|
const lookupTableAddress = new web3.PublicKey("");
|
||||||
|
|
||||||
// get the table from the cluster
|
// get the table from the cluster
|
||||||
const lookupTableAccount = await connection
|
const lookupTableAccount = (await connection.getAddressLookupTable(lookupTableAddress)).value;
|
||||||
.getAddressLookupTable(lookupTableAddress)
|
|
||||||
.then((res) => res.value);
|
|
||||||
|
|
||||||
// `lookupTableAccount` will now be a `AddressLookupTableAccount` object
|
// `lookupTableAccount` will now be a `AddressLookupTableAccount` object
|
||||||
|
|
||||||
|
@ -135,7 +133,7 @@ transactionV0.sign([payer]);
|
||||||
const txid = await web3.sendAndConfirmTransaction(connection, transactionV0);
|
const txid = await web3.sendAndConfirmTransaction(connection, transactionV0);
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`Transaction: https://explorer.solana.com/tx/${txidV0}?cluster=devnet`,
|
`Transaction: https://explorer.solana.com/tx/${txid}?cluster=devnet`,
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue