From 852ee140b5a451a4de6738fa4efad188f4c4f45d Mon Sep 17 00:00:00 2001 From: damuzhi0810 Date: Thu, 23 Jan 2025 23:05:45 +0800 Subject: [PATCH] chore: fix some typos in comment Signed-off-by: damuzhi0810 --- sdk/src/driftClient.ts | 4 ++-- sdk/src/factory/bigNum.ts | 2 +- sdk/src/isomorphic/README.md | 2 +- sdk/src/tx/txHandler.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/src/driftClient.ts b/sdk/src/driftClient.ts index ecae2104a2..e3a899b906 100644 --- a/sdk/src/driftClient.ts +++ b/sdk/src/driftClient.ts @@ -3470,7 +3470,7 @@ export class DriftClient { * @param makerInfo * @param txParams * @param bracketOrdersParams - * @param cancelExistingOrders - Builds and returns an extra transaciton to cancel the existing orders in the same perp market. Intended use is to auto-cancel TP/SL orders when closing a position. Ignored if orderParams.marketType is not MarketType.PERP + * @param cancelExistingOrders - Builds and returns an extra transaction to cancel the existing orders in the same perp market. Intended use is to auto-cancel TP/SL orders when closing a position. Ignored if orderParams.marketType is not MarketType.PERP * @returns */ public async sendMarketOrderAndGetSignedFillTx( @@ -8038,7 +8038,7 @@ export class DriftClient { */ collateralAccountPublicKey: PublicKey; /** - * Add instructions to initialize the staking account -- required if its the first time the currrent authority has staked in this market + * Add instructions to initialize the staking account -- required if its the first time the current authority has staked in this market */ initializeStakeAccount?: boolean; /** diff --git a/sdk/src/factory/bigNum.ts b/sdk/src/factory/bigNum.ts index f74de0692b..3320f82865 100644 --- a/sdk/src/factory/bigNum.ts +++ b/sdk/src/factory/bigNum.ts @@ -560,7 +560,7 @@ export class BigNum { type === 'financial' ? ['', 'K', 'M', 'B', 'T', 'Q'] : ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']; - // TODO -- handle nubers which are larger than the max unit tick + // TODO -- handle numbers which are larger than the max unit tick const unitNumber = Math.floor((leftSide.length - 1) / 3); const unit = unitTicks[unitNumber]; diff --git a/sdk/src/isomorphic/README.md b/sdk/src/isomorphic/README.md index 28faf596f7..b205b5727c 100644 --- a/sdk/src/isomorphic/README.md +++ b/sdk/src/isomorphic/README.md @@ -6,7 +6,7 @@ This README will try explain how to do this, and you should be able to follow th ## High Level Explanation -At a high level, we just want to make sure that we're not importing any incompatible code into the final compiled .js output files. The only real way this can "get done" is by importing types or by importing classes/methods/values out of an offending packages. The goal of our isomorphic seperation is to ensure that we have SDK-Side code which is still properly typed and easy for devs to work with, without putting anything bad into the output code. We will do this with some typescript magic and a simple but handy postbuild script. +At a high level, we just want to make sure that we're not importing any incompatible code into the final compiled .js output files. The only real way this can "get done" is by importing types or by importing classes/methods/values out of an offending packages. The goal of our isomorphic separation is to ensure that we have SDK-Side code which is still properly typed and easy for devs to work with, without putting anything bad into the output code. We will do this with some typescript magic and a simple but handy postbuild script. ## Step-by-step isomorphic code: diff --git a/sdk/src/tx/txHandler.ts b/sdk/src/tx/txHandler.ts index 110a453a4f..8f2809651f 100644 --- a/sdk/src/tx/txHandler.ts +++ b/sdk/src/tx/txHandler.ts @@ -44,7 +44,7 @@ export const COMPUTE_UNITS_DEFAULT = 200_000; const BLOCKHASH_FETCH_RETRY_COUNT = 3; const BLOCKHASH_FETCH_RETRY_SLEEP = 200; -const RECENT_BLOCKHASH_STALE_TIME_MS = 2_000; // Reuse blockhashes within this timeframe during bursts of tx contruction +const RECENT_BLOCKHASH_STALE_TIME_MS = 2_000; // Reuse blockhashes within this timeframe during bursts of tx construction export type TxBuildingProps = { instructions: TransactionInstruction | TransactionInstruction[];