diff --git a/common/Root.tsx b/common/Root.tsx index 572cae7d..ca8c5ae2 100644 --- a/common/Root.tsx +++ b/common/Root.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Provider } from 'react-redux'; +import { Provider, connect } from 'react-redux'; import { withRouter, Switch, Redirect, HashRouter, Route, BrowserRouter } from 'react-router-dom'; // Components import Contracts from 'containers/Tabs/Contracts'; @@ -15,27 +15,41 @@ import PageNotFound from 'components/PageNotFound'; import LogOutPrompt from 'components/LogOutPrompt'; import { TitleBar } from 'components/ui'; import { Store } from 'redux'; -import { pollOfflineStatus } from 'actions/config'; +import { pollOfflineStatus, TPollOfflineStatus } from 'actions/config'; import { AppState } from 'reducers'; import { RouteNotFound } from 'components/RouteNotFound'; import { RedirectWithQuery } from 'components/RedirectWithQuery'; import 'what-input'; +import { setUnitMeta, TSetUnitMeta } from 'actions/transaction'; +import { getNetworkUnit } from 'selectors/config'; -interface Props { +interface OwnProps { store: Store; } +interface StateProps { + networkUnit: string; +} + +interface DispatchProps { + pollOfflineStatus: TPollOfflineStatus; + setUnitMeta: TSetUnitMeta; +} + +type Props = OwnProps & StateProps & DispatchProps; + interface State { error: Error | null; } -export default class Root extends Component { +class RootClass extends Component { public state = { error: null }; public componentDidMount() { - this.props.store.dispatch(pollOfflineStatus()); + this.props.pollOfflineStatus(); + this.props.setUnitMeta(this.props.networkUnit); } public componentDidCatch(error: Error) { @@ -134,3 +148,14 @@ const LegacyRoutes = withRouter(props => { ); }); + +const mapStateToProps = (state: AppState) => { + return { + networkUnit: getNetworkUnit(state) + }; +}; + +export default connect(mapStateToProps, { + pollOfflineStatus, + setUnitMeta +})(RootClass); diff --git a/common/actions/config/actionCreators.ts b/common/actions/config/actionCreators.ts index 0c298680..1a2e770f 100644 --- a/common/actions/config/actionCreators.ts +++ b/common/actions/config/actionCreators.ts @@ -48,6 +48,14 @@ export function changeNodeIntent(payload: string): interfaces.ChangeNodeIntentAc }; } +export type TChangeNodeForce = typeof changeNodeForce; +export function changeNodeForce(payload: string): interfaces.ChangeNodeForceAction { + return { + type: TypeKeys.CONFIG_NODE_CHANGE_FORCE, + payload + }; +} + export type TAddCustomNode = typeof addCustomNode; export function addCustomNode( payload: interfaces.AddCustomNodeAction['payload'] diff --git a/common/actions/config/actionTypes.ts b/common/actions/config/actionTypes.ts index 8758af67..14b875aa 100644 --- a/common/actions/config/actionTypes.ts +++ b/common/actions/config/actionTypes.ts @@ -36,6 +36,11 @@ export interface ChangeNodeIntentAction { type: TypeKeys.CONFIG_NODE_CHANGE_INTENT; payload: string; } +/*** Force Change Node ***/ +export interface ChangeNodeForceAction { + type: TypeKeys.CONFIG_NODE_CHANGE_FORCE; + payload: string; +} /*** Add Custom Node ***/ export interface AddCustomNodeAction { diff --git a/common/actions/config/constants.ts b/common/actions/config/constants.ts index a3b58ac1..5c5265d3 100644 --- a/common/actions/config/constants.ts +++ b/common/actions/config/constants.ts @@ -10,6 +10,7 @@ export enum TypeKeys { CONFIG_NODE_WEB3_UNSET = 'CONFIG_NODE_WEB3_UNSET', CONFIG_NODE_CHANGE = 'CONFIG_NODE_CHANGE', CONFIG_NODE_CHANGE_INTENT = 'CONFIG_NODE_CHANGE_INTENT', + CONFIG_NODE_CHANGE_FORCE = 'CONFIG_NODE_CHANGE_FORCE', CONFIG_ADD_CUSTOM_NODE = 'CONFIG_ADD_CUSTOM_NODE', CONFIG_REMOVE_CUSTOM_NODE = 'CONFIG_REMOVE_CUSTOM_NODE', diff --git a/common/actions/swap/actionTypes.ts b/common/actions/swap/actionTypes.ts index 2ef859dd..b5b636e1 100644 --- a/common/actions/swap/actionTypes.ts +++ b/common/actions/swap/actionTypes.ts @@ -8,7 +8,7 @@ export interface Pairs { } export interface SwapInput { - id: string; + label: string; amount: number | string; } diff --git a/common/actions/transaction/actionCreators/fields.ts b/common/actions/transaction/actionCreators/fields.ts index e64c15aa..ab431a8a 100644 --- a/common/actions/transaction/actionCreators/fields.ts +++ b/common/actions/transaction/actionCreators/fields.ts @@ -81,7 +81,10 @@ const setGasPriceField = (payload: SetGasPriceFieldAction['payload']): SetGasPri }); type TReset = typeof reset; -const reset = (): ResetAction => ({ type: TypeKeys.RESET }); +const reset = (payload: ResetAction['payload'] = { include: {}, exclude: {} }): ResetAction => ({ + type: TypeKeys.RESET, + payload +}); export { TInputGasLimit, diff --git a/common/actions/transaction/actionCreators/meta.ts b/common/actions/transaction/actionCreators/meta.ts index d27004cb..7f15ae61 100644 --- a/common/actions/transaction/actionCreators/meta.ts +++ b/common/actions/transaction/actionCreators/meta.ts @@ -5,23 +5,22 @@ import { SetTokenToMetaAction } from 'actions/transaction'; -type TSetTokenBalance = typeof setTokenValue; -type TSetUnitMeta = typeof setUnitMeta; -type TSetTokenTo = typeof setTokenTo; - -const setTokenTo = (payload: SetTokenToMetaAction['payload']): SetTokenToMetaAction => ({ +export type TSetTokenTo = typeof setTokenTo; +export const setTokenTo = (payload: SetTokenToMetaAction['payload']): SetTokenToMetaAction => ({ type: TypeKeys.TOKEN_TO_META_SET, payload }); -const setTokenValue = (payload: SetTokenValueMetaAction['payload']): SetTokenValueMetaAction => ({ +export type TSetTokenValue = typeof setTokenValue; +export const setTokenValue = ( + payload: SetTokenValueMetaAction['payload'] +): SetTokenValueMetaAction => ({ type: TypeKeys.TOKEN_VALUE_META_SET, payload }); -const setUnitMeta = (payload: SetUnitMetaAction['payload']): SetUnitMetaAction => ({ +export type TSetUnitMeta = typeof setUnitMeta; +export const setUnitMeta = (payload: SetUnitMetaAction['payload']): SetUnitMetaAction => ({ type: TypeKeys.UNIT_META_SET, payload }); - -export { TSetUnitMeta, TSetTokenBalance, TSetTokenTo, setUnitMeta, setTokenValue, setTokenTo }; diff --git a/common/actions/transaction/actionTypes/actionTypes.ts b/common/actions/transaction/actionTypes/actionTypes.ts index 2bc7200b..67a3914e 100644 --- a/common/actions/transaction/actionTypes/actionTypes.ts +++ b/common/actions/transaction/actionTypes/actionTypes.ts @@ -7,6 +7,9 @@ import { SignAction } from './sign'; import { SwapAction } from './swap'; import { CurrentAction } from './current'; import { SendEverythingAction } from './sendEverything'; +import { State as FieldState } from 'reducers/transaction/fields'; +import { State as MetaState } from 'reducers/transaction/meta'; +import { State as SignState } from 'reducers/transaction/sign'; export * from './broadcast'; export * from './fields'; @@ -19,6 +22,18 @@ export * from './sendEverything'; export interface ResetAction { type: TypeKeys.RESET; + payload: { + include: { + fields?: (keyof FieldState)[]; + meta?: (keyof MetaState)[]; + sign?: (keyof SignState)[]; + }; + exclude: { + fields?: (keyof FieldState)[]; + meta?: (keyof MetaState)[]; + sign?: (keyof SignState)[]; + }; + }; } export type TransactionAction = diff --git a/common/assets/fonts/social-media.woff b/common/assets/fonts/social-media.woff index d4d0e518..7a4155b9 100644 Binary files a/common/assets/fonts/social-media.woff and b/common/assets/fonts/social-media.woff differ diff --git a/common/assets/fonts/social-media.woff2 b/common/assets/fonts/social-media.woff2 index f2acafc8..78e4b3ef 100644 Binary files a/common/assets/fonts/social-media.woff2 and b/common/assets/fonts/social-media.woff2 differ diff --git a/common/assets/images/favicon.png b/common/assets/images/favicon.png index bb61b1d9..efe18386 100644 Binary files a/common/assets/images/favicon.png and b/common/assets/images/favicon.png differ diff --git a/common/assets/images/icon-check.svg b/common/assets/images/icon-check.svg deleted file mode 100755 index 3c02a8f0..00000000 --- a/common/assets/images/icon-check.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/common/assets/images/icon-edit.svg b/common/assets/images/icon-edit.svg deleted file mode 100755 index 0c863009..00000000 --- a/common/assets/images/icon-edit.svg +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/common/assets/images/icon-help-2.svg b/common/assets/images/icon-help-2.svg deleted file mode 100644 index 04d35cc9..00000000 --- a/common/assets/images/icon-help-2.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/common/assets/images/icon-help-3.svg b/common/assets/images/icon-help-3.svg index 7def12b7..dcf0b831 100644 --- a/common/assets/images/icon-help-3.svg +++ b/common/assets/images/icon-help-3.svg @@ -1 +1 @@ - + diff --git a/common/assets/images/icon-help.svg b/common/assets/images/icon-help.svg deleted file mode 100755 index c2593887..00000000 --- a/common/assets/images/icon-help.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/common/assets/images/icon-view.svg b/common/assets/images/icon-view.svg deleted file mode 100755 index 44c28e34..00000000 --- a/common/assets/images/icon-view.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/common/assets/images/icon-x.svg b/common/assets/images/icon-x.svg deleted file mode 100755 index d6a7c0f7..00000000 --- a/common/assets/images/icon-x.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/common/assets/images/logo-ethereum-2.png b/common/assets/images/logo-ethereum-2.png deleted file mode 100755 index d3c4a3ab..00000000 Binary files a/common/assets/images/logo-ethereum-2.png and /dev/null differ diff --git a/common/assets/images/logo-mycrypto.svg b/common/assets/images/logo-mycrypto.svg index 11329fc3..a20d08bb 100755 --- a/common/assets/images/logo-mycrypto.svg +++ b/common/assets/images/logo-mycrypto.svg @@ -8,7 +8,7 @@ - + diff --git a/common/assets/images/logo-shapeshift-no-text.svg b/common/assets/images/logo-shapeshift-no-text.svg new file mode 100644 index 00000000..b6ec8506 --- /dev/null +++ b/common/assets/images/logo-shapeshift-no-text.svg @@ -0,0 +1,97 @@ + + + + Artboard + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/assets/images/onboarding/slide-01.svg b/common/assets/images/onboarding/slide-01.svg index a9f0c75c..516b8131 100644 --- a/common/assets/images/onboarding/slide-01.svg +++ b/common/assets/images/onboarding/slide-01.svg @@ -54,7 +54,7 @@ - + @@ -69,4 +69,4 @@ - \ No newline at end of file + diff --git a/common/assets/images/onboarding/slide-06.svg b/common/assets/images/onboarding/slide-06.svg index a10c866d..d9f11521 100644 --- a/common/assets/images/onboarding/slide-06.svg +++ b/common/assets/images/onboarding/slide-06.svg @@ -32,7 +32,7 @@ - + @@ -44,4 +44,4 @@ - \ No newline at end of file + diff --git a/common/assets/images/print-sidebar.png b/common/assets/images/print-sidebar.png index 169973c0..343ac0c1 100755 Binary files a/common/assets/images/print-sidebar.png and b/common/assets/images/print-sidebar.png differ diff --git a/common/assets/images/swap.svg b/common/assets/images/swap.svg index 07c4b0f3..a188042a 100644 --- a/common/assets/images/swap.svg +++ b/common/assets/images/swap.svg @@ -13,7 +13,7 @@ - + @@ -23,7 +23,7 @@ - + @@ -41,4 +41,4 @@ - \ No newline at end of file + diff --git a/common/components/AddressField.tsx b/common/components/AddressField.tsx index aff92573..a9e1f065 100644 --- a/common/components/AddressField.tsx +++ b/common/components/AddressField.tsx @@ -1,6 +1,8 @@ import React from 'react'; import { AddressFieldFactory } from './AddressFieldFactory'; import { donationAddressMap } from 'config'; +import translate from 'translations'; +import { Input } from 'components/ui'; interface Props { isReadOnly?: boolean; @@ -9,16 +11,20 @@ interface Props { export const AddressField: React.SFC = ({ isReadOnly }) => ( ( - - - +
+ +
)} /> ); diff --git a/common/components/AddressFieldFactory/AddressInputFactory.tsx b/common/components/AddressFieldFactory/AddressInputFactory.tsx index bb00ddd2..4723a6cf 100644 --- a/common/components/AddressFieldFactory/AddressInputFactory.tsx +++ b/common/components/AddressFieldFactory/AddressInputFactory.tsx @@ -1,6 +1,5 @@ import React, { Component } from 'react'; import { Identicon, Spinner } from 'components/ui'; -import translate from 'translations'; import { Query } from 'components/renderCbs'; import { ICurrentTo, getCurrentTo, isValidCurrentTo } from 'selectors/transaction'; import { connect } from 'react-redux'; @@ -49,7 +48,6 @@ class AddressInputFactoryClass extends Component { return (
- diff --git a/common/components/AlphaAgreement/index.tsx b/common/components/AlphaAgreement/index.tsx deleted file mode 100644 index 7ec4b42a..00000000 --- a/common/components/AlphaAgreement/index.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react'; -import './index.scss'; - -const LS_KEY = 'acknowledged-alpha'; - -interface State { - isFading: boolean; - hasAcknowledged: boolean; -} -export default class AlphaAgreement extends React.PureComponent<{}, State> { - public state = { - hasAcknowledged: !!localStorage.getItem(LS_KEY), - isFading: false - }; - - public render() { - if (this.state.hasAcknowledged) { - return null; - } - - const isFading = this.state.isFading ? 'is-fading' : ''; - - return ( -
-
-

This is an Unstable Version of MyCrypto

-

- You are about to access a beta version of MyCrypto that is currently in development. In - its current state, it should only be used for testing, not for important transactions. -

-

- Any wallets you generate should not hold a significant value, and any transactions you - make should be for small amounts. MyCrypto does not claim responsibility for any issues - that happen while using the beta version. -

-

Are you sure you would like to continue?

- -
- - -
-
-
- ); - } - - private doContinue = () => { - localStorage.setItem(LS_KEY, 'true'); - this.setState({ isFading: true }); - - setTimeout(() => { - this.setState({ hasAcknowledged: true }); - }, 1000); - }; - - private reject = () => { - window.location.assign('https://mycrypto.com'); - }; -} diff --git a/common/components/AmountField.tsx b/common/components/AmountField.tsx index 3a215fe3..9e71fb67 100644 --- a/common/components/AmountField.tsx +++ b/common/components/AmountField.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { AmountFieldFactory } from './AmountFieldFactory'; import { UnitDropDown } from 'components'; import translate, { translateRaw } from 'translations'; +import { Input } from 'components/ui'; interface Props { hasUnitDropdown?: boolean; @@ -16,12 +17,12 @@ export const AmountField: React.SFC = ({ }) => ( ( - - -
- +
-
+ +
)} /> ); diff --git a/common/components/BalanceSidebar/AccountInfo.scss b/common/components/BalanceSidebar/AccountInfo.scss index fde80af6..447b1055 100644 --- a/common/components/BalanceSidebar/AccountInfo.scss +++ b/common/components/BalanceSidebar/AccountInfo.scss @@ -2,24 +2,28 @@ @import 'common/sass/mixins'; .AccountInfo { - &-copy-icon{ - display: inline; - color: $gray-light; - .fa{ - margin-right: 3px; - } - &-copied{ - color: $brand-success; - cursor: pointer; - .fa{ - margin-right: 3px; - } - } + &-copy { + display: inline-block; + cursor: pointer; + color: $text-color; + font-size: $font-size-xs; + opacity: 0.5; + transition: $transition; + &:hover{ - cursor: pointer; - color: $text-color; + opacity: 1; + } + + &.is-copied{ + color: $brand-success; + opacity: 1; + } + + .fa { + margin-right: $space-xs; } } + &-section { margin-top: $space * 1.5; @@ -81,6 +85,7 @@ } &-addr { + margin-top: -$space-xs; word-wrap: break-word; @include mono; } diff --git a/common/components/BalanceSidebar/AccountInfo.tsx b/common/components/BalanceSidebar/AccountInfo.tsx index 9080c541..939fc801 100644 --- a/common/components/BalanceSidebar/AccountInfo.tsx +++ b/common/components/BalanceSidebar/AccountInfo.tsx @@ -1,15 +1,16 @@ -import { Identicon, UnitDisplay } from 'components/ui'; -import { IWallet, Balance, TrezorWallet, LedgerWallet } from 'libs/wallet'; import React from 'react'; +import { connect } from 'react-redux'; +import { toChecksumAddress } from 'ethereumjs-util'; +import { CopyToClipboard } from 'react-copy-to-clipboard'; +import { Identicon, UnitDisplay, Address, NewTabLink } from 'components/ui'; +import { IWallet, Balance, TrezorWallet, LedgerWallet } from 'libs/wallet'; import translate from 'translations'; -import './AccountInfo.scss'; import Spinner from 'components/ui/Spinner'; import { getNetworkConfig, getOffline } from 'selectors/config'; import { AppState } from 'reducers'; -import { connect } from 'react-redux'; import { NetworkConfig } from 'types/network'; import { TSetAccountBalance, setAccountBalance } from 'actions/wallet'; -import { CopyToClipboard } from 'react-copy-to-clipboard'; +import './AccountInfo.scss'; interface OwnProps { wallet: IWallet; @@ -103,11 +104,13 @@ class AccountInfo extends React.Component {
-
{address}
- +
+
+
+
{this.state.copied ? 'copied!' : 'copy address'} @@ -183,24 +186,16 @@ class AccountInfo extends React.Component { diff --git a/common/components/BalanceSidebar/EquivalentValues.scss b/common/components/BalanceSidebar/EquivalentValues.scss index 0466c8d7..437811c0 100644 --- a/common/components/BalanceSidebar/EquivalentValues.scss +++ b/common/components/BalanceSidebar/EquivalentValues.scss @@ -41,7 +41,6 @@ flex-wrap: nowrap; align-items: center; &-fiat-symbol { - height: 18px; width: 18px; margin-right: 0.5rem; text-align: center; diff --git a/common/components/BalanceSidebar/PromoComponents/Coinbase.tsx b/common/components/BalanceSidebar/PromoComponents/Coinbase.tsx index c3714652..6be6dd5e 100644 --- a/common/components/BalanceSidebar/PromoComponents/Coinbase.tsx +++ b/common/components/BalanceSidebar/PromoComponents/Coinbase.tsx @@ -2,10 +2,14 @@ import React from 'react'; import CoinbaseLogo from 'assets/images/logo-coinbase.svg'; import { NewTabLink } from 'components/ui'; -export const Coinbase: React.SFC = () => ( +interface Props { + address: string; +} + +export const Coinbase: React.SFC = ({ address }) => (
diff --git a/common/components/BalanceSidebar/Promos.tsx b/common/components/BalanceSidebar/Promos.tsx index 32f1fbfe..fdc5fa94 100644 --- a/common/components/BalanceSidebar/Promos.tsx +++ b/common/components/BalanceSidebar/Promos.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { TransitionGroup, CSSTransition } from 'react-transition-group'; import { HardwareWallets, Coinbase, Shapeshift } from './PromoComponents'; import './Promos.scss'; - -const promos = [HardwareWallets, Coinbase, Shapeshift]; +import { connect } from 'react-redux'; +import { AppState } from '../../reducers'; const CarouselAnimation = ({ children, ...props }) => ( @@ -11,12 +11,20 @@ const CarouselAnimation = ({ children, ...props }) => ( ); +// Don't change Coinbase index +const promos = [HardwareWallets, Coinbase, Shapeshift]; + interface State { activePromo: number; } -export default class Promos extends React.PureComponent<{}, State> { +interface StateProps { + wallet: AppState['wallet']['inst']; +} + +class PromosClass extends React.PureComponent { public timer: any = null; + public promos = [HardwareWallets, Coinbase, Shapeshift]; public state = { activePromo: parseInt(String(Math.random() * promos.length), 10) @@ -30,13 +38,27 @@ export default class Promos extends React.PureComponent<{}, State> { clearInterval(this.timer); } + public getPromo() { + const { activePromo } = this.state; + const { wallet } = this.props; + if (activePromo === 1) { + if (wallet) { + return ; + } else { + return ; + } + } else { + return promos[activePromo]; + } + } + public render() { const { activePromo } = this.state; return (
- {promos[activePromo]} + {this.getPromo()}
{promos.map((_, index) => { @@ -64,3 +86,11 @@ export default class Promos extends React.PureComponent<{}, State> { this.setState({ activePromo }); }; } + +function mapStateToProps(state: AppState): StateProps { + return { + wallet: state.wallet.inst + }; +} + +export default connect(mapStateToProps, {})(PromosClass); diff --git a/common/components/BalanceSidebar/TokenBalances/AddCustomTokenForm.tsx b/common/components/BalanceSidebar/TokenBalances/AddCustomTokenForm.tsx index efc52718..29c4d742 100644 --- a/common/components/BalanceSidebar/TokenBalances/AddCustomTokenForm.tsx +++ b/common/components/BalanceSidebar/TokenBalances/AddCustomTokenForm.tsx @@ -1,9 +1,8 @@ import React from 'react'; -import classnames from 'classnames'; import { HELP_ARTICLE } from 'config'; import { isPositiveIntegerOrZero, isValidETHAddress } from 'libs/validators'; import translate from 'translations'; -import { HelpLink } from 'components/ui'; +import { HelpLink, Input } from 'components/ui'; import './AddCustomTokenForm.scss'; import { Token } from 'types/network'; @@ -42,7 +41,6 @@ export default class AddCustomTokenForm extends React.PureComponent {field.label} - { + public state = { + hasAcknowledged: !!localStorage.getItem(LS_KEY), + isFading: false + }; + + public render() { + if (this.state.hasAcknowledged) { + return null; + } + + const isFading = this.state.isFading ? 'is-fading' : ''; + + return ( +
+
+

Welcome to the New MyCrypto Beta!

+

+ You are about to use a version of MyCrypto that hasn't been released yet. While we are + confident that it is close to being production ready, you may want to use the current + production site for larger or more time-sensitive transactions. +

+

+ Feedback and bug reports are greatly appreciated. You can file issues on our{' '} + + GitHub repository + {' '} + or join our Discord server to discuss the + beta. +

+

Are you sure you would like to continue?

+ +
+ + +
+
+
+ ); + } + + private doContinue = () => { + localStorage.setItem(LS_KEY, 'true'); + this.setState({ isFading: true }); + + setTimeout(() => { + this.setState({ hasAcknowledged: true }); + }, 1000); + }; + + private reject = () => { + window.location.assign('https://mycrypto.com'); + }; +} diff --git a/common/components/CurrentCustomMessage.tsx b/common/components/CurrentCustomMessage.tsx index 6932955c..016c90e1 100644 --- a/common/components/CurrentCustomMessage.tsx +++ b/common/components/CurrentCustomMessage.tsx @@ -5,6 +5,7 @@ import { getCurrentTo, ICurrentTo } from 'selectors/transaction'; import { getAllTokens } from 'selectors/config'; import { getWalletInst } from 'selectors/wallet'; import { getAddressMessage } from 'config'; +import { Address } from 'components/ui'; import { Token } from 'types/network'; interface ReduxProps { @@ -72,7 +73,10 @@ class CurrentCustomMessageClass extends PureComponent {

- A message regarding {address}: + A message regarding{' '} + +

+ :

{msg.msg}

diff --git a/common/components/DataField.tsx b/common/components/DataField.tsx index 14b14b9c..7466d890 100644 --- a/common/components/DataField.tsx +++ b/common/components/DataField.tsx @@ -2,21 +2,24 @@ import { DataFieldFactory } from './DataFieldFactory'; import React from 'react'; import translate from 'translations'; import { donationAddressMap } from 'config'; +import { Input } from 'components/ui'; export const DataField: React.SFC<{}> = () => ( ( - <> - - - +
+ +
)} /> ); diff --git a/common/components/ErrorScreen/index.tsx b/common/components/ErrorScreen/index.tsx index 6c1b3063..76953117 100644 --- a/common/components/ErrorScreen/index.tsx +++ b/common/components/ErrorScreen/index.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { NewTabLink } from 'components/ui'; import './index.scss'; const SUBJECT = 'Error!'; @@ -24,14 +25,17 @@ const ErrorScreen: React.SFC = ({ error }) => { > support@mycrypto.com {' '} - if a refresh doesn't fix it (or click it anyway to open a ticket 😊). If you attach the - following error, you'll make it a ton easier to fix the issue. + if a refresh doesn't fix it (or click it anyway to open a ticket 😊). You can also submit + an issue on our{' '} + + GitHub Repository + . Please attach the following error to help our team solve your issue.

+ {error.message}
Please make sure the error message does not include any sensitive information before - sending it us. We don't want your private keys! + sending it to us. We don't want your private keys!
- {error.message}
); diff --git a/common/components/ExtendedNotifications/TransactionSucceeded.tsx b/common/components/ExtendedNotifications/TransactionSucceeded.tsx index ea0cb9b0..c2198890 100644 --- a/common/components/ExtendedNotifications/TransactionSucceeded.tsx +++ b/common/components/ExtendedNotifications/TransactionSucceeded.tsx @@ -1,26 +1,33 @@ import React from 'react'; -import { translateRaw } from 'translations'; +import { Link } from 'react-router-dom'; +import translate from 'translations'; +import { NewTabLink } from 'components/ui'; import { BlockExplorerConfig } from 'types/network'; export interface TransactionSucceededProps { txHash: string; - blockExplorer: BlockExplorerConfig; + blockExplorer?: BlockExplorerConfig; } const TransactionSucceeded = ({ txHash, blockExplorer }: TransactionSucceededProps) => { - const txHashLink = blockExplorer.txUrl(txHash); + let verifyBtn: React.ReactElement | undefined; + if (blockExplorer) { + verifyBtn = ( + + Verify Transaction on {blockExplorer.name} + + ); + } return (
-

{translateRaw('SUCCESS_3') + txHash}

- - Verify Transaction - +

+ {translate('SUCCESS_3')} {txHash} +

+ {verifyBtn} + + {translate('NAV_CheckTxStatus')} +
); }; diff --git a/common/components/Footer/DisclaimerModal.tsx b/common/components/Footer/DisclaimerModal.tsx index 8ec1b62b..3c18a17a 100644 --- a/common/components/Footer/DisclaimerModal.tsx +++ b/common/components/Footer/DisclaimerModal.tsx @@ -41,7 +41,11 @@ const DisclaimerModal: React.SFC = ({ isOpen, handleClose }) => { English and, because of this, the English version of our website is the official text.

- MIT License Copyright © 2015-2017 MyCrypto LLC + MIT License +
+ Copyright (c) 2015-2017 MyEtherWallet LLC +
+ Copyright (c) 2018 MyCrypto, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this diff --git a/common/components/Footer/index.scss b/common/components/Footer/index.scss index cf7ac9d5..23a39852 100644 --- a/common/components/Footer/index.scss +++ b/common/components/Footer/index.scss @@ -158,10 +158,10 @@ $footer-link-color: #fff; .SocialMediaLink { transition: opacity 0.3s; color: #fff; - margin: 0.65rem; + margin: 0.55rem; > i { - font-size: 1.2rem; + font-size: 1.15rem; } &:hover, diff --git a/common/components/Footer/index.tsx b/common/components/Footer/index.tsx index 46e2e9f1..15bf7e38 100644 --- a/common/components/Footer/index.tsx +++ b/common/components/Footer/index.tsx @@ -5,7 +5,8 @@ import { ethercardReferralURL, donationAddressMap, VERSION, - knowledgeBaseURL + knowledgeBaseURL, + discordURL } from 'config'; import React from 'react'; import PreFooter from './PreFooter'; @@ -46,6 +47,10 @@ const SOCIAL_MEDIA: Link[] = [ { link: 'https://www.reddit.com/r/mycrypto/', text: 'reddit' + }, + { + link: discordURL, + text: 'discord' } ]; diff --git a/common/components/GasLimitField.tsx b/common/components/GasLimitField.tsx index f5b1c8af..a5d62eb7 100644 --- a/common/components/GasLimitField.tsx +++ b/common/components/GasLimitField.tsx @@ -4,6 +4,7 @@ import translate from 'translations'; import { gasLimitValidator } from 'libs/validators'; import { InlineSpinner } from 'components/ui/InlineSpinner'; import './GasLimitField.scss'; +import { Input } from 'components/ui'; interface Props { customLabel?: string; @@ -13,22 +14,24 @@ interface Props { export const GasLimitField: React.SFC = ({ customLabel, disabled }) => ( ( - -

- {customLabel ? : } -
- -
- - +
+
- + +
) : null; }} /> diff --git a/common/components/SendButtonFactory/SendButtonFactory.tsx b/common/components/SendButtonFactory/SendButtonFactory.tsx index 4fbd62a6..dfb815ec 100644 --- a/common/components/SendButtonFactory/SendButtonFactory.tsx +++ b/common/components/SendButtonFactory/SendButtonFactory.tsx @@ -9,6 +9,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { AppState } from 'reducers'; import { ConfirmationModal } from 'components/ConfirmationModal'; +import { TextArea } from 'components/ui'; export interface CallbackProps { onClick(): void; @@ -42,12 +43,7 @@ class SendButtonFactoryClass extends Component { ? 'Transaction Parameters' : translate('SEND_raw')} -