Skip to content

Commit

Permalink
chore: fix some comments
Browse files Browse the repository at this point in the history
Signed-off-by: needsure <[email protected]>
  • Loading branch information
needsure committed Dec 6, 2024
1 parent e442d3f commit 691b184
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion programs/drift/src/state/perp_market.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ impl PerpMarket {
self,
oracle_price_twap: i64,
) -> DriftResult<i64> {
// clamp to to 3% price divergence for safer markets and higher for lower contract tiers
// clamp to 3% price divergence for safer markets and higher for lower contract tiers
if self.contract_tier.is_as_safe_as_contract(&ContractTier::B) {
oracle_price_twap.safe_div(33) // 3%
} else if self.contract_tier.is_as_safe_as_contract(&ContractTier::C) {
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 @@ -528,7 +528,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/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
2 changes: 1 addition & 1 deletion sdk/src/util/TransactionConfirmationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface TransactionConfirmationRequest {
}

/**
* Class to await for transaction confirmations in an optimised manner. It tracks a shared list of all pending transactions and fetches them in bulk in a shared RPC request whenever they have an "overlapping" polling interval. E.g. tx1 with an interval of 200ms and tx2 with an interval of 300ms (if sent at the same time) will be fetched together at at 600ms, 1200ms, 1800ms, etc.
* Class to await for transaction confirmations in an optimised manner. It tracks a shared list of all pending transactions and fetches them in bulk in a shared RPC request whenever they have an "overlapping" polling interval. E.g. tx1 with an interval of 200ms and tx2 with an interval of 300ms (if sent at the same time) will be fetched together at 600ms, 1200ms, 1800ms, etc.
*/
export class TransactionConfirmationManager {
private connection: Connection;
Expand Down

0 comments on commit 691b184

Please sign in to comment.