From 2ca49d7b771d8d0ca19fe247cefee2975b9cccac Mon Sep 17 00:00:00 2001 From: JC Date: Sun, 8 Dec 2024 08:25:11 -0700 Subject: [PATCH 01/15] fix: shrinking header --- .../__snapshots__/About.snapshot.tsx.snap | 11 +--- .../__snapshots__/Header.snapshot.tsx.snap | 16 ++---- .../__snapshots__/History.snapshot.tsx.snap | 10 ++-- .../__snapshots__/Info.snapshot.tsx.snap | 11 +--- .../__snapshots__/Insight.snapshot.tsx.snap | 11 +--- .../__snapshots__/Messages.snapshot.tsx.snap | 22 ++------ .../MessagesAddress.snapshot.tsx.snap | 11 +--- .../__snapshots__/Pools.snapshot.tsx.snap | 11 +--- .../__snapshots__/PrivKey.snapshot.tsx.snap | 22 ++------ .../__snapshots__/Rescan.snapshot.tsx.snap | 11 +--- .../__snapshots__/Seed.snapshot.tsx.snap | 55 ++++--------------- .../__snapshots__/ShowUfvk.snapshot.tsx.snap | 11 +--- .../SyncReport.snapshot.tsx.snap | 11 +--- components/Header/Header.tsx | 9 +-- 14 files changed, 44 insertions(+), 178 deletions(-) diff --git a/__tests__/__snapshots__/About.snapshot.tsx.snap b/__tests__/__snapshots__/About.snapshot.tsx.snap index e9b42d53e..a5f957722 100644 --- a/__tests__/__snapshots__/About.snapshot.tsx.snap +++ b/__tests__/__snapshots__/About.snapshot.tsx.snap @@ -32,20 +32,12 @@ exports[`Component About - test About - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, } } /> - diff --git a/__tests__/__snapshots__/Header.snapshot.tsx.snap b/__tests__/__snapshots__/Header.snapshot.tsx.snap index feaa36073..4da842227 100644 --- a/__tests__/__snapshots__/Header.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Header.snapshot.tsx.snap @@ -21,7 +21,6 @@ exports[`Component Header - test Header Complex - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -106,7 +105,6 @@ exports[`Component Header - test Header Complex - snapshot 1`] = ` "flexDirection": "row", "justifyContent": "center", "margin": 0, - "marginTop": 0, } } > @@ -441,6 +439,7 @@ exports[`Component Header - test Header Complex - snapshot 1`] = ` "fontSize": 18, "fontWeight": "600", "marginBottom": 3, + "marginTop": 3, "opacity": 1, "paddingHorizontal": 5, } @@ -453,7 +452,6 @@ exports[`Component Header - test Header Complex - snapshot 1`] = ` @@ -586,20 +585,12 @@ exports[`Component Header - test Header Simple - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, } } /> - diff --git a/__tests__/__snapshots__/History.snapshot.tsx.snap b/__tests__/__snapshots__/History.snapshot.tsx.snap index 62676eca5..41e60753c 100644 --- a/__tests__/__snapshots__/History.snapshot.tsx.snap +++ b/__tests__/__snapshots__/History.snapshot.tsx.snap @@ -40,7 +40,6 @@ exports[`Component History - test History currency USD, privacy high & mode adva "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -125,7 +124,6 @@ exports[`Component History - test History currency USD, privacy high & mode adva "flexDirection": "row", "justifyContent": "center", "margin": 0, - "marginTop": 0, } } > @@ -615,6 +613,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva "fontSize": 18, "fontWeight": "600", "marginBottom": 3, + "marginTop": 3, "opacity": 1, "paddingHorizontal": 5, } @@ -627,7 +626,6 @@ exports[`Component History - test History currency USD, privacy high & mode adva @@ -789,7 +788,6 @@ exports[`Component History - test History no currency, privacy normal & mode bas "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -839,7 +837,6 @@ exports[`Component History - test History no currency, privacy normal & mode bas "flexDirection": "row", "justifyContent": "center", "margin": 0, - "marginTop": 0, } } > @@ -1023,6 +1020,7 @@ exports[`Component History - test History no currency, privacy normal & mode bas "fontSize": 18, "fontWeight": "600", "marginBottom": 3, + "marginTop": 3, "opacity": 1, "paddingHorizontal": 5, } @@ -1035,7 +1033,6 @@ exports[`Component History - test History no currency, privacy normal & mode bas diff --git a/__tests__/__snapshots__/Info.snapshot.tsx.snap b/__tests__/__snapshots__/Info.snapshot.tsx.snap index bebe52f07..813a6b99a 100644 --- a/__tests__/__snapshots__/Info.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Info.snapshot.tsx.snap @@ -32,20 +32,12 @@ exports[`Component Info - test Info - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, } } /> - diff --git a/__tests__/__snapshots__/Insight.snapshot.tsx.snap b/__tests__/__snapshots__/Insight.snapshot.tsx.snap index 0d484e25c..700d67426 100644 --- a/__tests__/__snapshots__/Insight.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Insight.snapshot.tsx.snap @@ -32,7 +32,6 @@ exports[`Component Insight - test Insight - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -119,13 +118,6 @@ exports[`Component Insight - test Insight - snapshot 1`] = ` - diff --git a/__tests__/__snapshots__/Messages.snapshot.tsx.snap b/__tests__/__snapshots__/Messages.snapshot.tsx.snap index cae80aff2..58dfbd1d1 100644 --- a/__tests__/__snapshots__/Messages.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Messages.snapshot.tsx.snap @@ -40,7 +40,6 @@ exports[`Component Messages - test Messages currency USD, privacy high & mode ad "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -200,13 +199,6 @@ exports[`Component Messages - test Messages currency USD, privacy high & mode ad - @@ -455,7 +448,6 @@ exports[`Component Messages - test Messages no currency, privacy normal & mode b "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -498,13 +490,6 @@ exports[`Component Messages - test Messages no currency, privacy normal & mode b /> - diff --git a/__tests__/__snapshots__/MessagesAddress.snapshot.tsx.snap b/__tests__/__snapshots__/MessagesAddress.snapshot.tsx.snap index 391b4d645..ae47c66df 100644 --- a/__tests__/__snapshots__/MessagesAddress.snapshot.tsx.snap +++ b/__tests__/__snapshots__/MessagesAddress.snapshot.tsx.snap @@ -51,20 +51,12 @@ exports[`Component Messages Address - test Messages Address - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, } } /> - diff --git a/__tests__/__snapshots__/Pools.snapshot.tsx.snap b/__tests__/__snapshots__/Pools.snapshot.tsx.snap index a2f3bdcd8..5136a4aaa 100644 --- a/__tests__/__snapshots__/Pools.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Pools.snapshot.tsx.snap @@ -32,7 +32,6 @@ exports[`Component Pools - test Pools - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -119,13 +118,6 @@ exports[`Component Pools - test Pools - snapshot 1`] = ` - diff --git a/__tests__/__snapshots__/PrivKey.snapshot.tsx.snap b/__tests__/__snapshots__/PrivKey.snapshot.tsx.snap index 763b90825..56492853e 100644 --- a/__tests__/__snapshots__/PrivKey.snapshot.tsx.snap +++ b/__tests__/__snapshots__/PrivKey.snapshot.tsx.snap @@ -32,20 +32,12 @@ exports[`Component PrivKey - test PrivKey Private - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, } } /> - @@ -436,20 +429,12 @@ exports[`Component PrivKey - test PrivKey View - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, } } /> - diff --git a/__tests__/__snapshots__/Rescan.snapshot.tsx.snap b/__tests__/__snapshots__/Rescan.snapshot.tsx.snap index 3b15b5deb..f64ec69d0 100644 --- a/__tests__/__snapshots__/Rescan.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Rescan.snapshot.tsx.snap @@ -32,20 +32,12 @@ exports[`Component Rescan - test Rescan - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, } } /> - diff --git a/__tests__/__snapshots__/Seed.snapshot.tsx.snap b/__tests__/__snapshots__/Seed.snapshot.tsx.snap index d7ef3b3b3..cdf3c56a4 100644 --- a/__tests__/__snapshots__/Seed.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Seed.snapshot.tsx.snap @@ -32,7 +32,6 @@ exports[`Component Seed - test Seed Backup - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -119,13 +118,6 @@ exports[`Component Seed - test Seed Backup - snapshot 1`] = ` - @@ -643,7 +636,6 @@ exports[`Component Seed - test Seed Change - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -730,13 +722,6 @@ exports[`Component Seed - test Seed Change - snapshot 1`] = ` - @@ -1254,7 +1240,6 @@ exports[`Component Seed - test Seed New - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -1341,13 +1326,6 @@ exports[`Component Seed - test Seed New - snapshot 1`] = ` - @@ -1788,7 +1767,6 @@ exports[`Component Seed - test Seed Server - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -1875,13 +1853,6 @@ exports[`Component Seed - test Seed Server - snapshot 1`] = ` - @@ -2399,7 +2371,6 @@ exports[`Component Seed - test Seed View - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -2486,13 +2457,6 @@ exports[`Component Seed - test Seed View - snapshot 1`] = ` - diff --git a/__tests__/__snapshots__/ShowUfvk.snapshot.tsx.snap b/__tests__/__snapshots__/ShowUfvk.snapshot.tsx.snap index 4498b61e1..dd044c5a7 100644 --- a/__tests__/__snapshots__/ShowUfvk.snapshot.tsx.snap +++ b/__tests__/__snapshots__/ShowUfvk.snapshot.tsx.snap @@ -32,7 +32,6 @@ exports[`Component ShowUfvk - test ShowUfvk - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, @@ -119,13 +118,6 @@ exports[`Component ShowUfvk - test ShowUfvk - snapshot 1`] = ` - diff --git a/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap b/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap index a4192c634..2a6356692 100644 --- a/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap +++ b/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap @@ -32,20 +32,12 @@ exports[`Component SyncReport - test SyncReport - snapshot 1`] = ` "display": "flex", "flexDirection": "row", "flexWrap": "wrap", - "height": 40, "justifyContent": "center", "marginHorizontal": 5, "marginTop": 12, } } /> - diff --git a/components/Header/Header.tsx b/components/Header/Header.tsx index b6b3321bc..4ec7fc21b 100644 --- a/components/Header/Header.tsx +++ b/components/Header/Header.tsx @@ -470,7 +470,6 @@ const Header: React.FunctionComponent = ({ flexWrap: 'wrap', marginTop: 12, marginHorizontal: 5, - height: 40, }}> {!noSyncingStatus && selectServer !== SelectServerEnum.offline && ( <> @@ -633,7 +632,6 @@ const Header: React.FunctionComponent = ({ privacyComponent()} - {noBalance && !receivedLegend && } {!noBalance && ( = ({ alignItems: 'center', justifyContent: 'center', margin: 0, - marginTop: readOnly ? 15 : 0, }}> {mode !== ModeEnum.basic && !noPrivacy && setPrivacyOption && addLastSnackbar && privacyComponent()} = ({ alignItems: 'center', justifyContent: 'center', margin: 0, - marginTop: readOnly ? 15 : 0, }}> {translate('seed.youreceived') as string} = ({ justifyContent: 'center', flexWrap: 'wrap', }}> - + {title} @@ -755,9 +751,8 @@ const Header: React.FunctionComponent = ({ padding: 11.5, position: 'absolute', left: 0, - alignItems: 'flex-start', }}> - + {!noDrawMenu && ( Date: Tue, 10 Dec 2024 10:49:34 -0700 Subject: [PATCH 02/15] fix: header fixes --- __tests__/__snapshots__/Components.snapshot.tsx.snap | 4 ++-- __tests__/__snapshots__/Header.snapshot.tsx.snap | 2 +- __tests__/__snapshots__/History.snapshot.tsx.snap | 8 ++++---- __tests__/__snapshots__/Send.snapshot.tsx.snap | 4 ++-- components/Components/ZecAmount.tsx | 2 +- components/Header/Header.tsx | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/__tests__/__snapshots__/Components.snapshot.tsx.snap b/__tests__/__snapshots__/Components.snapshot.tsx.snap index d6fcc3ffa..015be1bdd 100644 --- a/__tests__/__snapshots__/Components.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Components.snapshot.tsx.snap @@ -224,7 +224,7 @@ exports[`Component Components - test ZecAmount High Privacy - snapshot 1`] = ` { "backgroundColor": "red", "flexDirection": "row", - "margin": 5, + "marginHorizontal": 5, } } > @@ -374,7 +374,7 @@ exports[`Component Components - test ZecAmount Normal Privacy - snapshot 1`] = ` { "backgroundColor": "red", "flexDirection": "row", - "margin": 5, + "marginHorizontal": 5, } } > diff --git a/__tests__/__snapshots__/Header.snapshot.tsx.snap b/__tests__/__snapshots__/Header.snapshot.tsx.snap index 4da842227..d5be66ba5 100644 --- a/__tests__/__snapshots__/Header.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Header.snapshot.tsx.snap @@ -191,7 +191,7 @@ exports[`Component Header - test Header Complex - snapshot 1`] = ` style={ { "flexDirection": "row", - "margin": 5, + "marginHorizontal": 5, } } > diff --git a/__tests__/__snapshots__/History.snapshot.tsx.snap b/__tests__/__snapshots__/History.snapshot.tsx.snap index 41e60753c..c7969aa15 100644 --- a/__tests__/__snapshots__/History.snapshot.tsx.snap +++ b/__tests__/__snapshots__/History.snapshot.tsx.snap @@ -213,7 +213,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva style={ { "flexDirection": "row", - "margin": 5, + "marginHorizontal": 5, } } > @@ -491,7 +491,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva { "color": "#ffffff", "fontSize": 20, - "marginBottom": 5, + "marginBottom": 0, "marginTop": 0, } } @@ -504,7 +504,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva "color": "#ffffff", "fontSize": 20, "fontWeight": "700", - "marginBottom": 5, + "marginBottom": 0, "marginTop": 0, } } @@ -844,7 +844,7 @@ exports[`Component History - test History no currency, privacy normal & mode bas style={ { "flexDirection": "row", - "margin": 5, + "marginHorizontal": 5, } } > diff --git a/__tests__/__snapshots__/Send.snapshot.tsx.snap b/__tests__/__snapshots__/Send.snapshot.tsx.snap index 65cccc1af..31842a335 100644 --- a/__tests__/__snapshots__/Send.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Send.snapshot.tsx.snap @@ -484,7 +484,7 @@ exports[`Component Send - test Send currency USD, privacy high & mode advanced - style={ { "flexDirection": "row", - "margin": 5, + "marginHorizontal": 5, } } > @@ -1651,7 +1651,7 @@ exports[`Component Send - test Send no currency, privacy normal & mode basic - s style={ { "flexDirection": "row", - "margin": 5, + "marginHorizontal": 5, } } > diff --git a/components/Components/ZecAmount.tsx b/components/Components/ZecAmount.tsx index fa1f2409f..15026e973 100644 --- a/components/Components/ZecAmount.tsx +++ b/components/Components/ZecAmount.tsx @@ -70,7 +70,7 @@ const ZecAmount: React.FunctionComponent = ({ `; return ( - + = ({ {currency === CurrencyEnum.USDCurrency && !noBalance && ( Date: Tue, 10 Dec 2024 13:47:24 -0700 Subject: [PATCH 03/15] fix: $ amount format fixed --- .../SyncReport.snapshot.tsx.snap | 4 ++-- app/utils/Utils.ts | 24 +------------------ components/Components/CurrencyAmount.tsx | 2 +- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap b/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap index 2a6356692..874be28b3 100644 --- a/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap +++ b/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap @@ -360,7 +360,7 @@ exports[`Component SyncReport - test SyncReport - snapshot 1`] = ` } } > - 1600099text translated100% + 1600099text translated100.00% - 200001text translated100% + 200001text translated100.00% = 0 && s.substr(s.length - 1, 1) === '0') { - s = s.substr(0, s.length - 1); - } - - if (s.substr(s.length - 1, 1) === '.') { - s = s.substr(0, s.length - 1); - } - - return s; - } - static splitZecAmountIntoBigSmall(zecValue?: number): ZecAmountSplitType { if (typeof zecValue === 'undefined') { return { bigPart: '--', smallPart: '' }; @@ -208,7 +186,7 @@ export default class Utils { static parseNumberFloatToStringLocale(numberValue: number, toFixed: number): string { const { decimalSeparator } = getNumberFormatSettings(); - let stringValue = Utils.maxPrecisionTrimmed(Number(numberValue.toFixed(toFixed))); + let stringValue = numberValue.toFixed(toFixed); return stringValue.replace(new RegExp('\\.'), `${decimalSeparator}`); } diff --git a/components/Components/CurrencyAmount.tsx b/components/Components/CurrencyAmount.tsx index 44214641c..8d194142a 100644 --- a/components/Components/CurrencyAmount.tsx +++ b/components/Components/CurrencyAmount.tsx @@ -21,7 +21,6 @@ const CurrencyAmount: React.FunctionComponent = ({ price, s const [currencyString, setCurrencyString] = useState(''); const { colors } = useTheme() as unknown as ThemeType; const { decimalSeparator } = getNumberFormatSettings(); - const zeroString = '0'; useEffect(() => { setPrivacyHigh(privacy || false); @@ -34,6 +33,7 @@ const CurrencyAmount: React.FunctionComponent = ({ price, s }, [privacyHigh, privacy]); useEffect(() => { + const zeroString = '0' + decimalSeparator + '00'; var currencyStr; if (typeof price === 'undefined' || typeof amtZec === 'undefined' || price <= 0) { From 360b8b49dfbbafa3293a9a63e56fd6f0ca560c53 Mon Sep 17 00:00:00 2001 From: JC Date: Tue, 10 Dec 2024 16:43:44 -0700 Subject: [PATCH 04/15] fix: close screen arrow in header --- components/Header/Header.tsx | 625 +++++++++++++++++++---------------- 1 file changed, 334 insertions(+), 291 deletions(-) diff --git a/components/Header/Header.tsx b/components/Header/Header.tsx index 1630ac088..f41ceae11 100644 --- a/components/Header/Header.tsx +++ b/components/Header/Header.tsx @@ -11,6 +11,7 @@ import { faSnowflake, //faXmark, faWifi, + faChevronLeft, } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; import { useTheme } from '@react-navigation/native'; @@ -74,6 +75,7 @@ type HeaderProps = { setShieldingAmount?: (value: number) => void; setScrollToTop?: (value: boolean) => void; setScrollToBottom?: (value: boolean) => void; + closeScreen?: () => void; }; const Header: React.FunctionComponent = ({ @@ -99,6 +101,7 @@ const Header: React.FunctionComponent = ({ setShieldingAmount, setScrollToTop, setScrollToBottom, + closeScreen, }) => { const context = useContext(ContextAppLoaded); const { @@ -451,349 +454,389 @@ const Header: React.FunctionComponent = ({ //console.log('render header &&&&&&&&&&&&&&&&&&&&& syncstatus', syncingStatus); return ( - - - {!noSyncingStatus && selectServer !== SelectServerEnum.offline && ( - <> - {netInfo.isConnected && !!syncingStatus.lastBlockServer && syncingStatus.syncID >= 0 ? ( + <> + + + + {!noSyncingStatus && selectServer !== SelectServerEnum.offline && ( <> - {!syncingStatus.inProgress && syncingStatus.lastBlockServer === syncingStatus.lastBlockWallet && ( - - - - - - )} - {!syncingStatus.inProgress && - syncingStatus.lastBlockServer !== syncingStatus.lastBlockWallet && - mode === ModeEnum.advanced && ( - - syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}> - - - - )} - {syncingStatus.inProgress && blocksRemaining > 0 && ( - - - {mode === ModeEnum.basic ? ( - - - {`${blocksRemaining}`} + {netInfo.isConnected && !!syncingStatus.lastBlockServer && syncingStatus.syncID >= 0 ? ( + <> + {!syncingStatus.inProgress && syncingStatus.lastBlockServer === syncingStatus.lastBlockWallet && ( + + + + + + )} + {!syncingStatus.inProgress && + syncingStatus.lastBlockServer !== syncingStatus.lastBlockWallet && + mode === ModeEnum.advanced && ( + + syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}> + + - ) : ( + )} + {syncingStatus.inProgress && blocksRemaining > 0 && ( + + + {mode === ModeEnum.basic ? ( + + + {`${blocksRemaining}`} + + ) : ( + syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}> + + + {`${blocksRemaining}`} + + + )} + + + )} + + ) : ( + <> + {netInfo.isConnected && mode === ModeEnum.advanced && ( + syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}> - - - {`${blocksRemaining}`} - + - )} - - + + )} + )} - - ) : ( - <> - {netInfo.isConnected && mode === ModeEnum.advanced && ( + {(!netInfo.isConnected || + netInfo.type === NetInfoStateType.cellular || + netInfo.isConnectionExpensive) && ( - syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}> - - + {mode === ModeEnum.basic ? ( + + ) : ( + syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}> + + + )} )} )} - {(!netInfo.isConnected || netInfo.type === NetInfoStateType.cellular || netInfo.isConnectionExpensive) && ( + {selectServer === SelectServerEnum.offline && ( - {mode === ModeEnum.basic ? ( - - ) : ( - syncingStatusMoreInfoOnClick && syncingStatusMoreInfoOnClick()}> - + + + + {translate('settings.server-offline') as string} + + + + )} + {mode !== ModeEnum.basic && + !noPrivacy && + setPrivacyOption && + addLastSnackbar && + noBalance && + privacyComponent()} + + + {!noBalance && ( + + {mode !== ModeEnum.basic && !noPrivacy && setPrivacyOption && addLastSnackbar && privacyComponent()} + + {mode !== ModeEnum.basic && + totalBalance && + (totalBalance.orchardBal !== totalBalance.spendableOrchard || + totalBalance.privateBal > 0 || + totalBalance.transparentBal > 0) && ( + poolsMoreInfoOnClick && poolsMoreInfoOnClick()}> + + + )} + + )} + + {receivedLegend && totalBalance && totalBalance.total > 0 && ( + + {translate('seed.youreceived') as string} + + !!! + + )} + + {currency === CurrencyEnum.USDCurrency && !noBalance && ( + + + + - )} - - )} - {selectServer === SelectServerEnum.offline && ( - - - - - {translate('settings.server-offline') as string} - - - )} - {mode !== ModeEnum.basic && - !noPrivacy && - setPrivacyOption && - addLastSnackbar && - noBalance && - privacyComponent()} - + )} - {!noBalance && ( + {showShieldButton && + !calculateDisableButtonToShield() && + setComputingModalVisible && + valueTransfers !== null && ( + + + {(translate(`history.shield-legend-${calculatePoolsToShield()}`) as string) + + ` ${calculateAmountToShield()} ` + + (translate('send.fee') as string) + + ': ' + + Utils.parseNumberFloatToStringLocale(shieldingFee, 8) + + ' '} + + +