File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,9 +28,6 @@ const showExperimentalSoftwareNotice = false
2828const DappLinks = ( { dapp, page } ) => {
2929 const ousdBalance = useStoreState ( AccountStore , ( s ) => s . balances [ 'ousd' ] )
3030 const lifetimeYield = useStoreState ( AccountStore , ( s ) => s . lifetimeYield )
31- const showHistory =
32- ( ousdBalance && parseFloat ( ousdBalance ) > 0 ) ||
33- ( lifetimeYield && parseFloat ( lifetimeYield ) > 0 )
3431
3532 return (
3633 < >
@@ -70,17 +67,15 @@ const DappLinks = ({ dapp, page }) => {
7067 </ a >
7168 </ Link >
7269 ) }
73- { showHistory && (
74- < Link href = "/history" >
75- < a
76- className = { `d-flex align-items-center ${
77- page === 'history' ? 'selected' : ''
78- } `}
79- >
80- { fbt ( 'History' , 'History' ) }
81- </ a >
82- </ Link >
83- ) }
70+ < Link href = "/history" >
71+ < a
72+ className = { `d-flex align-items-center ${
73+ page === 'history' ? 'selected' : ''
74+ } `}
75+ >
76+ { fbt ( 'History' , 'History' ) }
77+ </ a >
78+ </ Link >
8479 </ div >
8580 ) }
8681 < style jsx > { `
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ const BalanceHeader = ({
3737 ( s ) => s . animatedOusdBalance
3838 )
3939 const mintAnimationLimit = 0.5
40+ const walletConnected = useStoreState ( ContractStore , ( s ) => s . walletConnected )
4041
4142 const [ balanceEmphasised , setBalanceEmphasised ] = useState ( false )
4243 const prevOusdBalance = usePrevious ( ousdBalance )
@@ -212,7 +213,11 @@ const BalanceHeader = ({
212213 />
213214 < Statistic
214215 title = { fbt ( 'Pending yield' , 'Pending yield' ) }
215- value = { formatCurrency ( animatedExpectedIncrease , 2 ) }
216+ value = {
217+ walletConnected
218+ ? formatCurrency ( animatedExpectedIncrease , 2 )
219+ : '--.--'
220+ }
216221 type = { 'number' }
217222 marginBottom = { true }
218223 />
@@ -228,7 +233,11 @@ const BalanceHeader = ({
228233 } /address/${ account . toLowerCase ( ) } `
229234 : false
230235 }
231- value = { lifetimeYield ? formatCurrency ( lifetimeYield , 2 ) : '--.--' }
236+ value = {
237+ walletConnected && lifetimeYield
238+ ? formatCurrency ( lifetimeYield , 2 )
239+ : '--.--'
240+ }
232241 type = { 'number' }
233242 />
234243 </ div >
You can’t perform that action at this time.
0 commit comments