KV Config
Last updated
Last updated
We extract some configuration data from the codes to form KV configuration and multilingual configuration. The KV configuration function interface is specifically used to edit the extracted configuration data. This function is developed to facilitate the exchange operators to directly edit some core functions, functions that requires complex tests and key interfaces on the website of the exchange, so as to reduce the manpower of the testing department and shorten the online period of each configuration change.
The brand configuration of the exchange mainly includes logos, domain names of the master station, icons, web page titles, contact numbers, SMS signatures, etc. Before the exchange gets online, the operator must modify these brand configurations one by one at the back end; otherwise, they will be considered empty or related ChainUp texts by default. After the exchange gets online, the operator is free to modify them at any time, as detailed below. Note that where image uploading is required, the images can be uploaded to the Aliyun account (see File Upload), and then the generated address is pasted in the corresponding location.
In the locations shown in the figure above, you can edit in turn the domain name of master station, contact number, logo access address (images to be uploaded), icon access address (images to be uploaded) and logo for the H5 login page (images to be uploaded). After you click Modify and complete the settings, the "Publishing Online" button in the rightmost column turns red. Then after you click the [Release Online], it turns to purple [Release Online], indicating that new editing is synchronized to the front end system.
# Unique key value: app_invitation_imgs
# Configuration value: {"local_img_cn":"","local_img_en":"","online_img_cn":"","online_img_en":""}
# Configuration Description:
"local_img_cn": "Enter the URL of the background image with the size of 1125 * 1809 here, and the writings of the image should be in Chinese",
"local_img_en": "Enter the URL of the background image with the size of 1125 * 1809 here, and the writings of the image should be in English",
"online_img_cn": "Enter the URL of the background image with the size of 1125 px * 1527 here, and the writings of the image should be in Chinese",
"online_img_en": "Enter the URL of the background image with the size of 1125 px * 1527 here, and the writings of the image should be in English".
Note:
Do not design key information in the area of 450 px * 450 px in the lower left corner of the background image, which may be covered by QR code;
It is recommended that the image format should a PNG file of no greater than 200 k;
The so-called length is needed just because the implementation logic requires different sizes of background images, and the contents of long and short images should be designed to be the same, with only the size distinguished.
# Unique key value: is_hide_agent_child_info
# Function Description: It controls whether the offline information on the front-end broker information page is partially hidden.
#Configuration description: Configuration value of 1 indicates partially hidden; Configuration value of 0 indicates all displayed.
The effect of hiding is as follows:
# Unique key value: is_enforce_google_auth
# Function description: After it is enabled, the restrictions on fund withdrawal scenarios such as users' coin-to-cash withdrawal, OTC sale, and red packet sending must be verified by Google. If the enforced restrictions are disabled, they can be bound to mobile phones or Google.
# Configuration description: Configuration value of 1 indicates enabling enforcement; Configuration value of 0 indicates disabling.
# Unique key value: Value of CNY_otc_coin, Precision value: CNY_coinPrecision
# Function Description:
Role of digital precision
Display: Displayed according to the precision; if exceeded, it is truncated for display; if insufficient, it is automatically added with 0 to reach the precision length;
Input box: Used to control the digits that can be input after the decimal point in the input box.
There are two types of numbers in the front-end
It represents the coin quantity of tokens, such as quantity and total assets
It represents the unit of fiat currency, such as unit price and amount
Control logic
Token precision: Used to display precision according to the display precision of the coin (if exceeded, it is truncated for display; if insufficient, it is automatically added with 0 to reach the precision length), or to control the number of characters that can be input after the decimal point in the input box.
Precision of fiat currency (OTC module): Used to distinguish the coin control of fiat currency. Take CNY as an example, firstly judge the value of KEY=CNY_otc_coinPrecision. If there is no data, judge the value of KEY=CNY_coinPrecision. If there is no data for both, the value is 2 by default;
Precision of fiat currency (other modules except for the OTC): Used to distinguish the coin control of fiat currency. Take CNY as an example, judge the value of KEY=CNY_coinPrecision. If there is no data, the value is 2 by default;
# Configuration Description: The configuration number is 2 by default.
If you want to restrict users from specified countries from being able to log in to the exchange (including Web, H5, and APP), you can search for: LimitIpLoginCountryCode in the Exchange's Backstage Management System - System Configuration - Basic Configuration - KV Configuration
Configuration value: Enter the country code of the country you want to restrict. Click Query Country Code.
Explain:
After the modification, it needs to be [release online] to take effect.
If you use the IP number segment of the restricted country to access, it will jump to the specified description page.
If the user uses a VPN, that is, does not use the IP number segment of the restricted country, the exchange function can still be used normally.
The countries whose services are suspended displayed on the prompt page are dynamically displayed according to the restricted countries configured by KV
Web page tips
APP&H5 page tips
Restricted Registration
1)Restrict Registration Method
If you want to restrict the login & registration methods, such as only support mobile phone registration, support mobile phone and email at the same time, you can search in the exchange background management system - system configuration - basic configuration - KV configuration: login_regist_type.
Result:
2)Mobile phone number registration in some countries is restricted
If you want to restrict users in specified countries from logging in & registering through mobile phone numbers (including Web, H5, APP), you need to complete 3 steps:
Step1. Search in KV configuration: system_default_country_code.The phone area code currently set cannot be the country that merchant wants to restrict.
The configuration value here will determine when the user logs in & registers, the default mobile phone registration,when the mobile phone is registered by default, the international telephone area code of which country is displayed. If you want to restrict mainland China, the configuration value cannot be +86. Click to view international calling codes.
Step2. Search in KV configuration: system_default_country_code_real,
Confirm that the configured value is not the country code of the country you want to restrict,The country code here should be consistent with the country of the international telephone area code in Step1
Step3. Search in KV configuration: Exchange_limit_country_list, confirm that the configured value is the country code of the country you want to limit.
After the release is online, when selecting a mobile phone for registration & login, the international telephone area code of the country is hidden in the drop-down option, and the user cannot select it and cannot receive the SMS verification code.
3)Restrict new user registration in some countries
If you want to restrict users from a specified country to continue to log in, but cannot register new users, you can search for: LimitIpRegisterCountryCode in the exchange background management system - system configuration - basic configuration - KV configuration, and confirm that the configured value is the one you want to limit country code of the country.
After the release is online, when using the IP number segment of the restricted country for mobile phone & email registration, it will prompt: (After switching to the unrestricted IP number segment through VPN, the registration function is normal).
Functional Overview: To avoid issues with a single verification system, merchants can configure system parameters in the backend to flexibly switch between verification systems. Once configured, users will invoke the corresponding verification system for scenarios such as login and registration. The configuration process is as follows:
Prepare Cloudflare configuration parameters:
Registration account address: https://dash.cloudflare.com/
After logging in, go to the homepage, click on the left navigation "Turnstile," and on the page, click on "Add Site" as shown in the following image:
Enter the site name, domain, select the widget mode, and click on create. The selected widget mode corresponds to the verification style displayed on the user's end, as shown in the image below:
After creation, you can view the "Site Key" and "Secret Key" as shown in the image below. Fill in these two values in the backend KV [sys_conf_cloudflare_config].
In the spot backend management system - System Configuration - Basic Configuration - KV Configuration, search for:
sys_conf_geetest_config, configure Geetest account-related settings. Be sure to confirm the configuration; otherwise, verification will not be available.
sys_conf_cloudflare_config, configure Cloudflare account-related settings. Be sure to confirm the configuration; otherwise, verification will not be available.
sys_conf_switch, Web verification switch, manages whether Web and H5 have human-machine verification enabled. Configuration: 0 indicates off, 1 indicates on.
access_open, Backend verification switch, manages whether the spot backend has human-machine verification enabled. Configuration: 0 means closed, 1 means open.
sys_conf_validate, choose the sliding verification service provider, manages the verification methods for Web, H5, and the spot backend. Configuration: 0 for mixed mode, 2 for Geetest, 3 for Cloudflare. Mixed mode is a combination of existing verifications, with random verification.
app_access_open, App verification switch, manages whether the App has human-machine verification enabled. Configuration: 0 means closed, 1 means open.
app_sys_conf_validate, Sliding Verification Type(App-side). Configuration: 0 for mixed mode, 2 for Geetest, 3 for Cloudflare. Mixed mode is a combination of existing verifications, with random verification.
For verification method configurations other than 0, 2, 3, or when empty, Geetest verification is called by default.
2. In the contract backend management system - System Configuration - KV Configuration, search for:
sys_conf_geetest_config, configure Geetest account-related settings. Be sure to confirm the configuration; otherwise, verification will not be available.
sys_conf_cloudflare_config, configure Cloudflare account-related settings. Be sure to confirm the configuration; otherwise, verification will not be available.
access_open, Backend verification switch, manages whether the contract backend has human-machine verification enabled. Configuration: 0 means closed, 1 means open.
sys_conf_validate, choose the sliding verification service provider, manages the verification methods for the contract backend. Configuration: 0 for mixed mode, 2 for Geetest, 3 for Cloudflare. Mixed mode is a combination of existing verifications, with random verification.
For verification method configurations other than 0, 2, and 3, or when empty, Geetest verification is called by default.
Note:
The verification function can only be used when the parameters required for the verification system and the corresponding verification type are configured, and the corresponding switch is turned on.
If the verification type is selected and the switch is turned on but sys_conf_cloudflare_config or sys_conf_cloudflare_config parameters are not configured, an error will occur on the user side, and the backend cannot be logged in;If cloudflare is not used, sys_conf_cloudflare_config is empty and has no effect;
If a numerical value other than 0, 2, or 3 is entered for the verification type parameter, the default will be to call the Geetest verification.
If the switch is not turned on, no verification will be performed.