From a5be81e96d05f6f7ba602c7fc323dad569529e3d Mon Sep 17 00:00:00 2001 From: William O'Beirne Date: Mon, 5 Mar 2018 22:22:45 -0500 Subject: [PATCH 1/6] Change swap link icon to ShapeShift logo. Get rid of new banner. (#1264) --- .../assets/images/logo-shapeshift-no-text.svg | 97 +++++++++++++++++++ .../Header/components/NavigationLink.scss | 2 +- .../Tabs/Swap/components/CurrentRates.scss | 2 + .../Swap/components/ShapeshiftBanner.scss | 31 ------ .../Tabs/Swap/components/ShapeshiftBanner.tsx | 17 ---- common/containers/Tabs/Swap/index.tsx | 2 - 6 files changed, 100 insertions(+), 51 deletions(-) create mode 100644 common/assets/images/logo-shapeshift-no-text.svg delete mode 100644 common/containers/Tabs/Swap/components/ShapeshiftBanner.scss delete mode 100644 common/containers/Tabs/Swap/components/ShapeshiftBanner.tsx 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/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/ShapeshiftBanner.scss b/common/containers/Tabs/Swap/components/ShapeshiftBanner.scss deleted file mode 100644 index 9336dd1a..00000000 --- a/common/containers/Tabs/Swap/components/ShapeshiftBanner.scss +++ /dev/null @@ -1,31 +0,0 @@ -@import 'common/sass/variables'; - -.ShapeshiftBanner { - margin: $space 0; - text-align: center; - - &-banner { - display: inline-block; - text-align: left; - padding: $space-sm $space; - background-color: #3a526d; - border-radius: 3px; - box-shadow: 0 3px 8px 0 rgba(0,0,0,0.1), inset 0 0 3px 0 rgba(0,0,0,0.1); - p { - display: inline-block; - color: white; - vertical-align: middle; - margin-bottom: 0px; - - b { - margin-right: 5px; - } - } - img { - display: inline-block; - height: 32px; - box-sizing: content-box; - margin-left: 8px; - } - } -} diff --git a/common/containers/Tabs/Swap/components/ShapeshiftBanner.tsx b/common/containers/Tabs/Swap/components/ShapeshiftBanner.tsx deleted file mode 100644 index 492f5e82..00000000 --- a/common/containers/Tabs/Swap/components/ShapeshiftBanner.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import './ShapeshiftBanner.scss'; -import shapeshiftSvg from 'assets/images/logo-shapeshift.svg'; - -const ShapeshiftBanner: React.SFC<{}> = () => ( -
-
-

- 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 && } From 2d057eb0b2f94e02554c8a6384e22fad558c67f9 Mon Sep 17 00:00:00 2001 From: HenryNguyen5 Date: Mon, 5 Mar 2018 23:51:31 -0500 Subject: [PATCH 2/6] Fix swap timer (#1265) --- common/containers/Tabs/Swap/components/PartThree.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 Date: Mon, 5 Mar 2018 23:52:20 -0600 Subject: [PATCH 3/6] Revert hard-source-webpack-plugin updates (#1269) * Revert "fix(package): update hard-source-webpack-plugin to version 0.6.4 (#1254)" This reverts commit e45324e7f17d06a7812a9442b74bfe0b89bbc11c. * Revert "fix(package): update hard-source-webpack-plugin to version 0.6.1 (#1232)" This reverts commit b016d358190af0057dda771e8a538ca1a20923eb. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4672bb13..2cd6f7e9 100644 --- a/package.json +++ b/package.json @@ -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", From b901c3e1256ec51975c93514828888e85b36f125 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 5 Mar 2018 23:52:43 -0600 Subject: [PATCH 4/6] chore(package): update @types/jest to version 22.2.0 (#1261) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2cd6f7e9..daf8c649 100644 --- a/package.json +++ b/package.json @@ -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", From 3278318fa62241990c75825a91919c5cf314a9a3 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Wed, 7 Mar 2018 10:54:14 -0600 Subject: [PATCH 5/6] Fix Coinbase Widget (#1286) * Connect Promos; pass current wallet address to Coinbase * Use ShapeShift as promo if no wallet instance when showing Coinbase * use appstate for typing --- .../PromoComponents/Coinbase.tsx | 8 +++- common/components/BalanceSidebar/Promos.tsx | 38 +++++++++++++++++-- 2 files changed, 40 insertions(+), 6 deletions(-) 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); From 0e26f7af4c9589c69c6e93747afa7dafbe69e5f9 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Wed, 7 Mar 2018 10:55:29 -0600 Subject: [PATCH 6/6] Tag Beta 0.5.1 (#1287) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index daf8c649..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",