@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/dist/SDK.d.ts +1 -2
- package/dist/sdk.cjs.development.js +32 -50
- 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 +32 -50
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/SDK.ts +8 -10
- package/src/consts/constants.ts +6 -0
- package/src/contracts/misc.ts +1 -1
package/package.json
CHANGED
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
|
|
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
|
|
97
|
+
* Claim rewards in all markets + staking pools
|
|
98
98
|
*/
|
|
99
99
|
public async claim(): Promise<TransactionResponse> {
|
|
100
|
-
return this.env.
|
|
100
|
+
return this.env.auriLens
|
|
101
101
|
.connect(this._networkConnection.signer!)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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> {
|
package/src/consts/constants.ts
CHANGED
|
@@ -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
|
]);
|
package/src/contracts/misc.ts
CHANGED
|
@@ -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)
|
|
321
|
+
if (balR.lt(dust) && borR.lt(dust)) continue;
|
|
322
322
|
|
|
323
323
|
infos.push({
|
|
324
324
|
token: getSymbol(tokenAddresses[i]),
|