mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
Referral: Update invite code
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.70-rc1",
|
||||
"version": "0.19.70-rc2",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -29,6 +29,7 @@ type SubmitInviteCodekWithLinkPayload = {
|
||||
inviteCode: string
|
||||
referer: string
|
||||
linkOption: number
|
||||
suppressError: boolean
|
||||
};
|
||||
|
||||
type SubscribePayloadType = {
|
||||
@@ -97,6 +98,7 @@ class ReferralSystem {
|
||||
inviteCode,
|
||||
referer,
|
||||
linkOption,
|
||||
suppressError,
|
||||
}: SubmitInviteCodekWithLinkPayload) =>
|
||||
fetchWithValidation(
|
||||
`${this.apiUrl}/referer/invite/submit-code2`,
|
||||
@@ -107,7 +109,11 @@ class ReferralSystem {
|
||||
'invite-code': inviteCode,
|
||||
},
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ referer, link_option: linkOption }),
|
||||
body: JSON.stringify({
|
||||
referer,
|
||||
link_option: linkOption,
|
||||
suppress_error: Number(suppressError),
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user