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

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,