mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-15 22:52:36 +03:00
URL custom-окружение обрабатывается теперь также как testing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.15.27-rc.3",
|
||||
"version": "0.15.27-rc.4",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/esm/index.js",
|
||||
"module": "./lib/esm/index.js",
|
||||
|
||||
@@ -33,13 +33,13 @@ class ReferralSystem {
|
||||
// testing.orionprotocol.io/referral-api вместо обычного
|
||||
// testing.orionprotocol.io/bsc-testnet/referral-api, поэтому лишняя часть вырезается
|
||||
static getActualApiUrl = (apiUrl: string, env: string) => {
|
||||
if (env !== 'testing') {
|
||||
return `${apiUrl}/referral-api`;
|
||||
if (env === 'testing' || env === 'custom') {
|
||||
const { protocol, hostname } = new URL(apiUrl);
|
||||
|
||||
return `${protocol}//${hostname}/referral-api`;
|
||||
}
|
||||
|
||||
const { protocol, hostname } = new URL(apiUrl);
|
||||
|
||||
return `${protocol}//${hostname}/referral-api`;
|
||||
return `${apiUrl}/referral-api`;
|
||||
};
|
||||
|
||||
getLink = (refererAddress: string) => fetchWithValidation(`${this.apiUrl}/referer/view/link`, linkSchema, {
|
||||
|
||||
Reference in New Issue
Block a user