Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
- name: Build Docker images
env:
GENERATE_SOURCEMAP: ''
run: docker-compose -f docker-compose.build.yml build
run: docker compose -f docker-compose.build.yml build
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push images to GitHub Container Registry
run: docker-compose -f docker-compose.build.yml push
run: docker compose -f docker-compose.build.yml push
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push images to GitHub Container Registry
run: docker-compose -f docker-compose.build.yml push
run: docker compose -f docker-compose.build.yml push
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
env:
TAG: latest
GENERATE_SOURCEMAP: false
run: docker-compose -f docker-compose.build.yml build
run: docker compose -f docker-compose.build.yml build
4 changes: 3 additions & 1 deletion public/assets/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@
"TBNB": "TBNB",
"TBUSD": "TBUSD",
"BCH": "BCH",
"TRX": "TRX"
"TRX": "TRX",
"SOL": "SOL",
"TON": "TON"
},
"marketInterval": {
"24h": "24 hours",
Expand Down
4 changes: 3 additions & 1 deletion public/assets/locales/fa/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@
"TBNB": "بایننس (ت)",
"TBUSD": "دلار بایننس(ت)",
"BCH": "بیتکوین کش",
"TRX": "ترون"
"TRX": "ترون",
"SOL": "سولانا",
"TON": "تون کوین"
},
"marketInterval": {
"24h": "24 ساعت",
Expand Down
4 changes: 4 additions & 0 deletions src/assets/images.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import tron from "./images/src/tron.svg";
import testTron from "./images/src/testTron.svg";
import ethereumLight from "./images/src/ethereumLight.svg";
import toman from "./images/src/toman.svg";
import toncoin from "./images/src/toncoin.svg";
import solana from "./images/src/solana.svg";
import spaceStar from "./images/src/spaceStar.png";
import astronaut from "./images/src/astronaut.svg";
import astronautAlone from "./images/src/astronautAlone.svg";
Expand Down Expand Up @@ -64,6 +66,8 @@ export const images = {
TTRX: testTron,
ETH: ethereumLight,
IRT: toman,
TON: toncoin,
SOL: solana,
spaceStar: spaceStar,
astronaut: astronaut,
astronautAlone: astronautAlone,
Expand Down
36 changes: 36 additions & 0 deletions src/assets/images/src/solana.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 19 additions & 1 deletion src/assets/images/src/tether.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/assets/images/src/toncoin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ import {
} from "../../../../../../../../../../../../constants/chart";
import i18n from "i18next";
import {useGetChartCandlesticks} from "../../../../../../../../../../../../queries";
import {useTranslation} from "react-i18next";


const MarketChart = ({type}) => {

const {t} = useTranslation();

let chartProperties, candleSeries, volumeSeries;
const chart = useRef();

Expand Down Expand Up @@ -159,7 +163,7 @@ const MarketChart = ({type}) => {

return (
<div ref={chartContainerRef} className={`width-100 ${classes.chartContainer}`}>
<p className={classes.error}>{error}</p>
<p className={classes.error}>{error && t('charts.noChartData')}</p>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const TransactionHistory = () => {
value: query?.coin,
label: query?.coin ? t('currency.'+ query?.coin) : t('all'),
}}
onchange={(e) => setQuery({...query, coin: e.value})}
onchange={(e) => setQuery({...query, coin: e.value, offset:0})}
customClass={`width-100 my-1 ${classes.thisInput}`}
/>
<TextInput
Expand All @@ -167,7 +167,7 @@ const TransactionHistory = () => {
value: query?.category,
label: query?.category ? t('TransactionCategory.'+ query?.category) : t('all'),
}}
onchange={(e) => setQuery({...query, category: e.value})}
onchange={(e) => setQuery({...query, category: e.value, offset:0})}
customClass={`width-100 my-1 ${classes.thisInput}`}
/>
<TextInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const WalletSubMenu = () => {
</div>
<WalletBalance/>
<ScrollBar customClass={`column`}>
{assets.filter(asset => data.wallets[asset].free > 0)
.concat(assets.filter(asset => data.wallets[asset].free === 0))
{assets.filter(asset => data?.wallets?.[asset]?.free > 0)
.concat(assets.filter(asset => data?.wallets?.[asset]?.free === 0))
.map((name) => <WalletListItem key={name} assetName={name} showZero={showZero}/>)}
</ScrollBar>
</div>
Expand Down
13 changes: 13 additions & 0 deletions src/setup/configs/configs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const defaultConfigs = {
"logoUrl": "logo/url",
"title": "Title",
"description": "Description text",
"defaultLanguage": "en",
"supportedLanguages": [
"en"
],
"defaultTheme": "DARK",
"supportEmail": "supportEmail@gmail.com",
"baseCurrency": "TUSDT",
"dateType": "Hijri"
}
12 changes: 11 additions & 1 deletion src/store/sagas/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as actions from "../actions/index";
import jwtDecode from "jwt-decode";
import axios from "axios";
import i18n from "i18next";
import {defaultConfigs} from "../../setup/configs/configs";

export function* setThemeSaga(action) {
try {
Expand Down Expand Up @@ -81,14 +82,23 @@ export function* loadConfig(action) {
const {
data: {
defaultTheme,
language,
...configs
}
} = yield call(axios.get, '/config/web/v1')

yield put(actions.setExchangeConfigs(configs));

i18n.changeLanguage(language)
appTheme = defaultTheme;


} catch (e) {
i18n.changeLanguage(defaultConfigs?.defaultLanguage)
appTheme = defaultConfigs?.defaultTheme;
yield put(actions.setExchangeConfigs(defaultConfigs));
}

try {
const localTheme = yield call([localStorage, 'getItem'], 'theme')
if (localTheme) appTheme = localTheme;

Expand Down