diff --git a/config/mocks/wallet-options-v4.json b/config/mocks/wallet-options-v4.json index fb54a656b2d..973864c3ac9 100644 --- a/config/mocks/wallet-options-v4.json +++ b/config/mocks/wallet-options-v4.json @@ -20,7 +20,7 @@ "coinCode": "EUR", "coinTicker": "EUR", "colorCode": "fiat", - "displayName": "Euro", + "displayName": "Euros", "icons": { "default": "eur", "circle": "eur", @@ -39,7 +39,7 @@ "coinCode": "GBP", "coinTicker": "GBP", "colorCode": "fiat", - "displayName": "British Pound", + "displayName": "Pounds", "icons": { "default": "gbp", "circle": "gbp", diff --git a/packages/blockchain-info-components/src/Colors/DarkMode.ts b/packages/blockchain-info-components/src/Colors/DarkMode.ts index 85864425f84..da0e7f77280 100644 --- a/packages/blockchain-info-components/src/Colors/DarkMode.ts +++ b/packages/blockchain-info-components/src/Colors/DarkMode.ts @@ -68,7 +68,7 @@ const DarkTheme: DefaultTheme = { red700: '#B2251B', red800: '#99180F', red900: '#800900', - fiat: '#339F7B', + fiat: '#00B26B', 'fiat-light': 'rgba(0, 178, 107, 0.15)', algo: '#000000', btc: '#FF9B22', diff --git a/packages/blockchain-info-components/src/Colors/Default.ts b/packages/blockchain-info-components/src/Colors/Default.ts index e564a13e3eb..e9538d0d9ff 100644 --- a/packages/blockchain-info-components/src/Colors/Default.ts +++ b/packages/blockchain-info-components/src/Colors/Default.ts @@ -67,7 +67,7 @@ const Default = { red700: '#B2251B', red800: '#99180F', red900: '#800900', - fiat: '#339F7B', + fiat: '#00B26B', 'fiat-light': 'rgba(0, 178, 107, 0.15)', algo: '#000000', btc: '#FF9B22', diff --git a/packages/blockchain-wallet-v4-frontend/src/components/Form/SelectBoxCurrency/index.js b/packages/blockchain-wallet-v4-frontend/src/components/Form/SelectBoxCurrency/index.js index 7fb1467e6e3..a44537163b1 100644 --- a/packages/blockchain-wallet-v4-frontend/src/components/Form/SelectBoxCurrency/index.js +++ b/packages/blockchain-wallet-v4-frontend/src/components/Form/SelectBoxCurrency/index.js @@ -22,8 +22,8 @@ const mapStateToProps = state => ({ { text: 'Chilean Peso', value: 'CLP' }, { text: 'Chinese Yuan', value: 'CNY' }, { text: 'Danish Krone', value: 'DKK' }, - { text: 'Euro', value: 'EUR' }, - { text: 'British Pound', value: 'GBP' }, + { text: 'Euros', value: 'EUR' }, + { text: 'Pounds', value: 'GBP' }, { text: 'Hong Kong Dollar', value: 'HKD' }, { text: 'Icelandic Króna', value: 'ISK' }, { text: 'Indian Rupee', value: 'INR' }, diff --git a/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/CustodialTx/index.tsx b/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/CustodialTx/index.tsx index 9717d5ad462..511aabd687a 100644 --- a/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/CustodialTx/index.tsx +++ b/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/CustodialTx/index.tsx @@ -4,11 +4,16 @@ import React from 'react' import styled from 'styled-components' import { CustodialTransactionRow } from '../components' +import { fiatToString } from 'core/exchange/currency' import { SBTransactionType } from 'core/types' +import FiatDisplay from 'components/Display/FiatDisplay' -import { fiatToString } from 'core/exchange/currency' import { IconTx, Timestamp } from './model' +import { Props as OwnProps } from '../TransactionList' +const StyledCustodialTransactionRow = styled(CustodialTransactionRow)` + cursor: initial; +` const Col = styled.div<{ width: string }>` width: ${props => props.width}; ` @@ -19,10 +24,13 @@ const Row = styled(Col)` const Status = styled.div` margin-left: 16px; ` +const StyledFiatDisplay = styled(FiatDisplay)` + justify-content: flex-end; +` const CustodialTxListItem: React.FC = props => { return ( - + @@ -65,12 +73,23 @@ const CustodialTxListItem: React.FC = props => { unit: props.tx.amount.symbol })} + {props.coin !== props.currency && ( + + {props.tx.amount.value} + + )} - + ) } -export type Props = { +export type Props = OwnProps & { tx: SBTransactionType } diff --git a/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/TransactionList/index.tsx b/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/TransactionList/index.tsx index 65d780c5864..e6cb699fbb7 100644 --- a/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/TransactionList/index.tsx +++ b/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/TransactionList/index.tsx @@ -1,10 +1,10 @@ import { - CoinType, FiatType, ProcessedTxType, RemoteDataType, SBOrderType, - SBTransactionType + SBTransactionType, + WalletCurrencyType } from 'core/types' import DataError from 'components/DataError' import React, { PureComponent } from 'react' @@ -33,9 +33,7 @@ class TransactionList extends PureComponent { const { coin, coinTicker, currency, data } = this.props return data.cata({ - Success: ( - transactions: Array - ) => ( + Success: (transactions: SuccessStateType) => ( {transactions.map(tx => { return 'hash' in tx ? ( @@ -49,7 +47,7 @@ class TransactionList extends PureComponent { ) : 'pair' in tx ? ( ) : ( - + ) })} @@ -64,7 +62,7 @@ class TransactionList extends PureComponent { } export type Props = { - coin: CoinType + coin: WalletCurrencyType coinTicker: string currency: FiatType data: RemoteDataType< @@ -77,4 +75,8 @@ export type Props = { sourceType?: string } +export type SuccessStateType = Array< + SBOrderType | SBTransactionType | ProcessedTxType +> + export default TransactionList diff --git a/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/index.tsx b/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/index.tsx index 49a55fa40b9..91d5624d56e 100644 --- a/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/index.tsx +++ b/packages/blockchain-wallet-v4-frontend/src/scenes/Transactions/index.tsx @@ -6,6 +6,7 @@ import { CoinTypeEnum, FiatType, SupportedCoinType, + WalletCurrencyType, WalletFiatEnum, WalletFiatType } from 'core/types' @@ -86,7 +87,10 @@ const StatsContainer = styled.div` class TransactionsContainer extends React.PureComponent { componentDidMount () { this.props.initTxs() - this.props.miscActions.fetchPrice24H(this.props.coin, this.props.currency) + this.props.miscActions.fetchPrice24H( + this.props.coin as CoinType, + this.props.currency + ) } componentDidUpdate (prevProps) { @@ -164,7 +168,7 @@ class TransactionsContainer extends React.PureComponent { {(hasTxResults || isSearchEntered) && coin in CoinTypeEnum && ( - + )} {!hasTxResults ? ( isSearchEntered ? ( @@ -173,7 +177,7 @@ class TransactionsContainer extends React.PureComponent { ) : ( - + ) ) : sourceType && sourceType === 'INTEREST' ? ( @@ -245,7 +249,7 @@ const mapDispatchToProps = (dispatch: Dispatch, ownProps) => { const connector = connect(mapStateToProps, mapDispatchToProps) export type OwnProps = { - coin: CoinType + coin: WalletCurrencyType isCoinErc20: boolean } diff --git a/packages/blockchain-wallet-v4/src/exchange/currencies/EUR.ts b/packages/blockchain-wallet-v4/src/exchange/currencies/EUR.ts index bfdc2345dd1..cdbfcb21f17 100755 --- a/packages/blockchain-wallet-v4/src/exchange/currencies/EUR.ts +++ b/packages/blockchain-wallet-v4/src/exchange/currencies/EUR.ts @@ -1,7 +1,7 @@ export default { code: 'EUR', base: 'CENT', - displayName: 'Euro', + displayName: 'Euros', trade: 'EUR', units: { CENT: { diff --git a/packages/blockchain-wallet-v4/src/exchange/currencies/GBP.ts b/packages/blockchain-wallet-v4/src/exchange/currencies/GBP.ts index 8b29ed846e1..0652704fb8a 100755 --- a/packages/blockchain-wallet-v4/src/exchange/currencies/GBP.ts +++ b/packages/blockchain-wallet-v4/src/exchange/currencies/GBP.ts @@ -1,7 +1,7 @@ export default { code: 'GBP', base: 'CENT', - displayName: 'British Pound', + displayName: 'Pounds', trade: 'GBP', units: { CENT: { diff --git a/packages/blockchain-wallet-v4/src/redux/walletOptions/types.ts b/packages/blockchain-wallet-v4/src/redux/walletOptions/types.ts index ba48e84347e..75d779dcd8a 100644 --- a/packages/blockchain-wallet-v4/src/redux/walletOptions/types.ts +++ b/packages/blockchain-wallet-v4/src/redux/walletOptions/types.ts @@ -41,7 +41,7 @@ export type SupportedFiatType = { coinCode: WalletFiatType coinTicker: WalletFiatType colorCode: 'fiat' - displayName: 'Euro' | 'British Pounds' + displayName: 'Euros' | 'Pounds' icons: { circle: 'eur' | 'gbp' circleFilled: 'eur' | 'gbp'