mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-22 21:59:44 +03:00
OP-3922 update create link / sunscribe methods
This commit is contained in:
@@ -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