Referral: Fix invite code

This commit is contained in:
Dmitry Leleko
2023-08-28 09:05:38 +03:00
parent a787c9b8dd
commit b226d8e72c
2 changed files with 5 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.19.70-rc2",
"version": "0.19.70-rc3",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -29,7 +29,6 @@ type SubmitInviteCodekWithLinkPayload = {
inviteCode: string
referer: string
linkOption: number
suppressError: boolean
};
type SubscribePayloadType = {
@@ -83,9 +82,11 @@ class ReferralSystem {
},
});
getMyInviteCodeAndLink = (refererAddress: string) =>
getMyInviteCodeAndLink = (refererAddress: string, suppressError = false) =>
fetchWithValidation(
`${this.apiUrl}/referer/invite/status2`,
`${this.apiUrl}/referer/invite/status2?suppress_error=${Number(
suppressError
)}`,
inviteCodeLinkSchema,
{
headers: {
@@ -98,7 +99,6 @@ class ReferralSystem {
inviteCode,
referer,
linkOption,
suppressError,
}: SubmitInviteCodekWithLinkPayload) =>
fetchWithValidation(
`${this.apiUrl}/referer/invite/submit-code2`,
@@ -112,7 +112,6 @@ class ReferralSystem {
body: JSON.stringify({
referer,
link_option: linkOption,
suppress_error: Number(suppressError),
}),
}
);