examples: Fix typos (#564)

This commit is contained in:
Haik Dulgarian 2021-08-06 14:52:54 -05:00 committed by GitHub
parent b7188b9b3e
commit 9ed18dc888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View File

@ -1,7 +1,7 @@
//! counter is an example program that depends on an external interface
//! that another program must implement. This allows our program to depend
//! on another program, without knowing anything about it other than the fact
//! that it implements the `Auth` trait.
//! that another program (here counter-auth/src/lib.rs) must implement. This allows
//! our program to depend on another program, without knowing anything about it
//! other than that it implements the `Auth` trait.
//!
//! Here, we have a counter, where, in order to set the count, the `Auth`
//! program must first approve the transaction.

View File

@ -15,7 +15,7 @@ describe("interface", () => {
assert.ok(stateAccount.authProgram.equals(counterAuth.programId));
});
it("Should fail to go from even to event", async () => {
it("Should fail to go from even to even", async () => {
await assert.rejects(
async () => {
await counter.state.rpc.setCount(new anchor.BN(4), {

View File

@ -50,7 +50,7 @@ use solana_program::sysvar::rent;
///
/// Note that this middleware abstraction is not required to host a
/// permissioned market. One could write a regular program that manages the PDAs
/// and CPI invocations onesself, if desired.
/// and CPI invocations oneself, if desired.
#[program]
pub mod permissioned_markets_middleware {
use super::*;

View File

@ -20,13 +20,13 @@ use std::mem::size_of;
///
/// This example is provided as a (very) rough guide for how to might implement
/// a permissioned market in a raw program, which may be useful in the
/// unexpected case that the middleware abstraction does not fit ones use case.
/// unexpected case that the middleware abstraction does not fit one's use case.
///
/// Note that a fallback function is used here as the entrypoint instead of
/// higher level Anchor instruction handers. This is done to keep the example
/// consistent with `programs/permissioned-markets-middleware`. A program
/// with explicit instruction handlers would work, though then one would lose
/// the middleware abstraction, which may or may not be acceptible depending on
/// the middleware abstraction, which may or may not be acceptable depending on
/// your use case.
#[program]
pub mod permissioned_markets {

View File

@ -39,7 +39,7 @@ describe("permissioned-markets", () => {
// Token client.
let usdcClient;
// Global DEX accounts and clients shared accross all tests.
// Global DEX accounts and clients shared across all tests.
let marketProxy, tokenAccount, usdcAccount;
let openOrders, openOrdersBump, openOrdersInitAuthority, openOrdersBumpinit;
let usdcPosted;
@ -237,7 +237,7 @@ describe("permissioned-markets", () => {
const afterTokenAccount = await usdcClient.getAccountInfo(usdcAccount);
assert.ok(
afterTokenAccount.amount.sub(beforeTokenAccount.amount).toNumber() ===
usdcPosted.toNumber()
usdcPosted.toNumber()
);
});