Browse Source

examples: Fix typos (#564)

Haik Dulgarian 4 years ago
parent
commit
9ed18dc888

+ 3 - 3
examples/interface/programs/counter/src/lib.rs

@@ -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.

+ 1 - 1
examples/interface/tests/interface.js

@@ -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), {

+ 1 - 1
examples/permissioned-markets/programs/permissioned-markets-middleware/src/lib.rs

@@ -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::*;

+ 2 - 2
examples/permissioned-markets/programs/permissioned-markets/src/lib.rs

@@ -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 {

+ 2 - 2
examples/permissioned-markets/tests/permissioned-markets.js

@@ -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()
       );
     });