Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs for "learn-how-to-build-for-mainnet" #368

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions curriculum/locales/english/learn-how-to-build-for-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2478,7 +2478,7 @@ pub enum ErrorCode {

### --description--

Lastly within the `save_tasks` instruction handle, adjust the `if` statement conditional to only realloc if the replacing tasks space is less than the currently allocated space.
Lastly within the `save_tasks` instruction handle, adjust the `if` statement conditional to only realloc if the currently allocated space is less than the replacing tasks space.

### --tests--

Expand Down Expand Up @@ -2999,21 +2999,21 @@ delete global.__babelisedCode;

### --description--

Under the `TODO:3` comment, declare an `ENDPOINT` variable, and assign it the value of `import.meta.VITE_SOLANA_CONNECTION_URL` or default to `http://localhost:8899`.
Under the `TODO:3` comment, declare an `ENDPOINT` variable, and assign it the value of `import.meta.env.VITE_SOLANA_CONNECTION_URL` or default to `http://localhost:8899`.

**Note:** `import.meta.VITE_*` is a way to access environemnt variables in a Vitejs app during build time.

### --tests--

You should have `const ENDPOINT = import.meta.VITE_SOLANA_CONNECTION_URL || "http://localhost:8899";`.
You should have `const ENDPOINT = import.meta.env.VITE_SOLANA_CONNECTION_URL || "http://localhost:8899";`.

```js
const codeString = await __helpers.getFile(
join(project.dashedName, 'todo/app/src/app.tsx')
);
assert.match(
codeString,
/const\s+ENDPOINT\s*=\s*import\.meta\.VITE_SOLANA_CONNECTION_URL\s*\|\|/
/const\s+ENDPOINT\s*=\s*import\.meta\.env\.VITE_SOLANA_CONNECTION_URL\s*\|\|/
);
```

Expand Down Expand Up @@ -3779,9 +3779,9 @@ const { stdout: keys } = await __helpers.getCommandOutput(
);
const expectedProgramId = keys.match(/[^\s]{44}/)?.[0];
const pubkey = new PublicKey(expectedProgramId);
const transactions = await connection.getConfirmedSignaturesForAddress2(pubkey);
const transactions = await connection.getSignaturesForAddress(pubkey);
assert.isAtLeast(
transactions,
transactions.length,
2,
'Try using the client interface and your wallet to make a few transactions'
);
Expand Down