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

chore: fix some typos in comment #1443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions sdk/src/driftClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
/**
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/factory/bigNum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/isomorphic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion sdk/src/tx/txHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down