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/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/Header/components/NavigationLink.scss b/common/components/Header/components/NavigationLink.scss index e04c4571..3f3d20d8 100644 --- a/common/components/Header/components/NavigationLink.scss +++ b/common/components/Header/components/NavigationLink.scss @@ -51,7 +51,7 @@ margin-top: -.1rem; width: 1.3rem; height: 1.3rem; - background-image: url('~assets/images/swap.svg'); + background-image: url('~assets/images/logo-shapeshift-no-text.svg'); background-position: center; background-repeat: no-repeat; background-size: contain; diff --git a/common/containers/Tabs/Swap/components/CurrentRates.scss b/common/containers/Tabs/Swap/components/CurrentRates.scss index 21d2cf97..0ed846f8 100644 --- a/common/containers/Tabs/Swap/components/CurrentRates.scss +++ b/common/containers/Tabs/Swap/components/CurrentRates.scss @@ -2,6 +2,8 @@ @import "common/sass/mixins"; .SwapRates { + margin-bottom: $space; + &-title { margin-top: 0; text-align: center; diff --git a/common/containers/Tabs/Swap/components/PartThree.tsx b/common/containers/Tabs/Swap/components/PartThree.tsx index 09dd6ed0..b59d56ec 100644 --- a/common/containers/Tabs/Swap/components/PartThree.tsx +++ b/common/containers/Tabs/Swap/components/PartThree.tsx @@ -5,7 +5,8 @@ import { TStartPollShapeshiftOrderStatus, TStopOrderTimerSwap, TStopPollBityOrderStatus, - TStopPollShapeshiftOrderStatus + TStopPollShapeshiftOrderStatus, + TStartOrderTimerSwap } from 'actions/swap'; import { SwapInput } from 'reducers/swap/types'; import React, { PureComponent } from 'react'; @@ -28,6 +29,7 @@ interface ReduxStateProps { } interface ReduxActionProps { + startOrderTimerSwap: TStartOrderTimerSwap; restartSwap: TRestartSwap; startPollBityOrderStatus: TStartPollBityOrderStatus; stopPollBityOrderStatus: TStopPollBityOrderStatus; @@ -45,6 +47,7 @@ export default class PartThree extends PureComponent = () => ( -
-
-

- New Feature: - Exchange coins & tokens with -

- -
-
-); - -export default ShapeshiftBanner; diff --git a/common/containers/Tabs/Swap/index.tsx b/common/containers/Tabs/Swap/index.tsx index 9597ff73..9ff35a3f 100644 --- a/common/containers/Tabs/Swap/index.tsx +++ b/common/containers/Tabs/Swap/index.tsx @@ -47,7 +47,6 @@ import PartThree from './components/PartThree'; import SupportFooter from './components/SupportFooter'; import ReceivingAddress from './components/ReceivingAddress'; import SwapInfoHeader from './components/SwapInfoHeader'; -import ShapeshiftBanner from './components/ShapeshiftBanner'; import TabSection from 'containers/TabSection'; import { merge } from 'lodash'; import { RouteNotFound } from 'components/RouteNotFound'; @@ -219,7 +218,6 @@ class Swap extends Component ( {step === 1 && } - {step === 1 && } {(step === 2 || step === 3) && }
{step === 1 && } diff --git a/package.json b/package.json index 4672bb13..e95bda21 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "MyCrypto", "author": "MyCryptoHQ", - "version": "0.5.0", + "version": "0.5.1", "main": "main.js", "description": "MyCrypto web and electron app", "repository": "https://github.com/MyCryptoHQ/MyCrypto", @@ -22,7 +22,7 @@ "ethereumjs-util": "5.1.5", "ethereumjs-wallet": "0.6.0", "font-awesome": "4.7.0", - "hard-source-webpack-plugin": "0.6.4", + "hard-source-webpack-plugin": "0.5.16", "hdkey": "0.8.0", "idna-uts46": "1.1.0", "jsonschema": "1.2.2", @@ -56,7 +56,7 @@ "devDependencies": { "@types/classnames": "2.2.3", "@types/history": "4.6.2", - "@types/jest": "22.1.4", + "@types/jest": "22.2.0", "@types/lodash": "4.14.104", "@types/qrcode": "0.8.0", "@types/qrcode.react": "0.6.3",