Referral: Update invite code

This commit is contained in:
Dmitry Leleko
2023-08-28 08:53:43 +03:00
parent 3aa49b43e3
commit a787c9b8dd
2 changed files with 8 additions and 2 deletions

View File

@@ -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",

View File

@@ -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),
}),
}
);