# DEX Configuration

As DEX applications don't have an Admin Dashboard panel, all configurations will be done by editing configuration and template files. This section describes how to edit site-based configurations.

Open public folder and replace favicon.ico and mainlogo.png files.

# Customize main html file

The path for this file as follows:

src/pages/_document.tsx

Usually, this file is for adding Google Analytics Tracking or any other snippet codes.

# Customize colors

  1. Open swapkit-ui/src/theme/colors.ts file and update colors.
  2. Compile theme assets by running:
yarn build
  1. Run bash script
bash build.sh
  1. Compile project assets
yarn build
  1. Restart main application
pm2 restart swapkit

# Customize theme files

Theme files are located in src/views folder. After each update don't forget to rebuild assets and redeploy the project as follows:

yarn build
pm2 restart swapkit

# Tokens management

All the tokens are in src/config/constans/tokensLists folder.

To add a Token to the exchange lists:

  • For the default list: src/config/constant/tokenLists/pancake-default.tokenlist.json
  • To blacklist a token: src/config/constant/tokenLists/pancake-unsupported.tokenlist.json

# Staking management

# How to add a new pool

Custom pools are supported in SwapKit Pro plan, as it uses own routers/factory smart contracts. In SwapKit Standard plan, you use predefined pools provided by PancakeSwap.

  • Add an entry in src/config/constants/pools.ts, below the pool with the id 0
  • Before adding a new pool you need to make sure the Tokens are in the Tokenlist file (see Tokens management section).
  • Insert informations, with the contract address and the correct tokens
  • Pools APRs depend on farm data to compute prices

# Farms management

# How to add a new farm

Custom farms are supported in SwapKit Pro plan, as it uses own routers/factory smart contracts. In SwapKit Standard plan, you use predefined farms provided by PancakeSwap.

  • Add an entry in src/config/constants/farms.ts, below the farm with the pid 0.
  • Before adding a new farm you need to make sure the Tokens are in the Tokenlist file (see Tokens management section).
  • Insert informations, with the LP address and the correct tokens

# Translations

SwapKit is a multilingual script, so all language files are located separately for each language. All strings in the frontend part are fully translatable and editable.

The language directory you can find from the following directories:

English:

src/config/localization/translations.json

All other languages:

public/locales

How to edit translations files?

  • Navigate to src/config/localization directory
  • Open translations.json file.
  • Let's say we want to change the following text:

Connect Wallet

  • Find this content from the language file:
{
"Connect Wallet": "Connect Wallet",
}

Here, the left side before : char are keys of the translated strings. You need to change the content on the right side, after : char.

{
"Connect Wallet": "YOUR CHANGED TEXT HERE",
}

If you want to add new translations, you can append new lines in key:value format:

{
"Connect Wallet": "YOUR CHANGED TEXT HERE",
"NEW_CONTENT_KEY": "NEW_CONTENT_VALUE"
}

After you can use this translated value in the template file as:

{t('NEW_CONTENT_KEY')}

In order to deploy new translated strings to your live application, follow the steps below:

  1. Compile theme assets by running:
yarn build
  1. Compile project assets
yarn build
  1. Restart PM2 SwapKit Instance
pm2 restart swapkit

You can edit Social Media links from the following template file:

swapkit-ui/src/components/Footer/config.tsx

In order to deploy new social links to your live application, follow the steps below:

  1. Compile theme assets by running in the swapkit-ui directory:
yarn build
  1. Run bash script
bash build.sh
  1. Compile project assets
cd .. && yarn build
  1. Restart PM2 SwapKit Instance
pm2 restart swapkit