From b760037900c3fff062de0507287f78e587f59d6d Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 14 Dec 2023 14:14:45 +0200 Subject: [PATCH 01/68] Add filter summary icon --- src/icons/filter-summary.svg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/icons/filter-summary.svg diff --git a/src/icons/filter-summary.svg b/src/icons/filter-summary.svg new file mode 100644 index 000000000..8f5a811ba --- /dev/null +++ b/src/icons/filter-summary.svg @@ -0,0 +1,3 @@ + + + From 97ef3d7527255510d3abf07c66d837cef2bb587d Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 14 Dec 2023 14:20:07 +0200 Subject: [PATCH 02/68] Add minimum balance related keys/descriptions --- public/locales/en/translations.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json index bd3dfac6d..1962d5283 100644 --- a/public/locales/en/translations.json +++ b/public/locales/en/translations.json @@ -649,7 +649,12 @@ "volume": "Volume", "total": "Total", "trading_fees": "Trading Fees", - "fund_earnings": "Funding Earnings" + "fund_earnings": "Funding Earnings", + "filter": { + "title": "Filter", + "min_balance_switch": "Minimum Balance", + "min_balance_input": "Set a minimum balance for assets to show up in the table." + } } }, "symbols": { From 1a2f75bed3a0c1e788ff5778fe7480b386d3d7ff Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 14 Dec 2023 14:20:24 +0200 Subject: [PATCH 03/68] Actualize icons export --- src/icons/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/icons/index.js b/src/icons/index.js index 8f3883578..be57a0be2 100644 --- a/src/icons/index.js +++ b/src/icons/index.js @@ -28,6 +28,7 @@ import { ReactComponent as FILE_EXPORT } from './file-export.svg' import { ReactComponent as FILE_TABLE } from './file-table.svg' import { ReactComponent as FILTER } from './filter.svg' import { ReactComponent as FILTER_CLEAR } from './filter-clear.svg' +import { ReactComponent as FILTER_SUMMARY } from './filter-summary.svg' import { ReactComponent as GO_TO } from './go-to.svg' import { ReactComponent as HAMBURGER_MENU } from './hamburger-menu.svg' import { ReactComponent as INFO_CIRCLE } from './info-circle.svg' @@ -88,6 +89,7 @@ export default { FILE_TABLE, FILTER, FILTER_CLEAR, + FILTER_SUMMARY, GO_TO, HAMBURGER_MENU, INFO_CIRCLE, From b05b520e462dfe2ee4db3196c397bf0ca3460966 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 10:32:11 +0200 Subject: [PATCH 04/68] Update summary by asset constants --- src/state/summaryByAsset/constants.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/state/summaryByAsset/constants.js b/src/state/summaryByAsset/constants.js index 07a59bfcb..a25808bf4 100644 --- a/src/state/summaryByAsset/constants.js +++ b/src/state/summaryByAsset/constants.js @@ -3,4 +3,5 @@ export default { FETCH_FAIL: 'BITFINEX/SUMMARY_BY_ASSET/FETCH/FAIL', REFRESH: 'BITFINEX/SUMMARY_BY_ASSET/REFRESH', UPDATE: 'BITFINEX/SUMMARY_BY_ASSET/UPDATE', + SET_MIN_BALANCE: 'BITFINEX/SUMMARY_BY_ASSET/MINIMUM_BALANCE/SET', } From e240b5deb901f37e9b0618e0c74a83ab486beb87 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 10:34:24 +0200 Subject: [PATCH 05/68] Add setMinimumBalance action --- src/state/summaryByAsset/actions.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/state/summaryByAsset/actions.js b/src/state/summaryByAsset/actions.js index 3c10c23d5..95f742e71 100644 --- a/src/state/summaryByAsset/actions.js +++ b/src/state/summaryByAsset/actions.js @@ -26,9 +26,17 @@ export function updateData(payload) { } } +export function setMinimumBalance(payload) { + return { + type: types.SET_MIN_BALANCE, + payload, + } +} + export default { fetchFail, fetchData, refresh, updateData, + setMinimumBalance, } From f96efe784cd1af2f9f1466971020d121c9a37ef7 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 10:37:37 +0200 Subject: [PATCH 06/68] Actualize reducers handling cases, update initial state --- src/state/summaryByAsset/reducer.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/state/summaryByAsset/reducer.js b/src/state/summaryByAsset/reducer.js index 2da0e1845..f6e4ab0df 100644 --- a/src/state/summaryByAsset/reducer.js +++ b/src/state/summaryByAsset/reducer.js @@ -7,6 +7,7 @@ export const initialState = { dataReceived: false, pageLoading: false, data: {}, + minimumBalance: 0, } export function summaryByAssetReducer(state = initialState, action) { @@ -22,6 +23,12 @@ export function summaryByAssetReducer(state = initialState, action) { data: payload, } } + case types.SET_MIN_BALANCE: { + return { + ...state, + minimumBalance: payload, + } + } case types.FETCH_FAIL: return fetchFail(state) case types.REFRESH: From 9290f606f2f9ac1b9fffdbb02629b1fc34a4d71a Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 10:39:45 +0200 Subject: [PATCH 07/68] Implement minimum balance selector --- src/state/summaryByAsset/selectors.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/state/summaryByAsset/selectors.js b/src/state/summaryByAsset/selectors.js index e2c000e36..a7e10acb0 100644 --- a/src/state/summaryByAsset/selectors.js +++ b/src/state/summaryByAsset/selectors.js @@ -3,6 +3,7 @@ export const getSummaryByAsset = state => state.summaryByAsset export const getData = state => getSummaryByAsset(state)?.data export const getDataReceived = state => getSummaryByAsset(state)?.dataReceived ?? false export const getPageLoading = state => getSummaryByAsset(state)?.pageLoading ?? false +export const getMinimumBalance = state => getSummaryByAsset(state)?.minimumBalance ?? 0 export const getSummaryByAssetEntries = state => getData(state)?.summaryByAsset ?? [] export const getSummaryByAssetTotal = state => getData(state)?.total ?? {} @@ -12,4 +13,5 @@ export default { getPageLoading, getSummaryByAssetEntries, getSummaryByAssetTotal, + getMinimumBalance, } From 11c88156163a83d6592d48318d1ff9ebb7574df3 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 10:57:56 +0200 Subject: [PATCH 08/68] Enhance input type number appearance --- src/styles/index.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/styles/index.scss b/src/styles/index.scss index bdd47c6f2..8fb9892ce 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -70,6 +70,18 @@ html { display: none !important; } +/* Chrome, Safari, Edge, Opera */ +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +/* Firefox */ +input[type=number] { + -moz-appearance: textfield; +} + .app { display: flex; flex-direction: row; From 96afcf3c5e4143bc691950d216ca507384ea8a5a Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 11:36:38 +0200 Subject: [PATCH 09/68] [wip] Summary by asset filters --- .../AppSummary/AppSummary.filters.js | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/components/AppSummary/AppSummary.filters.js diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js new file mode 100644 index 000000000..19c398176 --- /dev/null +++ b/src/components/AppSummary/AppSummary.filters.js @@ -0,0 +1,54 @@ +import React, { useState, memo } from 'react' +// import { useTranslation } from 'react-i18next' +import { useSelector } from 'react-redux' +import classNames from 'classnames' +import { + Popover, + Position, +} from '@blueprintjs/core' + +import Icon from 'icons' + +import { getMinimumBalance } from 'state/summaryByAsset/selectors' + +const SummaryFilters = () => { + // const { t } = useTranslation() + const { minimumBalance } = useSelector(getMinimumBalance) + const [isOpen, setIsOpen] = useState(false) + + const togglePopover = (isPopoverOpen) => { + setIsOpen(isPopoverOpen) + } + + const classes = classNames('.summary-filters--menu', { + '.summary-filters--menu-open': isOpen, + }) + + return ( +
+ togglePopover(true)} + onClosing={() => togglePopover(false)} + content={( +
+ Minimum Balance: + {' '} + {minimumBalance} +
+ )} + targetTagName='div' + popoverClassName='summary-filters--menu-popover' + > + + + +
+
+ ) +} + +export default memo(SummaryFilters) From b33d1c61dd4ddacdb28da5d33043637a71c9fe73 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 11:44:06 +0200 Subject: [PATCH 10/68] Add filters to summary by asset section --- src/components/AppSummary/AppSummary.byAsset.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/AppSummary/AppSummary.byAsset.js b/src/components/AppSummary/AppSummary.byAsset.js index a8dd2615b..4d74558b5 100644 --- a/src/components/AppSummary/AppSummary.byAsset.js +++ b/src/components/AppSummary/AppSummary.byAsset.js @@ -18,6 +18,7 @@ import { getTimezone } from 'state/base/selectors' import { getIsSyncRequired } from 'state/sync/selectors' import { getTimeRange, getTimeFrame } from 'state/timeRange/selectors' +import SummaryFilters from './AppSummary.filters' import { getAssetColumns } from './AppSummary.columns' import { prepareSummaryByAssetData } from './AppSummary.helpers' @@ -74,6 +75,7 @@ const AppSummaryByAsset = () => {
{t('summary.by_asset.title')}
+
{t('summary.by_asset.sub_title')} {`${formatDate(start, timezone)} - ${formatDate(end, timezone)}`} From 03ac2fbfefb775ed76323c5b396c1100efb55dcd Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 11:44:32 +0200 Subject: [PATCH 11/68] Update summary filter icon --- src/components/AppSummary/AppSummary.filters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 19c398176..bad6b5499 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -44,7 +44,7 @@ const SummaryFilters = () => { popoverClassName='summary-filters--menu-popover' > - +
From a395993729296f7eb2e89eba9a2a1291767b9930 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 11:47:42 +0200 Subject: [PATCH 12/68] Fix minimum balance getter --- src/components/AppSummary/AppSummary.filters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index bad6b5499..3144dc646 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -13,7 +13,7 @@ import { getMinimumBalance } from 'state/summaryByAsset/selectors' const SummaryFilters = () => { // const { t } = useTranslation() - const { minimumBalance } = useSelector(getMinimumBalance) + const minimumBalance = useSelector(getMinimumBalance) const [isOpen, setIsOpen] = useState(false) const togglePopover = (isPopoverOpen) => { From ff3c3316ebf876b1b4904dec66d81d274dd57667 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 11:55:02 +0200 Subject: [PATCH 13/68] Adjust summary filters positioning --- src/components/AppSummary/AppSummary.byAsset.js | 8 +++++--- src/components/AppSummary/_AppSummary.scss | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/AppSummary/AppSummary.byAsset.js b/src/components/AppSummary/AppSummary.byAsset.js index 4d74558b5..65459c4fc 100644 --- a/src/components/AppSummary/AppSummary.byAsset.js +++ b/src/components/AppSummary/AppSummary.byAsset.js @@ -72,10 +72,12 @@ const AppSummaryByAsset = () => { return (
-
- {t('summary.by_asset.title')} +
+
+ {t('summary.by_asset.title')} +
+
-
{t('summary.by_asset.sub_title')} {`${formatDate(start, timezone)} - ${formatDate(end, timezone)}`} diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index de6920bac..7666eae39 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -137,6 +137,12 @@ max-width: 100%; min-height: 300px; + .app-summary-item-title--row { + display: flex; + align-items: center; + justify-content: space-between; + } + .bp3-table-container { box-shadow: none; } From 346e194367b38635a985213726045ad5fbf5a4dc Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 12:43:12 +0200 Subject: [PATCH 14/68] Adjust summery filters row --- src/components/AppSummary/_AppSummary.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 7666eae39..8bfaa0647 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -139,6 +139,7 @@ .app-summary-item-title--row { display: flex; + max-width: 1000px; align-items: center; justify-content: space-between; } From 1266ecc51b2aa9a88f8051b276beb48ccdde9a4d Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 14:56:47 +0200 Subject: [PATCH 15/68] Update summary constants --- src/state/summaryByAsset/constants.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/state/summaryByAsset/constants.js b/src/state/summaryByAsset/constants.js index a25808bf4..d048d3825 100644 --- a/src/state/summaryByAsset/constants.js +++ b/src/state/summaryByAsset/constants.js @@ -4,4 +4,5 @@ export default { REFRESH: 'BITFINEX/SUMMARY_BY_ASSET/REFRESH', UPDATE: 'BITFINEX/SUMMARY_BY_ASSET/UPDATE', SET_MIN_BALANCE: 'BITFINEX/SUMMARY_BY_ASSET/MINIMUM_BALANCE/SET', + USE_MIN_BALANCE: 'BITFINEX/SUMMARY_BY_ASSET/MINIMUM_BALANCE/USE', } From 70abf66c242849bcd4a366a08cf61b411afe7060 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 14:58:40 +0200 Subject: [PATCH 16/68] Add min balance usage action --- src/state/summaryByAsset/actions.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/state/summaryByAsset/actions.js b/src/state/summaryByAsset/actions.js index 95f742e71..d546a040f 100644 --- a/src/state/summaryByAsset/actions.js +++ b/src/state/summaryByAsset/actions.js @@ -33,10 +33,18 @@ export function setMinimumBalance(payload) { } } +export function useMinimumBalance(payload) { + return { + type: types.USE_MIN_BALANCE, + payload, + } +} + export default { fetchFail, fetchData, refresh, updateData, setMinimumBalance, + useMinimumBalance, } From cd88dab854504ffb8f4244a0c78a53e9a016d579 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 15:11:07 +0200 Subject: [PATCH 17/68] Update summary by asset reducers --- src/state/summaryByAsset/reducer.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/state/summaryByAsset/reducer.js b/src/state/summaryByAsset/reducer.js index f6e4ab0df..8d3c394f2 100644 --- a/src/state/summaryByAsset/reducer.js +++ b/src/state/summaryByAsset/reducer.js @@ -8,6 +8,7 @@ export const initialState = { pageLoading: false, data: {}, minimumBalance: 0, + useMinBalance: true, } export function summaryByAssetReducer(state = initialState, action) { @@ -29,6 +30,12 @@ export function summaryByAssetReducer(state = initialState, action) { minimumBalance: payload, } } + case types.USE_MIN_BALANCE: { + return { + ...state, + useMinBalance: payload, + } + } case types.FETCH_FAIL: return fetchFail(state) case types.REFRESH: From 37612ed946ba1a4ff9ee6f591d83d98567a8ce5a Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 15:11:41 +0200 Subject: [PATCH 18/68] Add getUseMinBalance selector --- src/state/summaryByAsset/selectors.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/state/summaryByAsset/selectors.js b/src/state/summaryByAsset/selectors.js index a7e10acb0..2524a7b3e 100644 --- a/src/state/summaryByAsset/selectors.js +++ b/src/state/summaryByAsset/selectors.js @@ -1,8 +1,9 @@ export const getSummaryByAsset = state => state.summaryByAsset export const getData = state => getSummaryByAsset(state)?.data -export const getDataReceived = state => getSummaryByAsset(state)?.dataReceived ?? false export const getPageLoading = state => getSummaryByAsset(state)?.pageLoading ?? false +export const getDataReceived = state => getSummaryByAsset(state)?.dataReceived ?? false +export const getUseMinBalance = state => getSummaryByAsset(state)?.useMinBalance ?? true export const getMinimumBalance = state => getSummaryByAsset(state)?.minimumBalance ?? 0 export const getSummaryByAssetEntries = state => getData(state)?.summaryByAsset ?? [] export const getSummaryByAssetTotal = state => getData(state)?.total ?? {} @@ -14,4 +15,5 @@ export default { getSummaryByAssetEntries, getSummaryByAssetTotal, getMinimumBalance, + getUseMinBalance, } From eeeeb88aa0f4e80160fe53b532b4d29966bcc188 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 4 Jan 2024 15:24:16 +0200 Subject: [PATCH 19/68] [wip] Summary filters handlers --- src/components/AppSummary/AppSummary.filters.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 3144dc646..36a55893a 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -1,6 +1,6 @@ -import React, { useState, memo } from 'react' +import React, { useState } from 'react' // import { useTranslation } from 'react-i18next' -import { useSelector } from 'react-redux' +import { useDispatch, useSelector } from 'react-redux' import classNames from 'classnames' import { Popover, @@ -8,11 +8,12 @@ import { } from '@blueprintjs/core' import Icon from 'icons' - import { getMinimumBalance } from 'state/summaryByAsset/selectors' +// import { setMinimumBalance, useMinimumBalance } from 'state/summaryByAsset/actions' const SummaryFilters = () => { // const { t } = useTranslation() + // const dispatch = useDispatch() const minimumBalance = useSelector(getMinimumBalance) const [isOpen, setIsOpen] = useState(false) @@ -51,4 +52,4 @@ const SummaryFilters = () => { ) } -export default memo(SummaryFilters) +export default SummaryFilters From 414bf322c5d04164a51c37f38e7bdc94bcf70709 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Fri, 5 Jan 2024 14:36:31 +0200 Subject: [PATCH 20/68] Adjust summary filter icon --- src/icons/filter-summary.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/icons/filter-summary.svg b/src/icons/filter-summary.svg index 8f5a811ba..85fe12987 100644 --- a/src/icons/filter-summary.svg +++ b/src/icons/filter-summary.svg @@ -1,3 +1,3 @@ - - + + From d0d93a04be187a7ab903a132e57008879c3fc72c Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Fri, 5 Jan 2024 14:46:36 +0200 Subject: [PATCH 21/68] Add summery filters btn styling --- src/components/AppSummary/_AppSummary.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 8bfaa0647..60d096aff 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -142,6 +142,16 @@ max-width: 1000px; align-items: center; justify-content: space-between; + + .summary-filters { + &--button { + display: flex; + min-width: 84px; + min-height: 34px; + border-radius: 4px; + border: 1px solid grey; + } + } } .bp3-table-container { From 394370f3e14af6420706fd16d343f1bbafd349db Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Fri, 5 Jan 2024 14:53:17 +0200 Subject: [PATCH 22/68] Add summary filter button --- src/components/AppSummary/AppSummary.filters.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 36a55893a..e9940b0a1 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -1,5 +1,5 @@ import React, { useState } from 'react' -// import { useTranslation } from 'react-i18next' +import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import classNames from 'classnames' import { @@ -12,7 +12,7 @@ import { getMinimumBalance } from 'state/summaryByAsset/selectors' // import { setMinimumBalance, useMinimumBalance } from 'state/summaryByAsset/actions' const SummaryFilters = () => { - // const { t } = useTranslation() + const { t } = useTranslation() // const dispatch = useDispatch() const minimumBalance = useSelector(getMinimumBalance) const [isOpen, setIsOpen] = useState(false) @@ -44,9 +44,10 @@ const SummaryFilters = () => { targetTagName='div' popoverClassName='summary-filters--menu-popover' > - +
- + {t('summary.by_asset.filter.title')} +
) From 1d9c02f713b1b8073e566e117903d4c5fcece688 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Fri, 5 Jan 2024 14:58:12 +0200 Subject: [PATCH 23/68] Improve filters icon positioning and styling --- src/components/AppSummary/_AppSummary.scss | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 60d096aff..e59a4e7a0 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -146,10 +146,18 @@ .summary-filters { &--button { display: flex; + align-items: center; + justify-content: center; min-width: 84px; min-height: 34px; border-radius: 4px; - border: 1px solid grey; + color: var(--color2); + border: 1px solid var(--color2); + + svg { + margin-top: -3px; + margin-right: 5px; + } } } } From bbf6515be85611a7208caa51582d38890e096305 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Fri, 5 Jan 2024 15:06:16 +0200 Subject: [PATCH 24/68] Actualize colors and on hover behavior --- src/components/AppSummary/_AppSummary.scss | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index e59a4e7a0..39c52871a 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -140,11 +140,15 @@ .app-summary-item-title--row { display: flex; max-width: 1000px; + position: relative; align-items: center; justify-content: space-between; .summary-filters { &--button { + top: 7px; + right: 0; + position: absolute; display: flex; align-items: center; justify-content: center; @@ -152,7 +156,11 @@ min-height: 34px; border-radius: 4px; color: var(--color2); - border: 1px solid var(--color2); + border: 1px solid var(--borderColor); + + &:hover { + cursor: pointer; + } svg { margin-top: -3px; From b3a8138778cbd9e11efcd6a356fb3cc062df8e8a Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Fri, 5 Jan 2024 15:14:32 +0200 Subject: [PATCH 25/68] Rework and improve summary by asset titles section --- src/components/AppSummary/AppSummary.byAsset.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/AppSummary/AppSummary.byAsset.js b/src/components/AppSummary/AppSummary.byAsset.js index 65459c4fc..154ddc0a3 100644 --- a/src/components/AppSummary/AppSummary.byAsset.js +++ b/src/components/AppSummary/AppSummary.byAsset.js @@ -73,15 +73,17 @@ const AppSummaryByAsset = () => { return (
-
- {t('summary.by_asset.title')} +
+
+ {t('summary.by_asset.title')} +
+
+ {t('summary.by_asset.sub_title')} + {`${formatDate(start, timezone)} - ${formatDate(end, timezone)}`} +
-
- {t('summary.by_asset.sub_title')} - {`${formatDate(start, timezone)} - ${formatDate(end, timezone)}`} -
{showContent}
) From 3ba54e7caf7b3fe6aecac101e3ce6a3a0f5c25ef Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Fri, 5 Jan 2024 15:14:59 +0200 Subject: [PATCH 26/68] Fix summary filters modal positioning --- src/components/AppSummary/_AppSummary.scss | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 39c52871a..f2b471976 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -146,9 +146,6 @@ .summary-filters { &--button { - top: 7px; - right: 0; - position: absolute; display: flex; align-items: center; justify-content: center; From 9f1416cee9032234d90912bfea7287b4920c277a Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 11:40:13 +0200 Subject: [PATCH 27/68] Fix filter flickering on refresh --- src/components/AppSummary/_AppSummary.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index f2b471976..0a878dbb9 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -20,7 +20,7 @@ display: flex; flex-wrap: wrap; max-width: 1000px; - min-height: 390px; + min-height: 441px; align-items: flex-start; justify-content: space-between; margin-bottom: 35px; @@ -112,7 +112,7 @@ .loading-container { display: flex; margin-top: -4px; - min-height: 320px; + min-height: 387px; .loading { margin: auto; @@ -160,7 +160,7 @@ } svg { - margin-top: -3px; + margin-top: -2px; margin-right: 5px; } } @@ -291,7 +291,7 @@ .loading-container { display: flex; - min-height: 320px; + min-height: 387px; .loading { margin: auto; From fc8b38bf9e9679ecfeca0ce83dd5bf0254925f38 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 11:40:35 +0200 Subject: [PATCH 28/68] Adjust icon config --- src/icons/filter-summary.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/icons/filter-summary.svg b/src/icons/filter-summary.svg index 85fe12987..cc106795a 100644 --- a/src/icons/filter-summary.svg +++ b/src/icons/filter-summary.svg @@ -1,3 +1,3 @@ - + From 94cce80471cfc34d9ed3460ac49151f0ad2fb1bb Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 12:29:06 +0200 Subject: [PATCH 29/68] Actualize filters active state styling --- src/components/AppSummary/_AppSummary.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 0a878dbb9..4a436d79a 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -163,6 +163,17 @@ margin-top: -2px; margin-right: 5px; } + + &.bp3-active { + color: var(--thColor); + border-color: var(--thColor); + + svg { + path { + stroke: var(--thColor); + } + } + } } } } From 4359efc9cf44d0970583b889649d6c6b17fc53dc Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 12:41:05 +0200 Subject: [PATCH 30/68] Add summary filters popover menu styling --- src/components/AppSummary/_AppSummary.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 4a436d79a..269a3428e 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -175,6 +175,15 @@ } } } + + &--menu-popover { + min-width: 314px; + min-height: 150px; + padding: 26px 24px; + border-radius: 4px; + background-color: var(--bgColor2); + border: 1px solid var(--borderColor); + } } } From 398799fbf648c30f6457c88140070d5544b99d9f Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 12:58:17 +0200 Subject: [PATCH 31/68] Switch row and title styling --- src/components/AppSummary/_AppSummary.scss | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 269a3428e..1be930f27 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -183,6 +183,23 @@ border-radius: 4px; background-color: var(--bgColor2); border: 1px solid var(--borderColor); + + .bp3-popover-content { + background-color: var(--bgColor2); + + .switch { + &-row { + display: flex; + align-items: center; + justify-content: space-between; + } + + &-title { + font-size: 14px; + } + } + + } } } } From 6fb2b50c6367c2c91aaacb684a763f7a1f4bf052 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 12:58:46 +0200 Subject: [PATCH 32/68] Add summary filters row and title --- src/components/AppSummary/AppSummary.filters.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index e9940b0a1..65d6e46bd 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -17,6 +17,8 @@ const SummaryFilters = () => { const minimumBalance = useSelector(getMinimumBalance) const [isOpen, setIsOpen] = useState(false) + console.log('++minimumBalance', minimumBalance) + const togglePopover = (isPopoverOpen) => { setIsOpen(isPopoverOpen) } @@ -36,9 +38,11 @@ const SummaryFilters = () => { onClosing={() => togglePopover(false)} content={(
- Minimum Balance: - {' '} - {minimumBalance} +
+
+ {t('summary.by_asset.filter.min_balance_switch')} +
+
)} targetTagName='div' From 761611f8d88c54a58eab4de3a54ca2ddbe5a3bbd Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 13:31:19 +0200 Subject: [PATCH 33/68] Add min balance imput label --- src/components/AppSummary/AppSummary.filters.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 65d6e46bd..2abb73236 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -43,6 +43,9 @@ const SummaryFilters = () => { {t('summary.by_asset.filter.min_balance_switch')}
+
+ {t('summary.by_asset.filter.min_balance_input')} +
)} targetTagName='div' From 9f9badc2c31640efea33d3885b30b59863af6361 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 13:31:47 +0200 Subject: [PATCH 34/68] Actualize imput label styling --- src/components/AppSummary/_AppSummary.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 1be930f27..205ace82b 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -192,6 +192,7 @@ display: flex; align-items: center; justify-content: space-between; + margin-bottom: 10px; } &-title { @@ -199,6 +200,11 @@ } } + .balance-input-label { + font-size: 14px; + max-width: 266px; + color: var(--color2); + } } } } From 8b8eb70a473f5453c5164882c207a5ddaf59335d Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 13:49:02 +0200 Subject: [PATCH 35/68] Add balance usage switch, update positioning --- src/components/AppSummary/AppSummary.filters.js | 2 ++ src/components/AppSummary/_AppSummary.scss | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 2abb73236..a99ee38e5 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import classNames from 'classnames' import { + Switch, Popover, Position, } from '@blueprintjs/core' @@ -42,6 +43,7 @@ const SummaryFilters = () => {
{t('summary.by_asset.filter.min_balance_switch')}
+
{t('summary.by_asset.filter.min_balance_input')} diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 205ace82b..bb17ef7a1 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -193,6 +193,10 @@ align-items: center; justify-content: space-between; margin-bottom: 10px; + + .bp3-control { + margin-bottom: 0; + } } &-title { From c4c700af9bc657f8239cb87fb3b8d584a56b28e5 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 14:08:34 +0200 Subject: [PATCH 36/68] Update themes --- src/styles/themes/_dark.scss | 3 +++ src/styles/themes/_light.scss | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/styles/themes/_dark.scss b/src/styles/themes/_dark.scss index 43eab62eb..339b4e887 100644 --- a/src/styles/themes/_dark.scss +++ b/src/styles/themes/_dark.scss @@ -108,4 +108,7 @@ // shortcuts --shortcutHoverBg: #19354a; + + //switch + --switchBtnColor: #586871 } diff --git a/src/styles/themes/_light.scss b/src/styles/themes/_light.scss index f2604fc86..4516cb124 100644 --- a/src/styles/themes/_light.scss +++ b/src/styles/themes/_light.scss @@ -108,4 +108,7 @@ // shortcuts --shortcutHoverBg: #d8ecfb; + + //switch + --switchBtnColor: #586871 } From 46d7ee4d7506fe532ce7189c74859a21723ccd56 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 14:13:40 +0200 Subject: [PATCH 37/68] Actualize switch btn representation --- src/components/AppSummary/_AppSummary.scss | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index bb17ef7a1..013ff2ca8 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -194,9 +194,17 @@ justify-content: space-between; margin-bottom: 10px; - .bp3-control { + .bp3-control.bp3-switch { margin-bottom: 0; - } + + .bp3-control-indicator { + background: var(--bgColor); + + &::before { + background: var(--switchBtnColor); + } + } + } } &-title { From da2b0858d7e7c17750b09a53dc7178fcb650d3a8 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 14:13:58 +0200 Subject: [PATCH 38/68] Update swicth config --- src/components/AppSummary/AppSummary.filters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index a99ee38e5..5b633c904 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -43,7 +43,7 @@ const SummaryFilters = () => {
{t('summary.by_asset.filter.min_balance_switch')}
- +
{t('summary.by_asset.filter.min_balance_input')} From d05e0b965bfeee0f33397db6bca3a677699dd322 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 16:16:11 +0200 Subject: [PATCH 39/68] Fix indicator alignment --- src/components/AppSummary/AppSummary.filters.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 5b633c904..2f0f298ab 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import classNames from 'classnames' import { + Alignment, Switch, Popover, Position, @@ -43,7 +44,11 @@ const SummaryFilters = () => {
{t('summary.by_asset.filter.min_balance_switch')}
- +
{t('summary.by_asset.filter.min_balance_input')} From e1c0d459656ea2ec143c978d2501bc2d31b838db Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 16:34:51 +0200 Subject: [PATCH 40/68] Rework toggling min balance action --- src/state/summaryByAsset/actions.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/state/summaryByAsset/actions.js b/src/state/summaryByAsset/actions.js index d546a040f..835048d59 100644 --- a/src/state/summaryByAsset/actions.js +++ b/src/state/summaryByAsset/actions.js @@ -33,10 +33,9 @@ export function setMinimumBalance(payload) { } } -export function useMinimumBalance(payload) { +export function toggleUseMinimumBalance() { return { - type: types.USE_MIN_BALANCE, - payload, + type: types.TOGGLE_USE_MIN_BALANCE, } } @@ -46,5 +45,5 @@ export default { refresh, updateData, setMinimumBalance, - useMinimumBalance, + toggleUseMinimumBalance, } From c8580cd947e3402958847e3e28ca63b042705a2a Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 16:35:45 +0200 Subject: [PATCH 41/68] Update by asset constants --- src/state/summaryByAsset/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/summaryByAsset/constants.js b/src/state/summaryByAsset/constants.js index d048d3825..d7e06821d 100644 --- a/src/state/summaryByAsset/constants.js +++ b/src/state/summaryByAsset/constants.js @@ -4,5 +4,5 @@ export default { REFRESH: 'BITFINEX/SUMMARY_BY_ASSET/REFRESH', UPDATE: 'BITFINEX/SUMMARY_BY_ASSET/UPDATE', SET_MIN_BALANCE: 'BITFINEX/SUMMARY_BY_ASSET/MINIMUM_BALANCE/SET', - USE_MIN_BALANCE: 'BITFINEX/SUMMARY_BY_ASSET/MINIMUM_BALANCE/USE', + TOGGLE_USE_MIN_BALANCE: 'BITFINEX/SUMMARY_BY_ASSET/MINIMUM_BALANCE/USE/TOGGLE', } From d03585af7376338670a2e4e05681fd920b6360d2 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 16:36:19 +0200 Subject: [PATCH 42/68] Implement minimum balance usage toggling --- src/components/AppSummary/AppSummary.filters.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 2f0f298ab..d6a9eb1c9 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -10,21 +10,27 @@ import { } from '@blueprintjs/core' import Icon from 'icons' -import { getMinimumBalance } from 'state/summaryByAsset/selectors' -// import { setMinimumBalance, useMinimumBalance } from 'state/summaryByAsset/actions' +import { getMinimumBalance, getUseMinBalance } from 'state/summaryByAsset/selectors' +import { setMinimumBalance, toggleUseMinimumBalance } from 'state/summaryByAsset/actions' const SummaryFilters = () => { const { t } = useTranslation() - // const dispatch = useDispatch() + const dispatch = useDispatch() const minimumBalance = useSelector(getMinimumBalance) + const useMinimumBalance = useSelector(getUseMinBalance) const [isOpen, setIsOpen] = useState(false) console.log('++minimumBalance', minimumBalance) + console.log('++useMinimumBalance', useMinimumBalance) const togglePopover = (isPopoverOpen) => { setIsOpen(isPopoverOpen) } + const toggleSwitch = (e) => { + console.log('+++swicth e', e) + } + const classes = classNames('.summary-filters--menu', { '.summary-filters--menu-open': isOpen, }) @@ -46,8 +52,9 @@ const SummaryFilters = () => {
dispatch(toggleUseMinimumBalance())} />
From 6c9d33b471a4c94848c55bbf82805deb3549a672 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 16:36:46 +0200 Subject: [PATCH 43/68] Actualize summary by asset reducers cases --- src/state/summaryByAsset/reducer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/state/summaryByAsset/reducer.js b/src/state/summaryByAsset/reducer.js index 8d3c394f2..e88e74ab2 100644 --- a/src/state/summaryByAsset/reducer.js +++ b/src/state/summaryByAsset/reducer.js @@ -30,10 +30,10 @@ export function summaryByAssetReducer(state = initialState, action) { minimumBalance: payload, } } - case types.USE_MIN_BALANCE: { + case types.TOGGLE_USE_MIN_BALANCE: { return { ...state, - useMinBalance: payload, + useMinBalance: !state.useMinBalance, } } case types.FETCH_FAIL: From 73424361c563335370d7722344ddeb19bb791277 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 16:40:36 +0200 Subject: [PATCH 44/68] Update switch classes, cleanup --- src/components/AppSummary/AppSummary.filters.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index d6a9eb1c9..dad29db93 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -27,14 +27,14 @@ const SummaryFilters = () => { setIsOpen(isPopoverOpen) } - const toggleSwitch = (e) => { - console.log('+++swicth e', e) - } - const classes = classNames('.summary-filters--menu', { '.summary-filters--menu-open': isOpen, }) + const switchClasses = classNames('.switch-btn', { + '.switch-btn--active': useMinimumBalance, + }) + return (
{
dispatch(toggleUseMinimumBalance())} From cbf1d96eae6e3fab50849b9c54f5f5197b80d450 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 17:06:59 +0200 Subject: [PATCH 45/68] Fix classes --- src/components/AppSummary/AppSummary.filters.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index dad29db93..f41bfc386 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -27,12 +27,12 @@ const SummaryFilters = () => { setIsOpen(isPopoverOpen) } - const classes = classNames('.summary-filters--menu', { - '.summary-filters--menu-open': isOpen, + const classes = classNames('summary-filters--menu', { + 'summary-filters--menu-open': isOpen, }) - const switchClasses = classNames('.switch-btn', { - '.switch-btn--active': useMinimumBalance, + const switchClasses = classNames('switch-btn', { + active: useMinimumBalance, }) return ( From 6408d4be6ecf67b6058816c38240db8a1f421f82 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Mon, 8 Jan 2024 17:08:14 +0200 Subject: [PATCH 46/68] Improve switch active state representation --- src/components/AppSummary/_AppSummary.scss | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 013ff2ca8..c6d15bf84 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -194,17 +194,25 @@ justify-content: space-between; margin-bottom: 10px; - .bp3-control.bp3-switch { + .switch-btn{ margin-bottom: 0; .bp3-control-indicator { background: var(--bgColor); - &::before { background: var(--switchBtnColor); } } - } + + &.active { + .bp3-control-indicator { + background: var(--thColor); + &::before { + background: var(--color); + } + } + } + } } &-title { From b5f77b406724782097be097e4075c16b893a5c6a Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 11:29:27 +0200 Subject: [PATCH 47/68] Update use min balance initial state --- src/state/summaryByAsset/reducer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/summaryByAsset/reducer.js b/src/state/summaryByAsset/reducer.js index e88e74ab2..0e3f486a8 100644 --- a/src/state/summaryByAsset/reducer.js +++ b/src/state/summaryByAsset/reducer.js @@ -8,7 +8,7 @@ export const initialState = { pageLoading: false, data: {}, minimumBalance: 0, - useMinBalance: true, + useMinBalance: false, } export function summaryByAssetReducer(state = initialState, action) { From a83722c8e50d202fef7d8696ddcf9ebd2142d3fc Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 11:40:55 +0200 Subject: [PATCH 48/68] Add minimum balance input --- .../AppSummary/AppSummary.filters.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index f41bfc386..82e309a29 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -10,6 +10,7 @@ import { } from '@blueprintjs/core' import Icon from 'icons' +import InputKey from 'components/Auth/InputKey' import { getMinimumBalance, getUseMinBalance } from 'state/summaryByAsset/selectors' import { setMinimumBalance, toggleUseMinimumBalance } from 'state/summaryByAsset/actions' @@ -27,6 +28,15 @@ const SummaryFilters = () => { setIsOpen(isPopoverOpen) } + // const onChange = (isPopoverOpen) => { + // setIsOpen(isPopoverOpen) + // } + + const onChange = (event) => { + // const { name, value } = event.target + console.log('+++event', event) + } + const classes = classNames('summary-filters--menu', { 'summary-filters--menu-open': isOpen, }) @@ -61,6 +71,14 @@ const SummaryFilters = () => {
{t('summary.by_asset.filter.min_balance_input')}
+
+ +
)} targetTagName='div' From 3043bad7c2b5bc69e5719b0631b6cfd7b2c3da7e Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 11:43:03 +0200 Subject: [PATCH 49/68] Fix input key values types related warnings --- src/components/Auth/InputKey/InputKey.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Auth/InputKey/InputKey.js b/src/components/Auth/InputKey/InputKey.js index 5d95f79a2..8bf1c4632 100644 --- a/src/components/Auth/InputKey/InputKey.js +++ b/src/components/Auth/InputKey/InputKey.js @@ -35,11 +35,11 @@ export const InputKey = ({ InputKey.propTypes = { name: PropTypes.string, + type: PropTypes.string, label: PropTypes.string, - value: PropTypes.string, onChange: PropTypes.func, placeholder: PropTypes.string, - type: PropTypes.string, + value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), } InputKey.defaultProps = { From 8e1a8dcb1f6321a064f58a0c90e4878db68e6e90 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 11:47:46 +0200 Subject: [PATCH 50/68] Allow optional labels for input keys --- src/components/Auth/InputKey/InputKey.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Auth/InputKey/InputKey.js b/src/components/Auth/InputKey/InputKey.js index 8bf1c4632..2b6ed6410 100644 --- a/src/components/Auth/InputKey/InputKey.js +++ b/src/components/Auth/InputKey/InputKey.js @@ -18,7 +18,7 @@ export const InputKey = ({ return (
Date: Tue, 9 Jan 2024 11:54:49 +0200 Subject: [PATCH 51/68] Adjust initial minimum balance --- src/state/summaryByAsset/reducer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/summaryByAsset/reducer.js b/src/state/summaryByAsset/reducer.js index 0e3f486a8..986033dfa 100644 --- a/src/state/summaryByAsset/reducer.js +++ b/src/state/summaryByAsset/reducer.js @@ -7,7 +7,7 @@ export const initialState = { dataReceived: false, pageLoading: false, data: {}, - minimumBalance: 0, + minimumBalance: 0.01, useMinBalance: false, } From de89b9b965c5d3bb29c3d3c27bfa4ff782dca8f6 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 12:02:01 +0200 Subject: [PATCH 52/68] Implement balance changing flow --- src/components/AppSummary/AppSummary.filters.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 82e309a29..c7ba52c4c 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -20,7 +20,9 @@ const SummaryFilters = () => { const minimumBalance = useSelector(getMinimumBalance) const useMinimumBalance = useSelector(getUseMinBalance) const [isOpen, setIsOpen] = useState(false) + const [balanceValue, setBalanceValue] = useState(minimumBalance) + console.log('++balanceValue', balanceValue) console.log('++minimumBalance', minimumBalance) console.log('++useMinimumBalance', useMinimumBalance) @@ -28,13 +30,10 @@ const SummaryFilters = () => { setIsOpen(isPopoverOpen) } - // const onChange = (isPopoverOpen) => { - // setIsOpen(isPopoverOpen) - // } - const onChange = (event) => { - // const { name, value } = event.target - console.log('+++event', event) + const value = +event?.target?.value ?? 0 + setBalanceValue(value) + dispatch(setMinimumBalance(value)) } const classes = classNames('summary-filters--menu', { @@ -75,7 +74,7 @@ const SummaryFilters = () => {
From 836f5c88acb12e4377d73669f880dc780d885b3a Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 12:10:46 +0200 Subject: [PATCH 53/68] Add customizable disabled state for input key --- src/components/Auth/InputKey/InputKey.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Auth/InputKey/InputKey.js b/src/components/Auth/InputKey/InputKey.js index 2b6ed6410..037115be3 100644 --- a/src/components/Auth/InputKey/InputKey.js +++ b/src/components/Auth/InputKey/InputKey.js @@ -12,6 +12,7 @@ export const InputKey = ({ label, value, onChange, + disabled, placeholder, }) => { const { t } = useTranslation() @@ -27,6 +28,7 @@ export const InputKey = ({ type={type} value={value} onChange={onChange} + disabled={disabled} placeholder={placeholder && t(placeholder)} /> @@ -37,6 +39,7 @@ InputKey.propTypes = { name: PropTypes.string, type: PropTypes.string, label: PropTypes.string, + disabled: PropTypes.bool, onChange: PropTypes.func, placeholder: PropTypes.string, value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), @@ -47,6 +50,7 @@ InputKey.defaultProps = { value: '', label: '', placeholder: '', + disabled: false, type: 'password', onChange: () => {}, } From e56d6e3a512224144ee1f9cfaff5eb64d050ed3d Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 12:11:29 +0200 Subject: [PATCH 54/68] Claenup --- src/components/AppSummary/AppSummary.filters.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index c7ba52c4c..83d50166e 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -22,10 +22,6 @@ const SummaryFilters = () => { const [isOpen, setIsOpen] = useState(false) const [balanceValue, setBalanceValue] = useState(minimumBalance) - console.log('++balanceValue', balanceValue) - console.log('++minimumBalance', minimumBalance) - console.log('++useMinimumBalance', useMinimumBalance) - const togglePopover = (isPopoverOpen) => { setIsOpen(isPopoverOpen) } From df9b7de8b276d05f94c05e9841c14931c10318a5 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 12:38:57 +0200 Subject: [PATCH 55/68] Adjust minimum balance input styling --- src/components/AppSummary/_AppSummary.scss | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index c6d15bf84..01560986a 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -220,10 +220,27 @@ } } - .balance-input-label { - font-size: 14px; - max-width: 266px; - color: var(--color2); + .balance-input { + &-label { + font-size: 14px; + max-width: 266px; + color: var(--color2); + } + + .bp3-form-group { + margin-bottom: 8px; + } + + .bp3-input-group { + margin-bottom: 0; + + .bp3-input { + height: 30px; + max-width: 133px; + } + + } + } } } From 2e1b5c6f8c28ddf4266d052bfb1038b210e98b46 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 12:42:36 +0200 Subject: [PATCH 56/68] Implement minimum balance disabled state handling and representation --- src/components/AppSummary/AppSummary.filters.js | 1 + src/components/AppSummary/_AppSummary.scss | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 83d50166e..3cb087e1a 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -72,6 +72,7 @@ const SummaryFilters = () => { name='minimumBalance' value={balanceValue} onChange={onChange} + disabled={!useMinimumBalance} /> diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 01560986a..096e1ffd8 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -238,9 +238,11 @@ height: 30px; max-width: 133px; } - } + .bp3-disabled { + background: inherit; + } } } } From 1b02cf9c10a57258604659d0d66c8679951aa658 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 13:01:35 +0200 Subject: [PATCH 57/68] Add input balance currency icon --- src/components/AppSummary/AppSummary.filters.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 3cb087e1a..bc24bf010 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -74,6 +74,9 @@ const SummaryFilters = () => { onChange={onChange} disabled={!useMinimumBalance} /> + + USD + )} From 474bc6a2b5738dd58b292e11f89ee4f628fb1d75 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 13:02:07 +0200 Subject: [PATCH 58/68] Implement currency type styling and positioning --- src/components/AppSummary/_AppSummary.scss | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/components/AppSummary/_AppSummary.scss b/src/components/AppSummary/_AppSummary.scss index 096e1ffd8..5bdb77006 100644 --- a/src/components/AppSummary/_AppSummary.scss +++ b/src/components/AppSummary/_AppSummary.scss @@ -221,6 +221,10 @@ } .balance-input { + display: flex; + max-width: 140px; + position: relative; + &-label { font-size: 14px; max-width: 266px; @@ -235,13 +239,25 @@ margin-bottom: 0; .bp3-input { - height: 30px; - max-width: 133px; + height: 31px; + max-width: 140px; + padding: 0 40px 0 10px ; + font-size: 13px; } } - .bp3-disabled { - background: inherit; + .bp3-disabled, + .bp3-input:disabled { + border-radius: 4px; + background: var(--multiBg); + } + + &-currency { + right: 8px; + top: 16px; + font-size: 13px; + position: absolute; + color: var(--color2);; } } } From 6dddbb277f01497628010054d59a5cf972cb2cea Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 13:10:17 +0200 Subject: [PATCH 59/68] Update getMinimumBalance selector --- src/state/summaryByAsset/selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/summaryByAsset/selectors.js b/src/state/summaryByAsset/selectors.js index 2524a7b3e..e59a075c1 100644 --- a/src/state/summaryByAsset/selectors.js +++ b/src/state/summaryByAsset/selectors.js @@ -4,7 +4,7 @@ export const getData = state => getSummaryByAsset(state)?.data export const getPageLoading = state => getSummaryByAsset(state)?.pageLoading ?? false export const getDataReceived = state => getSummaryByAsset(state)?.dataReceived ?? false export const getUseMinBalance = state => getSummaryByAsset(state)?.useMinBalance ?? true -export const getMinimumBalance = state => getSummaryByAsset(state)?.minimumBalance ?? 0 +export const getMinimumBalance = state => getSummaryByAsset(state)?.minimumBalance ?? null export const getSummaryByAssetEntries = state => getData(state)?.summaryByAsset ?? [] export const getSummaryByAssetTotal = state => getData(state)?.total ?? {} From 1ecea78ef568a0f5a6ab4cad7d9dc30a88a5293c Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 13:13:18 +0200 Subject: [PATCH 60/68] Improve balance value handling --- src/components/AppSummary/AppSummary.filters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index bc24bf010..63bb3f48d 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -27,7 +27,7 @@ const SummaryFilters = () => { } const onChange = (event) => { - const value = +event?.target?.value ?? 0 + const value = event?.target?.value setBalanceValue(value) dispatch(setMinimumBalance(value)) } From df84411dd2f9287da195e6add3d3245072445692 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 13:13:40 +0200 Subject: [PATCH 61/68] Update summary by asset reducers --- src/state/summaryByAsset/reducer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/summaryByAsset/reducer.js b/src/state/summaryByAsset/reducer.js index 986033dfa..ab7bc8608 100644 --- a/src/state/summaryByAsset/reducer.js +++ b/src/state/summaryByAsset/reducer.js @@ -27,7 +27,7 @@ export function summaryByAssetReducer(state = initialState, action) { case types.SET_MIN_BALANCE: { return { ...state, - minimumBalance: payload, + minimumBalance: +payload, } } case types.TOGGLE_USE_MIN_BALANCE: { From 52a7c6009c2279e2131eb7f498e70480b5d85a66 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 13:24:43 +0200 Subject: [PATCH 62/68] Update balance target value setting --- src/components/AppSummary/AppSummary.filters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 63bb3f48d..615558357 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -27,7 +27,7 @@ const SummaryFilters = () => { } const onChange = (event) => { - const value = event?.target?.value + const { value } = event.target setBalanceValue(value) dispatch(setMinimumBalance(value)) } From 1697bdd1c432af20c726802aa09ac459fedfcc32 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 13:48:34 +0200 Subject: [PATCH 63/68] Actualize prepareSummaryByAssetData handler --- src/components/AppSummary/AppSummary.helpers.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/AppSummary/AppSummary.helpers.js b/src/components/AppSummary/AppSummary.helpers.js index c8182414d..6efafa38f 100644 --- a/src/components/AppSummary/AppSummary.helpers.js +++ b/src/components/AppSummary/AppSummary.helpers.js @@ -1,9 +1,14 @@ import React from 'react' import { fixedFloat, formatThousands } from 'ui/utils' -export const prepareSummaryByAssetData = (entries, total, t) => ( - [...entries, { currency: t('summary.by_asset.total'), ...total }] -) +export const prepareSummaryByAssetData = (entries, total, t, minimumBalance, useMinimumBalance) => { + const mergedEntries = [...entries, { currency: t('summary.by_asset.total'), ...total }] + if (useMinimumBalance) { + return mergedEntries.filter(entry => entry?.balanceUsd >= minimumBalance) + } + return mergedEntries +} + export const prepareNumericValue = (value) => { let val = +fixedFloat(value, 2) From b58dca12c2f887cbe18d49eb8595ab63192c9bf3 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 13:49:26 +0200 Subject: [PATCH 64/68] Implement minimum balances handling flow --- src/components/AppSummary/AppSummary.byAsset.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/AppSummary/AppSummary.byAsset.js b/src/components/AppSummary/AppSummary.byAsset.js index 154ddc0a3..257a482bf 100644 --- a/src/components/AppSummary/AppSummary.byAsset.js +++ b/src/components/AppSummary/AppSummary.byAsset.js @@ -11,6 +11,8 @@ import { fetchData, refresh } from 'state/summaryByAsset/actions' import { getPageLoading, getDataReceived, + getUseMinBalance, + getMinimumBalance, getSummaryByAssetTotal, getSummaryByAssetEntries, } from 'state/summaryByAsset/selectors' @@ -33,6 +35,11 @@ const AppSummaryByAsset = () => { const entries = useSelector(getSummaryByAssetEntries) const isSyncRequired = useSelector(getIsSyncRequired) const { start, end } = useSelector(getTimeFrame) + const minimumBalance = useSelector(getMinimumBalance) + const useMinimumBalance = useSelector(getUseMinBalance) + + console.log('+++minimumBalance', minimumBalance) + console.log('+++useMinimumBalance', useMinimumBalance) useEffect(() => { if (!dataReceived && !pageLoading && !isSyncRequired) { @@ -45,10 +52,13 @@ const AppSummaryByAsset = () => { }, [timeRange]) const preparedData = useMemo( - () => prepareSummaryByAssetData(entries, total, t), - [entries, total, t], + () => prepareSummaryByAssetData(entries, total, t, minimumBalance, useMinimumBalance), + [entries, total, t, minimumBalance, useMinimumBalance], ) + console.log('preparedData', preparedData) + + const columns = useMemo( () => getAssetColumns({ preparedData, t }), [preparedData, t], From d7b7a6e147bdfe6fe552da6666a9b8c51ba432ec Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Tue, 9 Jan 2024 16:05:25 +0200 Subject: [PATCH 65/68] Improve merged entries filtering flow --- src/components/AppSummary/AppSummary.helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppSummary/AppSummary.helpers.js b/src/components/AppSummary/AppSummary.helpers.js index 6efafa38f..2e7737421 100644 --- a/src/components/AppSummary/AppSummary.helpers.js +++ b/src/components/AppSummary/AppSummary.helpers.js @@ -4,7 +4,7 @@ import { fixedFloat, formatThousands } from 'ui/utils' export const prepareSummaryByAssetData = (entries, total, t, minimumBalance, useMinimumBalance) => { const mergedEntries = [...entries, { currency: t('summary.by_asset.total'), ...total }] if (useMinimumBalance) { - return mergedEntries.filter(entry => entry?.balanceUsd >= minimumBalance) + return mergedEntries.filter(entry => fixedFloat(entry?.balanceUsd, 2) >= minimumBalance) } return mergedEntries } From 4a033bef13ac054c1c756c7f5023ebeb6a1cf850 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Wed, 10 Jan 2024 11:06:27 +0200 Subject: [PATCH 66/68] Lint fix --- src/components/AppSummary/AppSummary.filters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppSummary/AppSummary.filters.js b/src/components/AppSummary/AppSummary.filters.js index 615558357..69bf08a93 100644 --- a/src/components/AppSummary/AppSummary.filters.js +++ b/src/components/AppSummary/AppSummary.filters.js @@ -3,10 +3,10 @@ import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import classNames from 'classnames' import { - Alignment, Switch, Popover, Position, + Alignment, } from '@blueprintjs/core' import Icon from 'icons' From 9693da9e3f18a1126a37c0f6d4c51630b4922608 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Wed, 10 Jan 2024 12:02:59 +0200 Subject: [PATCH 67/68] Cleanup --- src/components/AppSummary/AppSummary.byAsset.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/components/AppSummary/AppSummary.byAsset.js b/src/components/AppSummary/AppSummary.byAsset.js index 257a482bf..9d4d3f7d0 100644 --- a/src/components/AppSummary/AppSummary.byAsset.js +++ b/src/components/AppSummary/AppSummary.byAsset.js @@ -38,9 +38,6 @@ const AppSummaryByAsset = () => { const minimumBalance = useSelector(getMinimumBalance) const useMinimumBalance = useSelector(getUseMinBalance) - console.log('+++minimumBalance', minimumBalance) - console.log('+++useMinimumBalance', useMinimumBalance) - useEffect(() => { if (!dataReceived && !pageLoading && !isSyncRequired) { dispatch(fetchData()) @@ -56,9 +53,6 @@ const AppSummaryByAsset = () => { [entries, total, t, minimumBalance, useMinimumBalance], ) - console.log('preparedData', preparedData) - - const columns = useMemo( () => getAssetColumns({ preparedData, t }), [preparedData, t], From faecf7cfec3aa31fd48980f7a3094cd55e5e5235 Mon Sep 17 00:00:00 2001 From: alexstotsky Date: Thu, 11 Jan 2024 09:26:03 +0200 Subject: [PATCH 68/68] Update getUseMinBalance selector default --- src/state/summaryByAsset/selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/summaryByAsset/selectors.js b/src/state/summaryByAsset/selectors.js index e59a075c1..b3094ee87 100644 --- a/src/state/summaryByAsset/selectors.js +++ b/src/state/summaryByAsset/selectors.js @@ -3,7 +3,7 @@ export const getSummaryByAsset = state => state.summaryByAsset export const getData = state => getSummaryByAsset(state)?.data export const getPageLoading = state => getSummaryByAsset(state)?.pageLoading ?? false export const getDataReceived = state => getSummaryByAsset(state)?.dataReceived ?? false -export const getUseMinBalance = state => getSummaryByAsset(state)?.useMinBalance ?? true +export const getUseMinBalance = state => getSummaryByAsset(state)?.useMinBalance ?? false export const getMinimumBalance = state => getSummaryByAsset(state)?.minimumBalance ?? null export const getSummaryByAssetEntries = state => getData(state)?.summaryByAsset ?? [] export const getSummaryByAssetTotal = state => getData(state)?.total ?? {}