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 comments #1365

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