Skip to content

Commit

Permalink
Update AlgebraV1Base.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Jan 10, 2025
1 parent f39fc0c commit a56aaa0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/sushi/src/router/liquidity-providers/AlgebraV1Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,13 @@ export abstract class AlgebraV1BaseProvider extends UniswapV3BaseProvider {
staticPools.forEach((pool, i) => {
if (globalState === undefined || !globalState[i]) return
let thisPoolTickSpacing = this.DEFAULT_TICK_SPACING
if (poolsTickSpacing !== undefined && Array.isArray(poolsTickSpacing)) {
if (poolsTickSpacing[i] !== undefined) {
const ts = poolsTickSpacing[i]
if (typeof ts === 'number') {
thisPoolTickSpacing = ts
} else {
if (ts?.status === 'success') {
thisPoolTickSpacing = ts.result
}
if (poolsTickSpacing?.[i] !== undefined) {
const ts = poolsTickSpacing[i]
if (typeof ts === 'number') {
thisPoolTickSpacing = ts
} else {
if (ts?.status === 'success') {
thisPoolTickSpacing = ts.result
}
}
}
Expand Down

0 comments on commit a56aaa0

Please sign in to comment.