Skip to content

Commit

Permalink
chore: mock stkgho
Browse files Browse the repository at this point in the history
  • Loading branch information
foodaka committed Dec 1, 2023
1 parent 2285290 commit 8434bb9
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ export class UiStakeDataProvider implements UiStakeDataProviderInterface {
userCooldownTimestamp: stkBptUserData.userCooldownTimestamp,
rewardsToClaim: stkBptUserData.rewardsToClaim,
},
stkGHO: {
...stkAaveData,
stakedTokenUserBalance: stkAaveUserData.stakedTokenUserBalance,
underlyingTokenUserBalance: stkAaveUserData.underlyingTokenUserBalance,
stakedTokenRedeemableAmount:
stkAaveUserData.stakedTokenRedeemableAmount,
userCooldownAmount: stkAaveUserData.userCooldownAmount,
userCooldownTimestamp: stkAaveUserData.userCooldownTimestamp,
rewardsToClaim: stkAaveUserData.rewardsToClaim,
},
ethPrice,
};
}
Expand Down Expand Up @@ -103,6 +113,19 @@ export class UiStakeDataProvider implements UiStakeDataProviderInterface {
userIncentivesToClaim:
contractResult.stkBptData.rewardsToClaim.toString(),
},
stkGHO: {
stakeTokenUserBalance:
contractResult.stkAaveData.stakedTokenUserBalance.toString(),
underlyingTokenUserBalance:
contractResult.stkAaveData.underlyingTokenUserBalance.toString(),
stakeTokenRedeemableAmount:
contractResult.stkAaveData.stakedTokenRedeemableAmount.toString(),
userCooldownAmount:
contractResult.stkAaveData.userCooldownAmount.toString(),
userCooldownTimestamp: contractResult.stkAaveData.userCooldownTimestamp,
userIncentivesToClaim:
contractResult.stkAaveData.rewardsToClaim.toString(),
},
ethPriceUsd: contractResult.ethPrice.toString(),
};
}
Expand All @@ -114,6 +137,7 @@ export class UiStakeDataProvider implements UiStakeDataProviderInterface {
return {
stkAaveData,
stkBptData,
stkGHO: stkAaveData,
ethPrice,
};
}
Expand Down Expand Up @@ -158,6 +182,23 @@ export class UiStakeDataProvider implements UiStakeDataProviderInterface {
contractResult.stkBptData.distributionPerSecond.toString(),
distributionEnd: contractResult.stkBptData.distributionEnd.toString(),
},
stkGHO: {
stakeTokenTotalSupply:
contractResult.stkGHO.stakedTokenTotalSupply.toString(),
stakeTokenTotalRedeemableAmount:
contractResult.stkGHO.stakedTokenTotalRedeemableAmount.toString(),
stakeCooldownSeconds:
contractResult.stkGHO.stakeCooldownSeconds.toNumber(),
stakeUnstakeWindow: contractResult.stkGHO.stakeUnstakeWindow.toNumber(),
stakeTokenPriceEth:
contractResult.stkGHO.stakedTokenPriceEth.toString(),
rewardTokenPriceEth:
contractResult.stkGHO.rewardTokenPriceEth.toString(),
stakeApy: contractResult.stkGHO.stakeApy.toString(),
distributionPerSecond:
contractResult.stkGHO.distributionPerSecond.toString(),
distributionEnd: contractResult.stkGHO.distributionEnd.toString(),
},
ethPriceUsd: contractResult.ethPrice.toString(),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ export type GeneralStakeUIData = {
stakedTokenPriceEth: BigNumber;
stakeApy: BigNumber;
};
stkGHO: {
stakedTokenTotalSupply: BigNumber;
stakedTokenTotalRedeemableAmount: BigNumber;
stakeCooldownSeconds: BigNumber;
stakeUnstakeWindow: BigNumber;
rewardTokenPriceEth: BigNumber;
distributionEnd: BigNumber;
distributionPerSecond: BigNumber;
stakedTokenPriceEth: BigNumber;
stakeApy: BigNumber;
};
ethPrice: BigNumber;
};

Expand All @@ -43,6 +54,14 @@ export type GetUserStakeUIData = {
userCooldownTimestamp: number;
rewardsToClaim: BigNumber;
};
stkGHO: {
stakedTokenUserBalance: BigNumber;
underlyingTokenUserBalance: BigNumber;
stakedTokenRedeemableAmount: BigNumber;
userCooldownAmount: BigNumber;
userCooldownTimestamp: number;
rewardsToClaim: BigNumber;
};
ethPrice: BigNumber;
};

Expand All @@ -69,6 +88,19 @@ export type GeneralStakeUIDataHumanized = {
distributionPerSecond: string;
distributionEnd: string;
};

stkGHO: {
stakeTokenTotalSupply: string;
stakeTokenTotalRedeemableAmount: string;
stakeCooldownSeconds: number;
stakeUnstakeWindow: number;
stakeTokenPriceEth: string;
rewardTokenPriceEth: string;
stakeApy: string;
distributionPerSecond: string;
distributionEnd: string;
};

ethPriceUsd: string;
};

Expand All @@ -89,5 +121,13 @@ export type GetUserStakeUIDataHumanized = {
userCooldownTimestamp: number;
userIncentivesToClaim: string;
};
stkGHO: {
stakeTokenUserBalance: string;
underlyingTokenUserBalance: string;
stakeTokenRedeemableAmount: string;
userCooldownAmount: string;
userCooldownTimestamp: number;
userIncentivesToClaim: string;
};
ethPriceUsd: string;
};

0 comments on commit 8434bb9

Please sign in to comment.