@aurigami/sdk 1.8.2 → 1.8.4

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.8.2",
2
+ "version": "1.8.4",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
package/src/SDK.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { TransactionResponse } from '@ethersproject/abstract-provider';
2
2
  import BigNumber from 'bignumber.js';
3
- import * as consts from './consts';
3
+ import { ALL_STAKING_POOLS } from './consts';
4
4
  import { MiscRead, StakingRead, StakingReadWrite } from './contracts';
5
5
  import { AuriEnv, BlockchainEntity, BlockchainEntityRead, Token, TokenAmount } from './entities';
6
6
  import * as types from './types';
@@ -94,18 +94,16 @@ export class SdkRead extends BlockchainEntityRead {
94
94
 
95
95
  export class SdkReadWrite extends SdkRead {
96
96
  /**
97
- * Claim PLY reward in all markets + staking pools
97
+ * Claim rewards in all markets + staking pools
98
98
  */
99
99
  public async claim(): Promise<TransactionResponse> {
100
- return this.env.comptroller
100
+ return this.env.auriLens
101
101
  .connect(this._networkConnection.signer!)
102
- ['claimReward(uint8,address)'](0, await this._networkConnection.signer!.getAddress());
103
- }
104
-
105
- public async claimLpRewards(): Promise<TransactionResponse> {
106
- return this.env.auriFairLaunch
107
- .connect(this._networkConnection.signer!)
108
- .harvest(await this._networkConnection.signer!.getAddress(), 0, consts.INF);
102
+ .claimRewards(
103
+ this.env.comptroller.address,
104
+ this.env.auriFairLaunch.address,
105
+ ALL_STAKING_POOLS
106
+ );
109
107
  }
110
108
 
111
109
  public async stake(amount: TokenAmount): Promise<TransactionResponse> {
@@ -167,4 +167,10 @@ export const REFERRAL_CAMPAIGNS: { [k: string]: { start: number; end: number } }
167
167
  Object.fromEntries([
168
168
  ['referral-2505', { start: 1652882400, end: 1653487199 }],
169
169
  ['referrer-2505', { start: 1652882400, end: 1653487199 }],
170
+ ['referral-0106', { start: 1653487200, end: 1654091999 }],
171
+ ['referrer-0106', { start: 1653487200, end: 1654091999 }],
172
+ ['referral-0806', { start: 1654092000, end: 1654696799 }],
173
+ ['referrer-0806', { start: 1654092000, end: 1654696799 }],
174
+ ['referral-1506', { start: 1654696800, end: 1655301599 }],
175
+ ['referrer-1506', { start: 1654696800, end: 1655301599 }],
170
176
  ]);
@@ -318,7 +318,7 @@ export class MiscRead extends BlockchainEntityRead {
318
318
  let balR = new BigNumber(bal.toString()).dividedBy(_1E18.toString());
319
319
  let borR = new BigNumber(bor.toString()).dividedBy(_1E18.toString());
320
320
 
321
- if (balR.lt(dust) || borR.lt(dust)) continue;
321
+ if (balR.lt(dust) && borR.lt(dust)) continue;
322
322
 
323
323
  infos.push({
324
324
  token: getSymbol(tokenAddresses[i]),