Merge pull request #2600 from ecency/nt/refine-asset-card

refined asset card ui
This commit is contained in:
Feruz M 2023-01-23 22:45:22 +05:30 committed by GitHub
commit adb7c24472
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -111,7 +111,7 @@
}, },
"hive": { "hive": {
"title": "HIVE", "title": "HIVE",
"name": "Hive Token", "name": "Liquid Hive",
"buy": "GET HIVE" "buy": "GET HIVE"
}, },
"hbd": { "hbd": {
@ -120,7 +120,7 @@
}, },
"hive_power": { "hive_power": {
"title": "HIVE POWER", "title": "HIVE POWER",
"name": "Hive Power | Staked Hive" "name": "Staked Hive"
}, },
"hive_dollar":{ "hive_dollar":{
"name":"Hive Dollar" "name":"Hive Dollar"

View File

@ -80,6 +80,8 @@ export const AssetCard = ({
? intl.formatMessage({ id: `wallet.${id}.name` }) ? intl.formatMessage({ id: `wallet.${id}.name` })
: name; : name;
const value = `${ownedBalance.toFixed(isEngine ? 6 : 3)}`; const value = `${ownedBalance.toFixed(isEngine ? 6 : 3)}`;
const _fiatValue = ownedBalance * currentValue;
const _fiatStr = `${_fiatValue.toFixed(_fiatValue < 1 ? 5 : 2)}${currencySymbol}`;
const _renderHeader = ( const _renderHeader = (
<View style={styles.cardHeader}> <View style={styles.cardHeader}>
@ -103,7 +105,7 @@ export const AssetCard = ({
{value} {value}
</Text> </Text>
<Text style={styles.textSubtitleRight}> <Text style={styles.textSubtitleRight}>
{`${(ownedBalance * currentValue).toFixed(6)}${currencySymbol}`} {_fiatStr}
</Text> </Text>
</View> </View>
</View> </View>
@ -118,7 +120,7 @@ export const AssetCard = ({
title={btnTitle} title={btnTitle}
isLoading={isLoading} isLoading={isLoading}
isClaiming={isClaiming} isClaiming={isClaiming}
containerStyle={id !== ASSET_IDS.ECENCY && styles.claimContainer} containerStyle={{...styles.claimContainer, marginBottom: id === ASSET_IDS.ECENCY ? 0 : 16}}
onPress={_onClaimPress} onPress={_onClaimPress}
/> />
); );

View File

@ -49,7 +49,7 @@ export default EStyleSheet.create({
}, },
claimContainer:{ claimContainer:{
marginBottom:16, marginTop:16,
}, },
chartContainer: { chartContainer: {