Skip to content

Commit

Permalink
fix: broken link and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfrosty committed Nov 26, 2024
1 parent 1427fe3 commit 2fa7d09
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions content/cookbook/tokens/approve-token-delegate.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import bs58 from "bs58";
tokenAccountPubkey, // token account
randomGuy.publicKey, // delegate
alice, // owner of token account
1e8, // amount, if your deciamls is 8, 10^8 for 1 token
1e8, // amount, if your decimals is 8, 10^8 for 1 token
8, // decimals
);
console.log(`txhash: ${txhash}`);
Expand All @@ -77,7 +77,7 @@ import bs58 from "bs58";
mintPubkey, // mint
randomGuy.publicKey, // delegate
alice.publicKey, // owner of token account
1e8, // amount, if your deciamls is 8, 10^8 for 1 token
1e8, // amount, if your decimals is 8, 10^8 for 1 token
8, // decimals
),
);
Expand Down
4 changes: 2 additions & 2 deletions content/cookbook/tokens/burn-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import bs58 from "bs58";
tokenAccountPubkey, // token account
mintPubkey, // mint
alice, // owner
1e8, // amount, if your deciamls is 8, 10^8 for 1 token
1e8, // amount, if your decimals is 8, 10^8 for 1 token
8,
);
console.log(`txhash: ${txhash}`);
Expand All @@ -67,7 +67,7 @@ import bs58 from "bs58";
tokenAccountPubkey, // token account
mintPubkey, // mint
alice.publicKey, // owner of token account
1e8, // amount, if your deciamls is 8, 10^8 for 1 token
1e8, // amount, if your decimals is 8, 10^8 for 1 token
8, // decimals
),
);
Expand Down
2 changes: 1 addition & 1 deletion content/cookbook/tokens/create-mint-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import bs58 from "bs58";

// 1) use build-in function
let mintPubkey = await createMint(
connection, // conneciton
connection, // connection
feePayer, // fee payer
alice.publicKey, // mint authority
alice.publicKey, // freeze authority (you can use `null` to disable it. when you disable it, you can't turn it on again)
Expand Down
2 changes: 1 addition & 1 deletion content/cookbook/tokens/set-update-token-authority.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ import bs58 from "bs58";
{
let tx = new Transaction().add(
createSetAuthorityInstruction(
mintPubkey, // mint acocunt || token account
mintPubkey, // mint account || token account
alice.publicKey, // current auth
AuthorityType.MintTokens, // authority type
feePayer.publicKey, // new auth (you can pass `null` to close it)
Expand Down
4 changes: 2 additions & 2 deletions content/cookbook/tokens/transfer-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import bs58 from "bs58";
mintPubkey, // mint
tokenAccountYPubkey, // to (should be a token account)
alice, // from's owner
1e8, // amount, if your deciamls is 8, send 10^8 for 1 token
1e8, // amount, if your decimals is 8, send 10^8 for 1 token
8, // decimals
);
console.log(`txhash: ${txhash}`);
Expand All @@ -76,7 +76,7 @@ import bs58 from "bs58";
mintPubkey, // mint
tokenAccountYPubkey, // to (should be a token account)
alice.publicKey, // from's owner
1e8, // amount, if your deciamls is 8, send 10^8 for 1 token
1e8, // amount, if your decimals is 8, send 10^8 for 1 token
8, // decimals
),
);
Expand Down
8 changes: 4 additions & 4 deletions content/cookbook/transactions/offline-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import * as nacl from "tweetnacl";
import * as bs58 from "bs58";

// to complete a offline transaction, I will seperate them into four steps
// to complete a offline transaction, I will separate them into four steps
// 1. Create Transaction
// 2. Sign Transaction
// 3. Recover Transaction
Expand Down Expand Up @@ -65,7 +65,7 @@ import * as bs58 from "bs58";
);
let aliceSignature = nacl.sign.detached(realDataNeedToSign, alice.secretKey);

// 3. Recover Tranasction
// 3. Recover Transaction

// you can verify signatures before you recovering the transaction
let verifyFeePayerSignatureResult = nacl.sign.detached.verify(
Expand All @@ -83,7 +83,7 @@ import * as bs58 from "bs58";
console.log(`verify alice signature: ${verifyAliceSignatureResult}`);

// there are two ways you can recover the tx
// 3.a Recover Tranasction (use populate then addSignauture)
// 3.a Recover Transaction (use populate then addSignature)
{
let recoverTx = Transaction.populate(Message.from(realDataNeedToSign));
recoverTx.addSignature(feePayer.publicKey, Buffer.from(feePayerSignature));
Expand All @@ -97,7 +97,7 @@ import * as bs58 from "bs58";

// or

// 3.b. Recover Tranasction (use populate with signature)
// 3.b. Recover Transaction (use populate with signature)
{
let recoverTx = Transaction.populate(Message.from(realDataNeedToSign), [
bs58.encode(feePayerSignature),
Expand Down
4 changes: 2 additions & 2 deletions content/courses/connecting-to-offchain-data/oracles.md
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ describe("burry-escrow", () => {
if (solPrice === null) {
throw new Error("Aggregator holds no value");
}
// Although `SOL_USD_SWITCHBOARD_FEED` is not changing we are changing the unlockPrice in test as given below to simulate the escrow behaviour
// Although `SOL_USD_SWITCHBOARD_FEED` is not changing we are changing the unlockPrice in test as given below to simulate the escrow behavior
const unlockPrice = solPrice.minus(PRICE_OFFSET).toNumber();

await createAndVerifyEscrow(unlockPrice);
Expand Down Expand Up @@ -1332,7 +1332,7 @@ describe("burry-escrow", () => {
if (solPrice === null) {
throw new Error("Aggregator holds no value");
}
// Although `SOL_USD_SWITCHBOARD_FEED` is not changing we are changing the unlockPrice in test as given below to simulate the escrow behaviour
// Although `SOL_USD_SWITCHBOARD_FEED` is not changing we are changing the unlockPrice in test as given below to simulate the escrow behavior
const unlockPrice = solPrice.plus(PRICE_OFFSET).toNumber();
await createAndVerifyEscrow(unlockPrice);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Lastly, the `callback` field is where you define the callback instruction the
Switchboard program should invoke once the randomness result has be verified.

The `callback` field is of type
`[CallbackZC](https://github.com/switchboard-xyz/solana-sdk/blob/9dc3df8a5abe261e23d46d14f9e80a7032bb346c/rust/switchboard-solana/src/oracle_program/accounts/ecvrf.rs#L25)`.
[`CallbackZC`](https://github.com/switchboard-xyz/solana-sdk/blob/9dc3df8a5abe261e23d46d14f9e80a7032bb346c/rust/switchboard-solana/src/oracle_program/accounts/ecvrf.rs#L25).

```rust
#[zero_copy(unsafe)]
Expand Down
2 changes: 1 addition & 1 deletion content/guides/getstarted/scaffold-nextjs-anchor.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ supports shared layouts, nested routing, loading states, and error handling.
The `solana-provider.tsx` already has all the wallet features you need, It
handles auto connects of Solana wallet easily, and you can move to multiple
components of your web application with the wallet states managed. This NextJS
app is using `[@tanstack/react-query](`https://tanstack.com/query/latest)` to
app is using [`@tanstack/react-query`](https://tanstack.com/query/latest) to
fetch, cache, synchronize, and update server state in your web applications
easily. React-Query here is used for all the data fetching needs, like a hook
for `useGetBalance` to get the balance of your wallet, `useTransferSol` to
Expand Down

0 comments on commit 2fa7d09

Please sign in to comment.