mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-15 14:42:38 +03:00
OP-3922 update create link / sunscribe methods
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.1",
|
||||
"version": "0.19.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.1",
|
||||
"version": "0.19.2",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.21.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.1",
|
||||
"version": "0.19.2",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -133,30 +133,28 @@ class ReferralSystem {
|
||||
);
|
||||
|
||||
createReferralLink = (
|
||||
payload: CreateLinkPayloadType,
|
||||
signature: SignatureType
|
||||
payload: CreateLinkPayloadType
|
||||
) =>
|
||||
fetchWithValidation(`${this.apiUrl}/referer/create`, linkSchema, {
|
||||
fetchWithValidation(`${this.apiUrl}/referer/create2`, linkSchema, {
|
||||
headers: {
|
||||
'Content-type': 'application/json',
|
||||
},
|
||||
method: 'POST',
|
||||
body: JSON.stringify({payload, signature}),
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
|
||||
subscribeToReferral = (
|
||||
payload: SubscribePayloadType,
|
||||
signature: SignatureType
|
||||
payload: SubscribePayloadType
|
||||
) =>
|
||||
fetchWithValidation(
|
||||
`${this.apiUrl}/referer/subscribe`,
|
||||
`${this.apiUrl}/referer/subscribe2`,
|
||||
linkSchema,
|
||||
{
|
||||
headers: {
|
||||
'Content-type': 'application/json',
|
||||
},
|
||||
method: 'POST',
|
||||
body: JSON.stringify({payload, signature}),
|
||||
body: JSON.stringify(payload),
|
||||
},
|
||||
errorSchema
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user