fix: added errorSchema for distinct-analytics and renamed method

This commit is contained in:
kuduzow
2023-02-01 02:36:41 +03:00
parent a61e2c4c8a
commit 451cd238bd
2 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.16.1",
"version": "0.16.3-rc.0",
"description": "Orion Protocol SDK",
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",

View File

@@ -24,7 +24,7 @@ class ReferralSystem {
this.apiUrl = ReferralSystem.getActualApiUrl(apiUrl, env);
this.getLink = this.getLink.bind(this);
this.getSubscribersList = this.getSubscribersList.bind(this);
this.getDistinctAnalytics = this.getDistinctAnalytics.bind(this);
this.createReferralLink = this.createReferralLink.bind(this);
this.subscribeToReferral = this.subscribeToReferral.bind(this);
this.getMyReferral = this.getMyReferral.bind(this);
@@ -59,7 +59,7 @@ class ReferralSystem {
},
);
getSubscribersList = (refererAddress: string) => fetchWithValidation(
getDistinctAnalytics = (refererAddress: string) => fetchWithValidation(
`${this.apiUrl}/referer/view/distinct-analytics`,
distinctAnalyticsSchema,
{
@@ -67,6 +67,7 @@ class ReferralSystem {
'referer-address': refererAddress,
},
},
errorSchema,
);
createReferralLink = (payload: CreateLinkPayloadType, signature: SignatureType) => fetchWithValidation(