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": {
"title": "HIVE",
"name": "Hive Token",
"name": "Liquid Hive",
"buy": "GET HIVE"
},
"hbd": {
@ -120,7 +120,7 @@
},
"hive_power": {
"title": "HIVE POWER",
"name": "Hive Power | Staked Hive"
"name": "Staked Hive"
},
"hive_dollar":{
"name":"Hive Dollar"

View File

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

View File

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