Remove async from TickUtil.getTickArrayPDAs (#77)
This commit is contained in:
parent
277e4ff7c8
commit
1fc24cedff
|
@ -81,9 +81,9 @@ export function collectRewardsQuote(param: CollectRewardsQuoteParam): CollectRew
|
|||
rewardGrowthsBelowX64 =
|
||||
tickCurrentIndex < tickLowerIndex
|
||||
? MathUtil.subUnderflowU128(
|
||||
adjustedRewardGrowthGlobalX64,
|
||||
tickLowerRewardGrowthsOutsideX64
|
||||
)
|
||||
adjustedRewardGrowthGlobalX64,
|
||||
tickLowerRewardGrowthsOutsideX64
|
||||
)
|
||||
: tickLowerRewardGrowthsOutsideX64;
|
||||
}
|
||||
|
||||
|
@ -93,9 +93,9 @@ export function collectRewardsQuote(param: CollectRewardsQuoteParam): CollectRew
|
|||
tickCurrentIndex < tickUpperIndex
|
||||
? tickUpperRewardGrowthsOutsideX64
|
||||
: MathUtil.subUnderflowU128(
|
||||
adjustedRewardGrowthGlobalX64,
|
||||
tickUpperRewardGrowthsOutsideX64
|
||||
);
|
||||
adjustedRewardGrowthGlobalX64,
|
||||
tickUpperRewardGrowthsOutsideX64
|
||||
);
|
||||
}
|
||||
|
||||
const rewardGrowthInsideX64 = MathUtil.subUnderflowU128(
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { PDA } from "@orca-so/common-sdk";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import invariant from "tiny-invariant";
|
||||
import { AccountFetcher } from "../../network/public";
|
||||
|
@ -198,14 +199,14 @@ export class TickArrayUtil {
|
|||
* @param whirlpoolAddress - Address for the Whirlpool for these tick-arrays
|
||||
* @returns TickArray PDAs for the sequence`
|
||||
*/
|
||||
public static async getTickArrayPDAs(
|
||||
public static getTickArrayPDAs(
|
||||
tick: number,
|
||||
tickSpacing: number,
|
||||
numOfTickArrays: number,
|
||||
programId: PublicKey,
|
||||
whirlpoolAddress: PublicKey,
|
||||
aToB: boolean
|
||||
) {
|
||||
): PDA[] {
|
||||
let arrayIndexList = [...Array(numOfTickArrays).keys()];
|
||||
if (aToB) {
|
||||
arrayIndexList = arrayIndexList.map((value) => -value);
|
||||
|
|
Loading…
Reference in New Issue