mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-13 21:52:36 +03:00
fix: added errorSchema for distinct-analytics and renamed method
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user