diff --git a/src/components/notifications/Context/components/Static/index.js b/src/components/notifications/Context/components/Static/index.js index a6867a0e..c225a19e 100644 --- a/src/components/notifications/Context/components/Static/index.js +++ b/src/components/notifications/Context/components/Static/index.js @@ -33,6 +33,21 @@ export default (props: Props) => { )} />, ); + } else if (location.state.send) { + notifications.push( + + Destination tag is an arbitrary number which serves as a unique identifier of your transaction. Some services may require this to process your transaction. The current firmware version does not support destination tags yet. +

+ If the receiver requires a destination tag, do not use Trezor to send XRP. We are working on adding this feature. + + )} + />, + ); } } diff --git a/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js b/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js index 7257b3be..873f9b2b 100644 --- a/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js +++ b/src/views/Wallet/views/Account/Send/ripple/components/AdvancedForm/index.js @@ -79,16 +79,16 @@ const getFeeInputState = (feeErrors: string, feeWarnings: string): string => { return state; }; -const getDestinationTagInputState = (errors: string, warnings: string): string => { - let state = ''; - if (warnings && !errors) { - state = 'warning'; - } - if (errors) { - state = 'error'; - } - return state; -}; +// const getDestinationTagInputState = (errors: string, warnings: string): string => { +// let state = ''; +// if (warnings && !errors) { +// state = 'warning'; +// } +// if (errors) { +// state = 'error'; +// } +// return state; +// }; const Left = styled.div` display: flex; @@ -106,11 +106,11 @@ const AdvancedForm = (props: Props) => { warnings, infos, fee, - destinationTag, + // destinationTag, } = props.sendForm; const { onFeeChange, - onDestinationTagChange, + // onDestinationTagChange, } = props.sendFormActions; return ( @@ -151,7 +151,7 @@ const AdvancedForm = (props: Props) => { /> - + {/* { value={destinationTag} onChange={event => onDestinationTagChange(event.target.value)} /> - + */} { props.children } diff --git a/src/views/Wallet/views/Account/Summary/components/Balance/index.js b/src/views/Wallet/views/Account/Summary/components/Balance/index.js index b0974e6d..a314c406 100644 --- a/src/views/Wallet/views/Account/Summary/components/Balance/index.js +++ b/src/views/Wallet/views/Account/Summary/components/Balance/index.js @@ -5,6 +5,7 @@ import styled from 'styled-components'; import Icon from 'components/Icon'; import colors from 'config/colors'; import ICONS from 'config/icons'; +import Tooltip from 'components/Tooltip'; import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; import type { Network, State as ReducersState } from 'flowtype'; @@ -56,6 +57,7 @@ const FiatValue = styled.div` margin: 7px 0; min-height: 25px; color: ${colors.TEXT_PRIMARY}; + align-items: center; `; const FiatValueRate = styled.div` @@ -86,6 +88,15 @@ const Label = styled.div` color: ${colors.TEXT_SECONDARY}; `; +const StyledIcon = styled(Icon)` + cursor: pointer; + margin-top: -5px; +`; + +const TooltipWrapper = styled.div` + display: flex; + align-items: center; +`; class AccountBalance extends PureComponent { constructor(props: Props) { @@ -115,6 +126,20 @@ class AccountBalance extends PureComponent { fiat = accountBalance.times(fiatRateValue).toFixed(2); } + const NoRatesTooltip = ( + + + + ); + return ( { - {fiatRate && ( - ${fiat} - )} + + {fiatRate ? `$ ${fiat}` : 'N/A'} + {!fiatRate && NoRatesTooltip} + {this.props.balance} {network.symbol} - {fiatRate && ( - - - ${fiatRateValue} - 1.00 {network.symbol} - - )} + + + + {fiatRate ? `$ ${fiatRateValue}` : 'N/A'} + {!fiatRate && NoRatesTooltip} + + 1 {network.symbol} + )} diff --git a/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js b/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js index e337cb63..1bebaca3 100644 --- a/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js +++ b/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js @@ -6,7 +6,7 @@ import Icon from 'components/Icon'; import colors from 'config/colors'; import ICONS from 'config/icons'; import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; - +import Tooltip from 'components/Tooltip'; import type { Network, State as ReducersState } from 'flowtype'; type Props = { @@ -57,6 +57,7 @@ const FiatValue = styled.div` margin: 7px 0; min-height: 25px; color: ${colors.TEXT_PRIMARY}; + align-items: center; `; const FiatValueRate = styled.div` @@ -65,8 +66,8 @@ const FiatValueRate = styled.div` min-height: 25px; margin: 7px 0; display: flex; - align-items: center; color: ${colors.TEXT_PRIMARY}; + align-items: center; `; const BalanceWrapper = styled.div` @@ -87,6 +88,15 @@ const Label = styled.div` color: ${colors.TEXT_SECONDARY}; `; +const StyledIcon = styled(Icon)` + cursor: pointer; + margin-top: -5px; +`; + +const TooltipWrapper = styled.div` + display: flex; + align-items: center; +`; class AccountBalance extends PureComponent { constructor(props: Props) { @@ -116,6 +126,20 @@ class AccountBalance extends PureComponent { fiat = accountBalance.times(fiatRateValue).toFixed(2); } + const NoRatesTooltip = ( + + + + ); + return ( { - {fiatRate && ( - ${fiat} - )} + + {fiatRate ? `$ ${fiat}` : 'N/A'} + {!fiatRate && NoRatesTooltip} + {this.props.balance} {network.symbol} {this.props.reserve !== '0' && ( - {this.props.reserve} {network.symbol} + {this.props.reserve} {network.symbol} )} - {fiatRate && ( - - - ${fiatRateValue} - 1.00 {network.symbol} - - )} + + + + + {fiatRate ? `$ ${fiatRateValue}` : 'N/A'} + {!fiatRate && NoRatesTooltip} + + 1 {network.symbol} + + )}