Merge branch 'main' into feature/new-exchanges

# Conflicts:
#	package.json
This commit is contained in:
TheJuze
2023-09-20 14:38:56 +03:00
3 changed files with 19 additions and 6 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@orionprotocol/sdk",
"version": "0.19.82",
"version": "0.19.84",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@orionprotocol/sdk",
"version": "0.19.82",
"version": "0.19.84",
"hasInstallScript": true,
"license": "ISC",
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.19.81-rc8",
"version": "0.19.81-rc9",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -69,8 +69,8 @@ class ReferralSystem {
this.getMiniStats = this.getMiniStats.bind(this);
this.getRewardsMapping = this.getRewardsMapping.bind(this);
this.claimRewards = this.claimRewards.bind(this);
this.getRating = this.getRating.bind(this);
this.getRating = this.getRating.bind(this);
this.getLeaderboard = this.getLeaderboard.bind(this);
this.getLeaderboardSingleChain = this.getLeaderboardSingleChain.bind(this);
this.getContractsAddresses = this.getContractsAddresses.bind(this);
this.getClaimInfo = this.getClaimInfo.bind(this);
this.getAggregatedHistory = this.getAggregatedHistory.bind(this);
@@ -205,7 +205,20 @@ class ReferralSystem {
errorSchema
);
getRating = (refererAddress: string | undefined, chainId: SupportedChainId) =>
getLeaderboard = (refererAddress: string | undefined) =>
fetchWithValidation(
`${this.apiUrl}/referer/ve/rating-table-leaderboard?tag=aggregated`,
ratingSchema,
{
headers:
refererAddress !== undefined
? { 'referer-address': refererAddress }
: {},
},
errorSchema
);
getLeaderboardSingleChain = (refererAddress: string | undefined, chainId: SupportedChainId) =>
fetchWithValidation(
`${this.apiUrl}/referer/ve/rating-table-leaderboard?chain_id=${chainId}`,
ratingSchema,