fixed percent change null handler

This commit is contained in:
noumantahir 2023-01-06 22:34:19 +05:00
parent f7d9dc5ca5
commit 7ccbed82bd
2 changed files with 7 additions and 2 deletions

View File

@ -40,12 +40,17 @@ export const CoinBasics = ({
<Text style={styles.textCoinTitle}>{coinSymbol}</Text>
</View>
<Text style={styles.textHeaderChange}>
{percentChange ? (
<Text style={styles.textHeaderChange}>
{intl.formatMessage({ id: 'wallet.change' })}
<Text style={percentChange > 0 ? styles.textPositive : styles.textNegative}>
{percentChange ? ` ${percentChange >= 0 ? '+' : ''}${percentChange.toFixed(1)}%` : ' ---'}
</Text>
</Text>
):(
<View style={styles.textHeaderChange}/>
)}
</>
);

View File

@ -55,7 +55,7 @@ export const CoinSummary = ({
valuePairs={valuePairs}
extraData={extraDataPairs}
coinSymbol={coinSymbol}
percentChange={percentChagne}
// percentChange={percentChagne}
isEngine={coinData.isEngine}
onInfoPress={onInfoPress}
/>