Skip to content

Commit

Permalink
Merge pull request #143 from syscoin/feat/rollux-tokens-price
Browse files Browse the repository at this point in the history
feat: rollux tokens price & faucet
  • Loading branch information
ThalesBMC committed Jun 14, 2024
2 parents f6696d8 + d0e8b7f commit 73080ef
Show file tree
Hide file tree
Showing 27 changed files with 655 additions and 139 deletions.
5 changes: 3 additions & 2 deletions app/app/actions/hint/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export function toggleShowHint(hintText) {
export function toggleShowHint(hintText, hintType = 'success') {
return {
type: 'SHOW_HINT',
hintText
hintText,
hintType
};
}

Expand Down
4 changes: 3 additions & 1 deletion app/app/components/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ const Main = props => {
</Modal>
);

const renderHintView = () => props.showHintView && <HintView hintText={props.hintText} />;
const renderHintView = () => props.showHintView && <HintView hintText={props.hintText} hintType={props.hintType} />;

const showUpdateModalIfNeeded = async () => {
const latestVersionCode = props.updateConfig?.latest_version_code
Expand Down Expand Up @@ -1426,6 +1426,7 @@ Main.propTypes = {
hideWalletConnectIcon: PropTypes.func,
showHintView: PropTypes.bool,
hintText: PropTypes.string,
hintType: PropTypes.string,
// eslint-disable-next-line react/no-unused-prop-types
ongoingTransactionsModalVisible: PropTypes.bool,
toggleOngoingTransactionsModal: PropTypes.func,
Expand All @@ -1446,6 +1447,7 @@ const mapStateToProps = state => ({
bscNetworkModalVisible: state.modals.bscNetworkModalVisible,
showHintView: state.hint.showHint,
hintText: state.hint.hintText,
hintType: state.hint.hintType,
ongoingTransactionsModalVisible: state.modals.ongoingTransactionsModalVisible,
updateConfig: state.settings.updateConfig,
isLockScreen: state.settings.isLockScreen
Expand Down
16 changes: 6 additions & 10 deletions app/app/components/UI/AssetOverview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class AssetOverview extends PureComponent {
<View style={styles.originLogo}>{this.renderLogo()}</View>
<View style={styles.symbolBase}>
<View style={styles.symbol}>
<Text style={[styles.symbolText, isDarkMode && baseStyles.textDark]} numberOfLines={1}>
<Text style={[styles.symbolText, baseStyles.textDark]} numberOfLines={1}>
{symbol}
</Text>
{address && (
Expand All @@ -318,7 +318,7 @@ class AssetOverview extends PureComponent {
</View>

<View style={styles.assetTrans}>
<Text style={[styles.assetTransTotal, isDarkMode && baseStyles.textDark]}>
<Text style={[styles.assetTransTotal, baseStyles.textDark]}>
{amountSymbol}
{renderAmount(price && price > 10000 ? new BigNumber(price).toFixed(2) : price)}
</Text>
Expand Down Expand Up @@ -352,17 +352,13 @@ class AssetOverview extends PureComponent {
</View>
</View>
</View>
<Text style={[styles.balanceTitle, isDarkMode && baseStyles.subTextDark]}>
<Text style={[styles.balanceTitle, baseStyles.subTextDark]}>
{strings('watch_asset_request.balance')}
</Text>
<Text style={[styles.balance, isDarkMode && baseStyles.textDark]}>
{hideAmount ? '***' : renderAmount(balance)}
</Text>
<Text style={[styles.networthTitle, isDarkMode && baseStyles.subTextDark]}>
{strings('other.networth')}
</Text>
<Text style={[styles.balance, baseStyles.textDark]}>{hideAmount ? '***' : renderAmount(balance)}</Text>
<Text style={[styles.networthTitle, baseStyles.subTextDark]}>{strings('other.networth')}</Text>
<View style={styles.networkWrapper}>
<Text style={[styles.balance, isDarkMode && baseStyles.textDark]}>
<Text style={[styles.balance, baseStyles.textDark]}>
{hideAmount ? '***' : renderAmount(secondaryBalance)}
</Text>
{!asset.lockType && (
Expand Down
Loading

0 comments on commit 73080ef

Please sign in to comment.