From be9800cf3509ba9ae986ee29e8a53e5692e54c5c Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Mon, 23 Jan 2023 22:13:08 +0500 Subject: [PATCH] refined asset card ui --- src/config/locales/en-US.json | 4 ++-- src/screens/wallet/children/assetCard.tsx | 6 ++++-- src/screens/wallet/styles/children.styles.ts | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index 61e4dd1f1..4bb4f2689 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -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" diff --git a/src/screens/wallet/children/assetCard.tsx b/src/screens/wallet/children/assetCard.tsx index 6c885165b..d2f692465 100644 --- a/src/screens/wallet/children/assetCard.tsx +++ b/src/screens/wallet/children/assetCard.tsx @@ -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 = ( @@ -103,7 +105,7 @@ export const AssetCard = ({ {value} - {`${(ownedBalance * currentValue).toFixed(6)}${currencySymbol}`} + {_fiatStr} @@ -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} /> ); diff --git a/src/screens/wallet/styles/children.styles.ts b/src/screens/wallet/styles/children.styles.ts index 1803cd7e9..2e06b8499 100644 --- a/src/screens/wallet/styles/children.styles.ts +++ b/src/screens/wallet/styles/children.styles.ts @@ -49,7 +49,7 @@ export default EStyleSheet.create({ }, claimContainer:{ - marginBottom:16, + marginTop:16, }, chartContainer: {