Skip to content

Commit

Permalink
Update package version and modify API endpoints
Browse files Browse the repository at this point in the history
Bumped version to 0.2.7-rc5 in package.json. In file src/services/ReferralSystem/index.ts, adjusted paths for fetchWithValidation calls. This involved removing /referral-api from the URLs.
  • Loading branch information
TheJuze committed Feb 21, 2024
1 parent 71a3796 commit b1be0ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package",
"name": "@electra.finance/sdk",
"version": "0.2.7-rc4",
"version": "0.2.7-rc5",
"description": "Electra finance SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/services/ReferralSystem/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,21 +242,21 @@ class ReferralSystem {
page = 1
}: { page: number }) => {
return fetchWithValidation(
`${this.apiUrl}/referral-api/referer/futures/leaderboard?page=${page}`,
`${this.apiUrl}/referer/futures/leaderboard?page=${page}`,
leaderboardSchema
);
}

getAccountDetails = ({ address }: AddressType) => {
return fetchWithValidation(
`${this.apiUrl}/referral-api/referer/futures/account-details?address=${address}`,
`${this.apiUrl}/referer/futures/account-details?address=${address}`,
accountDetailsSchema,
);
}

getAccountReferrals = ({ address, page = 1 }: AddressType & { page: number }) => {
return fetchWithValidation(
`${this.apiUrl}/referral-api/referer/futures/account-referrals?address=${address}&page=${page}`,
`${this.apiUrl}/referer/futures/account-referrals?address=${address}&page=${page}`,
accountReferralsSchema,
);
}
Expand Down

0 comments on commit b1be0ad

Please sign in to comment.