@aurigami/sdk 1.19.2 → 1.19.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk.cjs.development.js +23 -8
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +23 -8
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/interactors/Staking.ts +13 -5
package/package.json
CHANGED
|
@@ -24,11 +24,19 @@ export class StakingRead extends BlockchainEntityRead {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
public async getPLYWNEARPoolDetails(): Promise<PLYWNEARPoolDetails> {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
const { stakedLiquidity, rewardPerSeconds } = await this.env.auriFairLaunch
|
|
28
|
+
.getPoolInfo(consts.PLYWNEAR_POOL_ID)
|
|
29
|
+
.then((res) => {
|
|
30
|
+
const endedTime = res.endTime;
|
|
31
|
+
// If the pool has ended, return 0 reward per second
|
|
32
|
+
if (endedTime < Date.now() / 1000) {
|
|
33
|
+
return {
|
|
34
|
+
stakedLiquidity: res.totalStake,
|
|
35
|
+
rewardPerSeconds: res.rewardPerSeconds.map((_) => BN.from(0)),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return { stakedLiquidity: res.totalStake, rewardPerSeconds: res.rewardPerSeconds };
|
|
39
|
+
});
|
|
32
40
|
|
|
33
41
|
let stakedLiquidityAmount = new TokenAmount(PLYWNEARToken, stakedLiquidity!.toString());
|
|
34
42
|
|