diff --git a/packages/webapp/src/containers/Drawers/AccountDrawer/AccountDrawerTableHeader.tsx b/packages/webapp/src/containers/Drawers/AccountDrawer/AccountDrawerTableHeader.tsx index 1b2d6e530..cd063cf5b 100644 --- a/packages/webapp/src/containers/Drawers/AccountDrawer/AccountDrawerTableHeader.tsx +++ b/packages/webapp/src/containers/Drawers/AccountDrawer/AccountDrawerTableHeader.tsx @@ -8,7 +8,7 @@ export function AccountDrawerTableHeader() { setBCYCurrencyType, setFYCCurrencyType, isBCYCurrencyType, - isFYCCurrencyType, + isFCYCurrencyType, } = useAccountDrawerTableOptionsContext(); const handleBCYBtnClick = () => { @@ -25,7 +25,7 @@ export function AccountDrawerTableHeader() { small outlined onClick={handleFCYBtnClick} - active={isFYCCurrencyType} + active={isFCYCurrencyType} > FCY diff --git a/packages/webapp/src/containers/Drawers/AccountDrawer/AccountDrawerTableOptionsProvider.tsx b/packages/webapp/src/containers/Drawers/AccountDrawer/AccountDrawerTableOptionsProvider.tsx index 4b766dd9f..0156c6420 100644 --- a/packages/webapp/src/containers/Drawers/AccountDrawer/AccountDrawerTableOptionsProvider.tsx +++ b/packages/webapp/src/containers/Drawers/AccountDrawer/AccountDrawerTableOptionsProvider.tsx @@ -3,7 +3,7 @@ import React, { useState, useCallback } from 'react'; interface AccountDrawerTableOptionsContextValue { setFYCCurrencyType: () => void; setBCYCurrencyType: () => void; - isFYCCurrencyType: boolean; + isFCYCurrencyType: boolean; isBCYCurrencyType: boolean; currencyType: ForeignCurrencyType; } @@ -13,20 +13,20 @@ const AccountDrawerTableOptionsContext = React.createContext( ); enum ForeignCurrencyTypes { - FYC = 'FYC', + FCY = 'FCY', BCY = 'BCY', } -type ForeignCurrencyType = ForeignCurrencyTypes.FYC | ForeignCurrencyTypes.BCY; +type ForeignCurrencyType = ForeignCurrencyTypes.FCY | ForeignCurrencyTypes.BCY; function AccountDrawerTableOptionsProvider({ - initialCurrencyType = ForeignCurrencyTypes.FYC, + initialCurrencyType = ForeignCurrencyTypes.FCY, ...props }) { const [currencyType, setCurrentType] = useState(initialCurrencyType); const setFYCCurrencyType = useCallback( - () => setCurrentType(ForeignCurrencyTypes.FYC), + () => setCurrentType(ForeignCurrencyTypes.FCY), [setCurrentType], ); const setBCYCurrencyType = useCallback( @@ -38,7 +38,7 @@ function AccountDrawerTableOptionsProvider({ const provider = { setFYCCurrencyType, setBCYCurrencyType, - isFYCCurrencyType: currencyType === ForeignCurrencyTypes.FYC, + isFCYCurrencyType: currencyType === ForeignCurrencyTypes.FCY, isBCYCurrencyType: currencyType === ForeignCurrencyTypes.BCY, currencyType, }; diff --git a/packages/webapp/src/containers/Drawers/AccountDrawer/utils.tsx b/packages/webapp/src/containers/Drawers/AccountDrawer/utils.tsx index c254cbaa5..564c4fdc7 100644 --- a/packages/webapp/src/containers/Drawers/AccountDrawer/utils.tsx +++ b/packages/webapp/src/containers/Drawers/AccountDrawer/utils.tsx @@ -9,7 +9,7 @@ import { useAccountDrawerTableOptionsContext } from './AccountDrawerTableOptions * Retrieve entries columns of read-only account view. */ export const useAccountReadEntriesColumns = () => { - const { isFYCCurrencyType } = useAccountDrawerTableOptionsContext(); + const { isFCYCurrencyType } = useAccountDrawerTableOptionsContext(); return React.useMemo( () => [ @@ -28,7 +28,7 @@ export const useAccountReadEntriesColumns = () => { }, { Header: intl.get('credit'), - accessor: isFYCCurrencyType + accessor: isFCYCurrencyType ? 'formatted_fc_credit' : 'formatted_credit', width: 80, @@ -38,13 +38,13 @@ export const useAccountReadEntriesColumns = () => { }, { Header: intl.get('debit'), - accessor: isFYCCurrencyType ? 'formatted_fc_debit' : 'formatted_debit', + accessor: isFCYCurrencyType ? 'formatted_fc_debit' : 'formatted_debit', width: 80, className: 'debit', align: 'right', textOverview: true, }, ], - [isFYCCurrencyType], + [isFCYCurrencyType], ); };