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

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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ In order to ensure correctness of encoding please make use of these parameters:

- `needWrapNative`: if true, tells if the DEX only deals with wrapped native tokens (eg. on Ethereum it only executes trades with wETH, not native ETH).
- `dexFuncHasRecipient`: if true, tells if the DEX can swap and transfer to an arbitrary address (`recipient`) else we would append a transfer call
- `exchangeData`: the call data required by the DEX, and typically requires targetting the contract's interface to encode data.
- `exchangeData`: the call data required by the DEX, and typically requires targeting the contract's interface to encode data.
- `transferSrcTokenBeforeSwap`: if your DEX requires a transfer before the swap happens, rather than encoding it within the `exchangeData`
- `targetExchange`: the contract against which we swap
- `spender`: a contract that we need to approve in order to swap against `targetExchange`. If not set, then the spender will be `targetExchange`
Expand Down
2 changes: 1 addition & 1 deletion src/dex/hashflow/hashflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ export class Hashflow extends SimpleExchange implements IDex<HashflowData> {
error.addedDatetimeMS + CONSECUTIVE_ERROR_TIMESPAN_MS < Date.now()
) {
this.logger.warn(
`${this.dexKey}-${this.network}: First encounter of error code=${errorCode} for ${mm} OR error ocurred outside of threshold, setting up counter`,
`${this.dexKey}-${this.network}: First encounter of error code=${errorCode} for ${mm} OR error occurred outside of threshold, setting up counter`,
);
const data: CacheErrorCodesData = {
...errorCodes,
Expand Down
4 changes: 2 additions & 2 deletions src/dex/idex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export interface IDexTxBuilder<ExchangeData, DirectParam = null> {

export interface IDexPricing<ExchangeData> {
readonly dexKey: string;
// This is true if the the DEX is simply
// This is true if the DEX is simply
// wrapping/ unwrapping like weth, lending pools, etc
// or has a pool where arbitrarily large amounts has
// constant price.
Expand Down Expand Up @@ -196,7 +196,7 @@ export interface IDexPricing<ExchangeData> {
// Build an event based pool with all the info to create inside
// a cache key name poolKey
addMasterPool?(poolKey: string, blockNumber: number): AsyncOrSync<boolean>;
// return true if the userAddress is is blacklisted from the exchange
// return true if the userAddress is blacklisted from the exchange
// useful for RFQ system
isBlacklisted?(userAddress?: Address): AsyncOrSync<boolean>;

Expand Down
2 changes: 1 addition & 1 deletion src/router/directswap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from './payload-encoder';

export class DirectSwap<DexDirectReturn> implements IRouter<DexDirectReturn> {
// This is just psuedo name as the DirectSwap
// This is just pseudo name as the DirectSwap
// is more generic and works with multiple
// contract methods.
contractMethodName: string = 'directSwap';
Expand Down