Skip to content

Commit

Permalink
fix issue in params for program vs params for transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckbergeron committed Jul 13, 2023
1 parent 2e101e9 commit ccbd894
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/library/src/withdrawClaimRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { NETWORK_NATIVE_TOKEN_INFO } from './utils/network';
interface WithdrawClaimRewardsParams {
amount: BigNumber;
rewardsRecipient: string;
minProfitThresholdUsd: number;
}

/**
Expand Down Expand Up @@ -82,7 +81,6 @@ export async function getWithdrawClaimRewardsTx(
const withdrawClaimRewardsParams: WithdrawClaimRewardsParams = {
rewardsRecipient,
amount,
minProfitThresholdUsd,
};

// #3. Decide if profitable or not
Expand All @@ -94,6 +92,7 @@ export async function getWithdrawClaimRewardsTx(
rewardsTokenUsd,
withdrawClaimRewardsParams,
readProvider,
minProfitThresholdUsd,
);
if (!profitable) {
printAsterisks();
Expand Down Expand Up @@ -182,9 +181,8 @@ const calculateProfit = async (
rewardsTokenUsd: number,
withdrawClaimRewardsParams: WithdrawClaimRewardsParams,
readProvider: Provider,
minProfitThresholdUsd: number,
): Promise<Boolean> => {
const { minProfitThresholdUsd } = withdrawClaimRewardsParams;

const gasTokenMarketRateUsd = await getGasTokenMarketRateUsd(contracts, marketRate);

printAsterisks();
Expand Down

0 comments on commit ccbd894

Please sign in to comment.