From b8d2cc1221f7135f55757198585d36de6a69c145 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 26 Oct 2018 13:52:29 +0200 Subject: style: remove small gap under topbar --- .../ts/components/documentation/docs_top_bar.tsx | 48 +++++++++++----------- .../ts/pages/documentation/developers_page.tsx | 1 + 2 files changed, 26 insertions(+), 23 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 2054d0860..cf26e8a2a 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -37,33 +37,35 @@ export class DocsTopBar extends React.Component - - - - {this._renderMenuItems(constants.DEVELOPER_TOPBAR_LINKS)} + + + + + {this._renderMenuItems(constants.DEVELOPER_TOPBAR_LINKS)} + - - - - + + + + + + + - - - - + {this.props.screenWidth === ScreenWidths.Sm && this._renderDrawer()} ); diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 361dbc86e..d6986b399 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -157,6 +157,7 @@ export class DevelopersPage extends React.Component -- cgit v1.2.3 From 6696aa46ee675d2c0785117995a6f7780021e39c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 26 Oct 2018 14:01:00 +0200 Subject: style: make line-height of sidebar title 26px, make sure still bottom aligned with version picker --- packages/website/ts/components/documentation/sidebar_header.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/website/ts/components/documentation/sidebar_header.tsx b/packages/website/ts/components/documentation/sidebar_header.tsx index fece2704b..9ced52c74 100644 --- a/packages/website/ts/components/documentation/sidebar_header.tsx +++ b/packages/website/ts/components/documentation/sidebar_header.tsx @@ -29,6 +29,7 @@ export const SidebarHeader: React.StatelessComponent = ({ fontColor={colors.lightLinkBlue} fontSize={screenWidth === ScreenWidths.Sm ? '20px' : '22px'} fontWeight="bold" + lineHeight="26px" > {title} @@ -36,7 +37,7 @@ export const SidebarHeader: React.StatelessComponent = ({ {!_.isUndefined(docsVersion) && !_.isUndefined(availableDocVersions) && !_.isUndefined(onVersionSelected) && ( -
+
Date: Fri, 26 Oct 2018 14:01:15 +0200 Subject: style: reduce border size on version dropdown --- packages/website/ts/components/documentation/version_drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/website/ts/components/documentation/version_drop_down.tsx b/packages/website/ts/components/documentation/version_drop_down.tsx index a1c8b0547..5e77530fd 100644 --- a/packages/website/ts/components/documentation/version_drop_down.tsx +++ b/packages/website/ts/components/documentation/version_drop_down.tsx @@ -27,7 +27,7 @@ const PlainActiveNode: React.StatelessComponent = ({ className, const ActiveNode = styled(PlainActiveNode)` cursor: pointer; - border: 2px solid ${colors.beigeWhite}; + border: 1px solid ${colors.beigeWhite}; border-radius: 4px; padding: 4px 6px 4px 8px; `; -- cgit v1.2.3 From 81fb8d614f1ea4ad4ae01cf7426e8653d18efccc Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 26 Oct 2018 17:19:53 +0200 Subject: chore: Make `External exports` clickable on sidebar --- packages/react-docs/src/docs_info.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 54b59ef1f..76f7784ba 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -10,6 +10,7 @@ import { SectionsMap, SupportedDocJson, } from './types'; +import { constants } from './utils/constants'; export class DocsInfo { public id: string; @@ -64,7 +65,7 @@ export class DocsInfo { const docSections = _.keys(this.sections); _.each(docSections, sectionName => { const docSection = docAgnosticFormat[sectionName]; - if (_.isUndefined(docSection)) { + if (_.isUndefined(docSection) || sectionName === constants.EXTERNAL_EXPORTS_SECTION_NAME) { return; // no-op } -- cgit v1.2.3 From 801004be6635b2ffc04601181db850499e5ee18e Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 7 Nov 2018 16:06:20 -0800 Subject: start jsonRpcRequestId at 1, not 0 I'm trying to use the 0x-watcher against a parity websocket rpc and getting an error that I think is the same as https://github.com/ethereum/web3.js/issues/1967 --- packages/web3-wrapper/src/web3_wrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index 56877fef3..effcd78ab 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -157,7 +157,7 @@ export class Web3Wrapper { this.abiDecoder = new AbiDecoder([]); this._provider = provider; this._txDefaults = txDefaults || {}; - this._jsonRpcRequestId = 0; + this._jsonRpcRequestId = 1; } /** * Get the contract defaults set to the Web3Wrapper instance -- cgit v1.2.3 From 990d510d05dc3698a457f0c850042b436018fdaf Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 8 Nov 2018 16:39:40 -0800 Subject: feat: add lock icon --- packages/instant/src/components/ui/icon.tsx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages') diff --git a/packages/instant/src/components/ui/icon.tsx b/packages/instant/src/components/ui/icon.tsx index a88fa87dd..811142b5b 100644 --- a/packages/instant/src/components/ui/icon.tsx +++ b/packages/instant/src/components/ui/icon.tsx @@ -20,6 +20,7 @@ interface IconInfoMapping { success: IconInfo; chevron: IconInfo; search: IconInfo; + lock: IconInfo; } const ICONS: IconInfoMapping = { closeX: { @@ -58,6 +59,11 @@ const ICONS: IconInfoMapping = { path: 'M8.39404 5.19727C8.39404 6.96289 6.96265 8.39453 5.19702 8.39453C3.4314 8.39453 2 6.96289 2 5.19727C2 3.43164 3.4314 2 5.19702 2C6.96265 2 8.39404 3.43164 8.39404 5.19727ZM8.09668 9.51074C7.26855 10.0684 6.27075 10.3945 5.19702 10.3945C2.3269 10.3945 0 8.06738 0 5.19727C0 2.32715 2.3269 0 5.19702 0C8.06738 0 10.394 2.32715 10.394 5.19727C10.394 6.27051 10.0686 7.26855 9.51074 8.09668L13.6997 12.2861L12.2854 13.7002L8.09668 9.51074Z', }, + lock: { + viewBox: '0 0 13 16', + path: + 'M6.47619 0C3.79509 0 1.60489 2.21216 1.60489 4.92014V6.33135C0.717479 6.33135 0 7.05602 0 7.95232V14.379C0 15.2753 0.717479 16 1.60489 16H11.3475C12.2349 16 12.9524 15.2753 12.9524 14.379V7.95232C12.9524 7.05602 12.2349 6.33135 11.3475 6.33135V4.92014C11.3475 2.21216 9.1573 0 6.47619 0ZM9.6482 6.33135H3.30418V4.92014C3.30418 3.16567 4.72026 1.71633 6.47619 1.71633C8.23213 1.71633 9.6482 3.16567 9.6482 4.92014V6.33135Z', + }, }; export interface IconProps { -- cgit v1.2.3 From fc138cd73d6eebc6a6250ede1ec7a465d4d40685 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 8 Nov 2018 16:39:51 -0800 Subject: feat: add metamask logo --- packages/instant/src/components/meta_mask_logo.tsx | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 packages/instant/src/components/meta_mask_logo.tsx (limited to 'packages') diff --git a/packages/instant/src/components/meta_mask_logo.tsx b/packages/instant/src/components/meta_mask_logo.tsx new file mode 100644 index 000000000..d1ad10c23 --- /dev/null +++ b/packages/instant/src/components/meta_mask_logo.tsx @@ -0,0 +1,78 @@ +import * as React from 'react'; + +export interface MetaMaskLogoProps { + width?: number; + height?: number; +} + +export const MetaMaskLogo: React.StatelessComponent = ({ width, height }) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +MetaMaskLogo.defaultProps = { + width: 85, + height: 80, +}; -- cgit v1.2.3 From 39ae21d6939b43fbae0669219801b2bab140da9c Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 8 Nov 2018 16:58:44 -0800 Subject: feat: allow panel children to fill entire content / remove title from panel component --- .../instant/src/components/erc20_token_selector.tsx | 7 ++++++- packages/instant/src/components/sliding_panel.tsx | 18 ++++-------------- .../src/components/zero_ex_instant_container.tsx | 1 - 3 files changed, 10 insertions(+), 16 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index 3503ff31a..d4a77c278 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -29,13 +29,18 @@ export class ERC20TokenSelector extends React.Component const { tokens, onTokenSelect } = this.props; return ( + + + Select Token + + - + {_.map(tokens, token => { if (!this._isTokenQueryMatch(token)) { return null; diff --git a/packages/instant/src/components/sliding_panel.tsx b/packages/instant/src/components/sliding_panel.tsx index 9d16f9560..bb1049a31 100644 --- a/packages/instant/src/components/sliding_panel.tsx +++ b/packages/instant/src/components/sliding_panel.tsx @@ -12,25 +12,15 @@ import { Icon } from './ui/icon'; import { Text } from './ui/text'; export interface PanelProps { - title?: string; onClose?: () => void; } -export const Panel: React.StatelessComponent = ({ title, children, onClose }) => ( +export const Panel: React.StatelessComponent = ({ children, onClose }) => ( - - {title && ( - - - {title} - - - )} - - - + + - + {children} diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 5748e064e..47fd75d25 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -54,7 +54,6 @@ export class ZeroExInstantContainer extends React.Component -- cgit v1.2.3 From daa011f7cbbc6719d99eef251d07f552e23c21fb Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 11:15:32 -0800 Subject: feat: implement CurrentStandardSlidingPanel and put it in the main container --- .../src/components/animations/slide_animation.tsx | 2 +- packages/instant/src/components/sliding_error.tsx | 3 ++- packages/instant/src/components/sliding_panel.tsx | 4 +-- .../src/components/standard_sliding_panel.tsx | 28 +++++++++++++++++++ .../src/components/zero_ex_instant_container.tsx | 4 ++- .../containers/current_standard_sliding_panel.ts | 31 ++++++++++++++++++++++ packages/instant/src/containers/latest_error.tsx | 3 +-- packages/instant/src/redux/actions.ts | 7 ++++- packages/instant/src/redux/reducer.ts | 23 ++++++++++++++++ packages/instant/src/types.ts | 12 +++++++++ 10 files changed, 109 insertions(+), 8 deletions(-) create mode 100644 packages/instant/src/components/standard_sliding_panel.tsx create mode 100644 packages/instant/src/containers/current_standard_sliding_panel.ts (limited to 'packages') diff --git a/packages/instant/src/components/animations/slide_animation.tsx b/packages/instant/src/components/animations/slide_animation.tsx index 9adb1c674..5992bcba7 100644 --- a/packages/instant/src/components/animations/slide_animation.tsx +++ b/packages/instant/src/components/animations/slide_animation.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { OptionallyScreenSpecific } from '../../style/media'; +import { SlideAnimationState } from '../../types'; import { PositionAnimation, PositionAnimationSettings } from './position_animation'; -export type SlideAnimationState = 'slidIn' | 'slidOut' | 'none'; export interface SlideAnimationProps { animationState: SlideAnimationState; slideInSettings: OptionallyScreenSpecific; diff --git a/packages/instant/src/components/sliding_error.tsx b/packages/instant/src/components/sliding_error.tsx index a8d4e391c..b59e2a905 100644 --- a/packages/instant/src/components/sliding_error.tsx +++ b/packages/instant/src/components/sliding_error.tsx @@ -3,9 +3,10 @@ import * as React from 'react'; import { ScreenSpecification } from '../style/media'; import { ColorOption } from '../style/theme'; import { zIndex } from '../style/z_index'; +import { SlideAnimationState } from '../types'; import { PositionAnimationSettings } from './animations/position_animation'; -import { SlideAnimation, SlideAnimationState } from './animations/slide_animation'; +import { SlideAnimation } from './animations/slide_animation'; import { Container } from './ui/container'; import { Flex } from './ui/flex'; diff --git a/packages/instant/src/components/sliding_panel.tsx b/packages/instant/src/components/sliding_panel.tsx index bb1049a31..44bc8edb3 100644 --- a/packages/instant/src/components/sliding_panel.tsx +++ b/packages/instant/src/components/sliding_panel.tsx @@ -2,14 +2,14 @@ import * as React from 'react'; import { ColorOption } from '../style/theme'; import { zIndex } from '../style/z_index'; +import { SlideAnimationState } from '../types'; import { PositionAnimationSettings } from './animations/position_animation'; -import { SlideAnimation, SlideAnimationState } from './animations/slide_animation'; +import { SlideAnimation } from './animations/slide_animation'; import { Container } from './ui/container'; import { Flex } from './ui/flex'; import { Icon } from './ui/icon'; -import { Text } from './ui/text'; export interface PanelProps { onClose?: () => void; diff --git a/packages/instant/src/components/standard_sliding_panel.tsx b/packages/instant/src/components/standard_sliding_panel.tsx new file mode 100644 index 000000000..6d31f3e3a --- /dev/null +++ b/packages/instant/src/components/standard_sliding_panel.tsx @@ -0,0 +1,28 @@ +import * as React from 'react'; + +import { SlideAnimationState, StandardSlidingPanelContent, StandardSlidingPanelSettings } from '../types'; + +import { SlidingPanel } from './sliding_panel'; + +export interface StandardSlidingPanelProps extends StandardSlidingPanelSettings { + onClose: () => void; +} + +export class StandardSlidingPanel extends React.Component { + public render(): React.ReactNode { + const { animationState, content, onClose } = this.props; + return ( + + {this._getNodeForContent(content)} + + ); + } + private readonly _getNodeForContent = (content: StandardSlidingPanelContent): React.ReactNode => { + switch (content) { + case StandardSlidingPanelContent.InstallMetaMask: + return 'Install MetaMask'; + default: + return null; + } + }; +} diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 47fd75d25..b5f974cbe 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import { AvailableERC20TokenSelector } from '../containers/available_erc20_token_selector'; +import { CurrentStandardSlidingPanel } from '../containers/current_standard_sliding_panel'; import { LatestBuyQuoteOrderDetails } from '../containers/latest_buy_quote_order_details'; import { LatestError } from '../containers/latest_error'; import { SelectedAssetBuyOrderProgress } from '../containers/selected_asset_buy_order_progress'; @@ -8,8 +9,8 @@ import { SelectedAssetBuyOrderStateButtons } from '../containers/selected_asset_ import { SelectedAssetInstantHeading } from '../containers/selected_asset_instant_heading'; import { ColorOption } from '../style/theme'; import { zIndex } from '../style/z_index'; +import { SlideAnimationState } from '../types'; -import { SlideAnimationState } from './animations/slide_animation'; import { CSSReset } from './css_reset'; import { SlidingPanel } from './sliding_panel'; import { Container } from './ui/container'; @@ -59,6 +60,7 @@ export class ZeroExInstantContainer extends React.Component + diff --git a/packages/instant/src/containers/current_standard_sliding_panel.ts b/packages/instant/src/containers/current_standard_sliding_panel.ts new file mode 100644 index 000000000..82ac7fa1b --- /dev/null +++ b/packages/instant/src/containers/current_standard_sliding_panel.ts @@ -0,0 +1,31 @@ +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; + +import { StandardSlidingPanel } from '../components/standard_sliding_panel'; +import { Action, actions } from '../redux/actions'; +import { State } from '../redux/reducer'; +import { StandardSlidingPanelSettings } from '../types'; + +export interface CurrentStandardSlidingPanelProps {} + +interface ConnectedState extends StandardSlidingPanelSettings {} + +interface ConnectedDispatch { + onClose: () => void; +} + +const mapStateToProps = (state: State, _ownProps: CurrentStandardSlidingPanelProps): ConnectedState => + state.standardSlidingPanelSettings; + +const mapDispatchToProps = ( + dispatch: Dispatch, + ownProps: CurrentStandardSlidingPanelProps, +): ConnectedDispatch => ({ + onClose: () => dispatch(actions.closeStandardSlidingPanel()), +}); + +export const CurrentStandardSlidingPanel: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(StandardSlidingPanel); diff --git a/packages/instant/src/containers/latest_error.tsx b/packages/instant/src/containers/latest_error.tsx index 99e55a6c4..347705697 100644 --- a/packages/instant/src/containers/latest_error.tsx +++ b/packages/instant/src/containers/latest_error.tsx @@ -2,10 +2,9 @@ import * as React from 'react'; import { connect } from 'react-redux'; -import { SlideAnimationState } from '../components/animations/slide_animation'; import { SlidingError } from '../components/sliding_error'; import { State } from '../redux/reducer'; -import { Asset, DisplayStatus } from '../types'; +import { Asset, DisplayStatus, SlideAnimationState } from '../types'; export interface LatestErrorComponentProps { asset?: Asset; diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts index fc89e3d0e..a899da23c 100644 --- a/packages/instant/src/redux/actions.ts +++ b/packages/instant/src/redux/actions.ts @@ -2,7 +2,7 @@ import { BuyQuote } from '@0x/asset-buyer'; import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; -import { ActionsUnion, AddressAndEthBalanceInWei, Asset } from '../types'; +import { ActionsUnion, AddressAndEthBalanceInWei, Asset, StandardSlidingPanelContent } from '../types'; export interface PlainAction { type: T; @@ -42,6 +42,8 @@ export enum ActionTypes { HIDE_ERROR = 'HIDE_ERROR', CLEAR_ERROR = 'CLEAR_ERROR', RESET_AMOUNT = 'RESET_AMOUNT', + OPEN_STANDARD_SLIDING_PANEL = 'OPEN_STANDARD_SLIDING_PANEL', + CLOSE_STANDARD_SLIDING_PANEL = 'CLOSE_STANDARD_SLIDING_PANEL', } export const actions = { @@ -68,4 +70,7 @@ export const actions = { hideError: () => createAction(ActionTypes.HIDE_ERROR), clearError: () => createAction(ActionTypes.CLEAR_ERROR), resetAmount: () => createAction(ActionTypes.RESET_AMOUNT), + openStandardSlidingPanel: (content: StandardSlidingPanelContent) => + createAction(ActionTypes.OPEN_STANDARD_SLIDING_PANEL, content), + closeStandardSlidingPanel: () => createAction(ActionTypes.CLOSE_STANDARD_SLIDING_PANEL), }; diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index a5a1b6f7d..a542979cb 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -19,6 +19,8 @@ import { OrderProcessState, OrderState, ProviderState, + StandardSlidingPanelContent, + StandardSlidingPanelSettings, } from '../types'; import { Action, ActionTypes } from './actions'; @@ -30,6 +32,7 @@ export interface DefaultState { buyOrderState: OrderState; latestErrorDisplayStatus: DisplayStatus; quoteRequestState: AsyncProcessState; + standardSlidingPanelSettings: StandardSlidingPanelSettings; } // State that is required but needs to be derived from the props @@ -56,6 +59,10 @@ export const DEFAULT_STATE: DefaultState = { buyOrderState: { processState: OrderProcessState.None }, latestErrorDisplayStatus: DisplayStatus.Hidden, quoteRequestState: AsyncProcessState.None, + standardSlidingPanelSettings: { + animationState: 'none', + content: StandardSlidingPanelContent.None, + }, }; export const createReducer = (initialState: State) => { @@ -213,6 +220,22 @@ export const createReducer = (initialState: State) => { ...state, availableAssets: action.data, }; + case ActionTypes.OPEN_STANDARD_SLIDING_PANEL: + return { + ...state, + standardSlidingPanelSettings: { + content: action.data, + animationState: 'slidIn', + }, + }; + case ActionTypes.CLOSE_STANDARD_SLIDING_PANEL: + return { + ...state, + standardSlidingPanelSettings: { + content: state.standardSlidingPanelSettings.content, + animationState: 'slidOut', + }, + }; default: return state; } diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index 20ad2ed95..6438aba01 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -125,3 +125,15 @@ export interface AddressAndEthBalanceInWei { address: string; ethBalanceInWei: BigNumber; } + +export type SlideAnimationState = 'slidIn' | 'slidOut' | 'none'; + +export enum StandardSlidingPanelContent { + None = 'NONE', + InstallMetaMask = 'INSTALL_META_MASK', +} + +export interface StandardSlidingPanelSettings { + animationState: SlideAnimationState; + content: StandardSlidingPanelContent; +} -- cgit v1.2.3 From fa7bd072d064d1c79c8e84bc42463491ebbad33f Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 13:19:59 -0800 Subject: feat: refactor progress bar code to expose static progress bar --- .../instant/src/components/buy_order_progress.tsx | 23 ++++++++--- .../instant/src/components/timed_progress_bar.tsx | 46 ++++++++++++++++------ .../instant/src/components/zero_ex_instant.tsx | 4 +- .../src/components/zero_ex_instant_container.tsx | 22 +++++++++-- .../src/components/zero_ex_instant_overlay.tsx | 4 +- 5 files changed, 73 insertions(+), 26 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/buy_order_progress.tsx b/packages/instant/src/components/buy_order_progress.tsx index bc7319423..9c73d58af 100644 --- a/packages/instant/src/components/buy_order_progress.tsx +++ b/packages/instant/src/components/buy_order_progress.tsx @@ -1,6 +1,7 @@ +import * as _ from 'lodash'; import * as React from 'react'; -import { TimedProgressBar } from '../components/timed_progress_bar'; +import { ProgressBar, TimedProgressBar } from '../components/timed_progress_bar'; import { TimeCounter } from '../components/time_counter'; import { Container } from '../components/ui/container'; @@ -12,7 +13,7 @@ export interface BuyOrderProgressProps { export const BuyOrderProgress: React.StatelessComponent = props => { const { buyOrderState } = props; - + let content: React.ReactNode = null; if ( buyOrderState.processState === OrderProcessState.Processing || buyOrderState.processState === OrderProcessState.Success || @@ -21,15 +22,25 @@ export const BuyOrderProgress: React.StatelessComponent = const progress = buyOrderState.progress; const hasEnded = buyOrderState.processState !== OrderProcessState.Processing; const expectedTimeMs = progress.expectedEndTimeUnix - progress.startTimeUnix; - return ( - + content = ( + + + ); + } else { + // Just show a static progress bar if we aren't processing or in an end state + content = ( + + ); } - - return null; + return ( + + {content} + + ); }; diff --git a/packages/instant/src/components/timed_progress_bar.tsx b/packages/instant/src/components/timed_progress_bar.tsx index 59aaa33a1..8465b9cd0 100644 --- a/packages/instant/src/components/timed_progress_bar.tsx +++ b/packages/instant/src/components/timed_progress_bar.tsx @@ -2,7 +2,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { PROGRESS_FINISH_ANIMATION_TIME_MS, PROGRESS_STALL_AT_WIDTH } from '../constants'; -import { ColorOption, keyframes, styled } from '../style/theme'; +import { ColorOption, css, keyframes, styled } from '../style/theme'; import { Container } from './ui/container'; @@ -20,15 +20,11 @@ export class TimedProgressBar extends React.Component private readonly _barRef = React.createRef(); public render(): React.ReactNode { - const timedProgressProps = this._calculateTimedProgressProps(); - return ( - - - - ); + const widthAnimationSettings = this._calculateWidthAnimationSettings(); + return ; } - private _calculateTimedProgressProps(): TimedProgressProps { + private _calculateWidthAnimationSettings(): WidthAnimationSettings { if (this.props.hasEnded) { if (!this._barRef.current) { throw new Error('ended but no reference'); @@ -60,21 +56,45 @@ const expandingWidthKeyframes = (fromWidth: string, toWidth: string) => { `; }; -interface TimedProgressProps { +export interface WidthAnimationSettings { timeMs: number; fromWidth: string; toWidth: string; } -export const TimedProgress = +interface ProgressProps { + width?: string; + animationSettings?: WidthAnimationSettings; +} + +export const Progress = styled.div < - TimedProgressProps > + ProgressProps > ` && { background-color: ${props => props.theme[ColorOption.primaryColor]}; border-radius: 6px; height: 6px; - animation: ${props => expandingWidthKeyframes(props.fromWidth, props.toWidth)} - ${props => props.timeMs}ms linear 1 forwards; + ${props => (props.width ? `width: ${props.width};` : '')} + ${props => + props.animationSettings + ? css` + animation: ${expandingWidthKeyframes( + props.animationSettings.fromWidth, + props.animationSettings.toWidth, + )} + ${props.animationSettings.timeMs}ms linear 1 forwards; + ` + : ''} } `; + +export interface ProgressBarProps extends ProgressProps {} + +export const ProgressBar: React.ComponentType> = React.forwardRef( + (props, ref) => ( + + + + ), +); diff --git a/packages/instant/src/components/zero_ex_instant.tsx b/packages/instant/src/components/zero_ex_instant.tsx index b945f9908..f6ee28dba 100644 --- a/packages/instant/src/components/zero_ex_instant.tsx +++ b/packages/instant/src/components/zero_ex_instant.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { INJECTED_DIV_CLASS } from '../constants'; +import { ConnectedZeroExInstantContainer } from '../containers/connected_zero_ex_instant_container'; -import { ZeroExInstantContainer } from './zero_ex_instant_container'; import { ZeroExInstantProvider, ZeroExInstantProviderProps } from './zero_ex_instant_provider'; export type ZeroExInstantProps = ZeroExInstantProviderProps; @@ -11,7 +11,7 @@ export const ZeroExInstant: React.StatelessComponent = props return (
- +
); diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index b5f974cbe..f96174b63 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -9,14 +9,16 @@ import { SelectedAssetBuyOrderStateButtons } from '../containers/selected_asset_ import { SelectedAssetInstantHeading } from '../containers/selected_asset_instant_heading'; import { ColorOption } from '../style/theme'; import { zIndex } from '../style/z_index'; -import { SlideAnimationState } from '../types'; +import { OrderProcessState, SlideAnimationState } from '../types'; import { CSSReset } from './css_reset'; import { SlidingPanel } from './sliding_panel'; import { Container } from './ui/container'; import { Flex } from './ui/flex'; -export interface ZeroExInstantContainerProps {} +export interface ZeroExInstantContainerProps { + orderProcessState: OrderProcessState; +} export interface ZeroExInstantContainerState { tokenSelectionPanelAnimationState: SlideAnimationState; } @@ -48,7 +50,7 @@ export class ZeroExInstantContainer extends React.Component - + {this._renderPaymentMethodOrBuyOrderProgress()} @@ -76,4 +78,18 @@ export class ZeroExInstantContainer extends React.Component { + const { orderProcessState } = this.props; + if ( + orderProcessState === OrderProcessState.Processing || + orderProcessState === OrderProcessState.Success || + orderProcessState === OrderProcessState.Failure + ) { + return ; + } + if (orderProcessState === OrderProcessState.None) { + return ; + } + return null; + }; } diff --git a/packages/instant/src/components/zero_ex_instant_overlay.tsx b/packages/instant/src/components/zero_ex_instant_overlay.tsx index 10438ab7a..a7e1bd65a 100644 --- a/packages/instant/src/components/zero_ex_instant_overlay.tsx +++ b/packages/instant/src/components/zero_ex_instant_overlay.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; +import { ConnectedZeroExInstantContainer } from '../containers/connected_zero_ex_instant_container'; import { ColorOption } from '../style/theme'; import { Container } from './ui/container'; import { Flex } from './ui/flex'; import { Icon } from './ui/icon'; import { Overlay } from './ui/overlay'; -import { ZeroExInstantContainer } from './zero_ex_instant_container'; import { ZeroExInstantProvider, ZeroExInstantProviderProps } from './zero_ex_instant_provider'; export interface ZeroExInstantOverlayProps extends ZeroExInstantProviderProps { @@ -31,7 +31,7 @@ export const ZeroExInstantOverlay: React.StatelessComponent - + -- cgit v1.2.3 From 3fd667b3bee4652ec8a1a362790ceaf3fe8cf7d9 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 13:23:01 -0800 Subject: feat: make zero ex instant container switch between progress and payment --- .../connected_zero_ex_instant_container.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/instant/src/containers/connected_zero_ex_instant_container.ts (limited to 'packages') diff --git a/packages/instant/src/containers/connected_zero_ex_instant_container.ts b/packages/instant/src/containers/connected_zero_ex_instant_container.ts new file mode 100644 index 000000000..9606d18c2 --- /dev/null +++ b/packages/instant/src/containers/connected_zero_ex_instant_container.ts @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { connect } from 'react-redux'; + +import { State } from '../redux/reducer'; +import { OrderProcessState } from '../types'; + +import { ZeroExInstantContainer } from '../components/zero_ex_instant_container'; + +export interface ConnectedZeroExInstantContainerProps {} + +interface ConnectedState { + orderProcessState: OrderProcessState; +} + +const mapStateToProps = (state: State, _ownProps: ConnectedZeroExInstantContainerProps): ConnectedState => ({ + orderProcessState: state.buyOrderState.processState, +}); + +export const ConnectedZeroExInstantContainer: React.ComponentClass = connect( + mapStateToProps, +)(ZeroExInstantContainer); -- cgit v1.2.3 From 3aa831ad7752cf24ae67b1a96a6e839cc40ec820 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 13:29:28 -0800 Subject: feat: add account payment method container --- packages/instant/src/components/payment_method.tsx | 64 ++++++++++++---------- .../src/components/zero_ex_instant_container.tsx | 3 +- .../containers/connected_account_payment_method.ts | 21 +++++++ 3 files changed, 57 insertions(+), 31 deletions(-) create mode 100644 packages/instant/src/containers/connected_account_payment_method.ts (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 8c0b47d72..a9bbef518 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { ColorOption } from '../style/theme'; -import { Network } from '../types'; +import { Account, Network } from '../types'; import { PaymentMethodDropdown } from './payment_method_dropdown'; import { Circle } from './ui/circle'; @@ -11,35 +11,39 @@ import { Container } from './ui/container'; import { Flex } from './ui/flex'; import { Text } from './ui/text'; -export interface PaymentMethodProps {} +export interface PaymentMethodProps { + account: Account; +} -export const PaymentMethod: React.StatelessComponent = () => ( - - - - - Payment Method - - - - - - MetaMask - - +export const PaymentMethod: React.StatelessComponent = ({ account }) => { + return ( + + + + + Payment Method + + + + + + MetaMask + + + - + + - -
-); + ); +}; diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index f96174b63..6412c9c66 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import { AvailableERC20TokenSelector } from '../containers/available_erc20_token_selector'; +import { ConnectedAccountPaymentMethod } from '../containers/connected_account_payment_method'; import { CurrentStandardSlidingPanel } from '../containers/current_standard_sliding_panel'; import { LatestBuyQuoteOrderDetails } from '../containers/latest_buy_quote_order_details'; import { LatestError } from '../containers/latest_error'; @@ -88,7 +89,7 @@ export class ZeroExInstantContainer extends React.Component; } if (orderProcessState === OrderProcessState.None) { - return ; + return ; } return null; }; diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts new file mode 100644 index 000000000..ea9531a3e --- /dev/null +++ b/packages/instant/src/containers/connected_account_payment_method.ts @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { connect } from 'react-redux'; + +import { State } from '../redux/reducer'; +import { Account } from '../types'; + +import { PaymentMethod } from '../components/payment_method'; + +export interface ConnectedAccountPaymentMethodProps {} + +interface ConnectedState { + account: Account; +} + +const mapStateToProps = (state: State, _ownProps: ConnectedAccountPaymentMethodProps): ConnectedState => ({ + account: state.providerState.account, +}); + +export const ConnectedAccountPaymentMethod: React.ComponentClass = connect( + mapStateToProps, +)(PaymentMethod); -- cgit v1.2.3 From 3f1f19e344c1f79accf38572dd0f7c29308954e7 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 13:41:32 -0800 Subject: feat: connect payment method to state and display different content based on account state --- packages/instant/src/components/payment_method.tsx | 106 +++++++++++++++------ .../containers/connected_account_payment_method.ts | 4 +- 2 files changed, 78 insertions(+), 32 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index a9bbef518..f50c9bf3c 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { ColorOption } from '../style/theme'; -import { Account, Network } from '../types'; +import { Account, AccountState, Network } from '../types'; import { PaymentMethodDropdown } from './payment_method_dropdown'; import { Circle } from './ui/circle'; @@ -13,37 +13,81 @@ import { Text } from './ui/text'; export interface PaymentMethodProps { account: Account; + network: Network; } -export const PaymentMethod: React.StatelessComponent = ({ account }) => { - return ( - - - - - Payment Method - - - - - - MetaMask - - +export class PaymentMethod extends React.Component { + public render(): React.ReactNode { + return ( + + + + + {this._renderTitleText()} + + {this._renderTitleLabel()} - + + {this._renderMainContent()} - -
- ); -}; + ); + } + private readonly _renderTitleText = (): string => { + const { account } = this.props; + switch (account.state) { + case AccountState.Loading: + return 'loading...'; + case AccountState.Error: + case AccountState.Locked: + case AccountState.None: + return 'connect your wallet'; + case AccountState.Ready: + return 'payment method'; + default: + return 'payment method'; + } + }; + private readonly _renderTitleLabel = (): React.ReactNode => { + const { account } = this.props; + if (account.state === AccountState.Ready) { + return ( + + + + + MetaMask + + + + ); + } + return null; + }; + private readonly _renderMainContent = (): React.ReactNode => { + const { account, network } = this.props; + switch (account.state) { + case AccountState.Loading: + return 'loading...'; + case AccountState.Error: + case AccountState.Locked: + case AccountState.None: + return 'connect your wallet'; + case AccountState.Ready: + return ( + + ); + default: + return 'payment method'; + } + }; +} diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts index ea9531a3e..a1ebe7125 100644 --- a/packages/instant/src/containers/connected_account_payment_method.ts +++ b/packages/instant/src/containers/connected_account_payment_method.ts @@ -2,7 +2,7 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { State } from '../redux/reducer'; -import { Account } from '../types'; +import { Account, Network } from '../types'; import { PaymentMethod } from '../components/payment_method'; @@ -10,10 +10,12 @@ export interface ConnectedAccountPaymentMethodProps {} interface ConnectedState { account: Account; + network: Network; } const mapStateToProps = (state: State, _ownProps: ConnectedAccountPaymentMethodProps): ConnectedState => ({ account: state.providerState.account, + network: state.network, }); export const ConnectedAccountPaymentMethod: React.ComponentClass = connect( -- cgit v1.2.3 From 3a51bd1e69d8eb279fee138df2bc69ddb1ba5f82 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 13:56:04 -0800 Subject: feat: create connect metamask --- packages/instant/src/components/payment_method.tsx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index f50c9bf3c..dcf68da53 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -5,6 +5,7 @@ import * as React from 'react'; import { ColorOption } from '../style/theme'; import { Account, AccountState, Network } from '../types'; +import { MetaMaskLogo } from './meta_mask_logo'; import { PaymentMethodDropdown } from './payment_method_dropdown'; import { Circle } from './ui/circle'; import { Container } from './ui/container'; @@ -20,7 +21,7 @@ export class PaymentMethod extends React.Component { public render(): React.ReactNode { return ( - + { case AccountState.Error: case AccountState.Locked: case AccountState.None: - return 'connect your wallet'; + return ( + + + + + + + Connect MetaMask + + + + ); case AccountState.Ready: return ( Date: Fri, 9 Nov 2018 14:20:14 -0800 Subject: feat: open metamask sliding panel if locked on click --- packages/instant/src/components/payment_method.tsx | 53 ++++++++++++++-------- .../containers/connected_account_payment_method.ts | 20 ++++++-- 2 files changed, 50 insertions(+), 23 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index dcf68da53..1d8661921 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { ColorOption } from '../style/theme'; -import { Account, AccountState, Network } from '../types'; +import { Account, AccountState, Network, StandardSlidingPanelContent } from '../types'; import { MetaMaskLogo } from './meta_mask_logo'; import { PaymentMethodDropdown } from './payment_method_dropdown'; @@ -15,6 +15,7 @@ import { Text } from './ui/text'; export interface PaymentMethodProps { account: Account; network: Network; + openStandardSlidingPanel: (content: StandardSlidingPanelContent) => void; } export class PaymentMethod extends React.Component { @@ -75,27 +76,10 @@ export class PaymentMethod extends React.Component { switch (account.state) { case AccountState.Loading: return 'loading...'; - case AccountState.Error: case AccountState.Locked: + return Unlock MetaMask; case AccountState.None: - return ( - - - - - - - Connect MetaMask - - - - ); + return Install MetaMask; case AccountState.Ready: return ( { return 'payment method'; } }; + private readonly _openInstallWalletPanel = () => { + this.props.openStandardSlidingPanel(StandardSlidingPanelContent.InstallMetaMask); + }; } + +interface WalletPromptProps { + onClick?: () => void; +} + +const WalletPrompt: React.StatelessComponent = ({ onClick, children }) => ( + + + + + + + {children} + + + +); diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts index a1ebe7125..ee57d1829 100644 --- a/packages/instant/src/containers/connected_account_payment_method.ts +++ b/packages/instant/src/containers/connected_account_payment_method.ts @@ -1,10 +1,11 @@ import * as React from 'react'; import { connect } from 'react-redux'; - -import { State } from '../redux/reducer'; -import { Account, Network } from '../types'; +import { Dispatch } from 'redux'; import { PaymentMethod } from '../components/payment_method'; +import { Action, actions } from '../redux/actions'; +import { State } from '../redux/reducer'; +import { Account, Network, StandardSlidingPanelContent } from '../types'; export interface ConnectedAccountPaymentMethodProps {} @@ -13,11 +14,24 @@ interface ConnectedState { network: Network; } +interface ConnectedDispatch { + openStandardSlidingPanel: (content: StandardSlidingPanelContent) => void; +} + const mapStateToProps = (state: State, _ownProps: ConnectedAccountPaymentMethodProps): ConnectedState => ({ account: state.providerState.account, network: state.network, }); +const mapDispatchToProps = ( + dispatch: Dispatch, + ownProps: ConnectedAccountPaymentMethodProps, +): ConnectedDispatch => ({ + openStandardSlidingPanel: (content: StandardSlidingPanelContent) => + dispatch(actions.openStandardSlidingPanel(content)), +}); + export const ConnectedAccountPaymentMethod: React.ComponentClass = connect( mapStateToProps, + mapDispatchToProps, )(PaymentMethod); -- cgit v1.2.3 From 128abb39dd635599841643ca65bfc286aabaa063 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 14:21:41 -0800 Subject: feat: add padding to close icon to increase tap area --- packages/instant/src/components/sliding_panel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/src/components/sliding_panel.tsx b/packages/instant/src/components/sliding_panel.tsx index 44bc8edb3..7f9037049 100644 --- a/packages/instant/src/components/sliding_panel.tsx +++ b/packages/instant/src/components/sliding_panel.tsx @@ -18,7 +18,7 @@ export interface PanelProps { export const Panel: React.StatelessComponent = ({ children, onClose }) => ( - + {children} -- cgit v1.2.3 From b5988277087f0ee39109972d73ca94368d6dd4b9 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 14:57:29 -0800 Subject: feat: implement basic StandardModalContent with accompanying InstallWalletPanelContent --- .../components/install_wallet_panel_content.tsx | 22 ++++++++ packages/instant/src/components/payment_method.tsx | 2 +- .../src/components/standard_panel_content.tsx | 61 ++++++++++++++++++++++ .../src/components/standard_sliding_panel.tsx | 5 +- packages/instant/src/components/ui/button.tsx | 1 - packages/instant/src/types.ts | 2 +- 6 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 packages/instant/src/components/install_wallet_panel_content.tsx create mode 100644 packages/instant/src/components/standard_panel_content.tsx (limited to 'packages') diff --git a/packages/instant/src/components/install_wallet_panel_content.tsx b/packages/instant/src/components/install_wallet_panel_content.tsx new file mode 100644 index 000000000..41b8ec74b --- /dev/null +++ b/packages/instant/src/components/install_wallet_panel_content.tsx @@ -0,0 +1,22 @@ +import * as React from 'react'; + +import { ColorOption } from '../style/theme'; + +import { MetaMaskLogo } from './meta_mask_logo'; +import { StandardPanelContent } from './standard_panel_content'; +import { Button } from './ui/button'; + +export interface InstallWalletPanelContentProps {} + +export const InstallWalletPanelContent: React.StatelessComponent = () => ( + } + title="Install MetaMask" + description="Please install the MetaMask wallet extension from the Chrome Store." + action={ + + } + /> +); diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 1d8661921..9bd1f8104 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -93,7 +93,7 @@ export class PaymentMethod extends React.Component { } }; private readonly _openInstallWalletPanel = () => { - this.props.openStandardSlidingPanel(StandardSlidingPanelContent.InstallMetaMask); + this.props.openStandardSlidingPanel(StandardSlidingPanelContent.InstallWallet); }; } diff --git a/packages/instant/src/components/standard_panel_content.tsx b/packages/instant/src/components/standard_panel_content.tsx new file mode 100644 index 000000000..da851b232 --- /dev/null +++ b/packages/instant/src/components/standard_panel_content.tsx @@ -0,0 +1,61 @@ +import * as React from 'react'; + +import { ColorOption } from '../style/theme'; + +import { Container } from './ui/container'; +import { Flex } from './ui/flex'; +import { Text } from './ui/text'; + +export interface MoreInfoSettings { + text: string; + href: string; +} + +export interface StandardPanelContentProps { + image: React.ReactNode; + title: string; + description: string; + moreInfoSettings?: MoreInfoSettings; + action: React.ReactNode; +} + +const spacingBetweenPx = '20px'; + +export const StandardPanelContent: React.StatelessComponent = ({ + image, + title, + description, + moreInfoSettings, + action, +}) => ( + + + {image} + + + {title} + + + + + {description} + + + + {moreInfoSettings && ( + + + {moreInfoSettings.text}> + + + )} + + + {action} + +); diff --git a/packages/instant/src/components/standard_sliding_panel.tsx b/packages/instant/src/components/standard_sliding_panel.tsx index 6d31f3e3a..9409d9664 100644 --- a/packages/instant/src/components/standard_sliding_panel.tsx +++ b/packages/instant/src/components/standard_sliding_panel.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import { SlideAnimationState, StandardSlidingPanelContent, StandardSlidingPanelSettings } from '../types'; +import { InstallWalletPanelContent } from './install_wallet_panel_content'; import { SlidingPanel } from './sliding_panel'; export interface StandardSlidingPanelProps extends StandardSlidingPanelSettings { @@ -19,8 +20,8 @@ export class StandardSlidingPanel extends React.Component { switch (content) { - case StandardSlidingPanelContent.InstallMetaMask: - return 'Install MetaMask'; + case StandardSlidingPanelContent.InstallWallet: + return ; default: return null; } diff --git a/packages/instant/src/components/ui/button.tsx b/packages/instant/src/components/ui/button.tsx index b90221bf4..d0b1bb508 100644 --- a/packages/instant/src/components/ui/button.tsx +++ b/packages/instant/src/components/ui/button.tsx @@ -64,7 +64,6 @@ export const Button = styled(PlainButton)` Button.defaultProps = { backgroundColor: ColorOption.primaryColor, - borderColor: ColorOption.primaryColor, width: 'auto', isDisabled: false, padding: '.6em 1.2em', diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index 6438aba01..c45286640 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -130,7 +130,7 @@ export type SlideAnimationState = 'slidIn' | 'slidOut' | 'none'; export enum StandardSlidingPanelContent { None = 'NONE', - InstallMetaMask = 'INSTALL_META_MASK', + InstallWallet = 'INSTALL_WALLET', } export interface StandardSlidingPanelSettings { -- cgit v1.2.3 From 7249cc7b495f370f7ec5672ca36456dd4b6779de Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 15:08:01 -0800 Subject: feat: allow href prop on button --- .../components/install_wallet_panel_content.tsx | 9 ++++++- packages/instant/src/components/payment_method.tsx | 1 - packages/instant/src/components/ui/button.tsx | 29 +++++++++++++++++----- packages/instant/src/constants.ts | 2 ++ 4 files changed, 33 insertions(+), 8 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/install_wallet_panel_content.tsx b/packages/instant/src/components/install_wallet_panel_content.tsx index 41b8ec74b..07e56ed70 100644 --- a/packages/instant/src/components/install_wallet_panel_content.tsx +++ b/packages/instant/src/components/install_wallet_panel_content.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; +import { METAMASK_CHROME_STORE_URL } from '../constants'; import { ColorOption } from '../style/theme'; import { MetaMaskLogo } from './meta_mask_logo'; @@ -14,7 +15,13 @@ export const InstallWalletPanelContent: React.StatelessComponent + } diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 9bd1f8104..ca646880d 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -1,4 +1,3 @@ -import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/instant/src/components/ui/button.tsx b/packages/instant/src/components/ui/button.tsx index d0b1bb508..479ef6c77 100644 --- a/packages/instant/src/components/ui/button.tsx +++ b/packages/instant/src/components/ui/button.tsx @@ -3,6 +3,8 @@ import * as React from 'react'; import { ColorOption, styled } from '../../style/theme'; +export type ButtonOnClickHandler = (event: React.MouseEvent) => void; + export interface ButtonProps { backgroundColor?: ColorOption; borderColor?: ColorOption; @@ -12,15 +14,30 @@ export interface ButtonProps { padding?: string; type?: string; isDisabled?: boolean; - onClick?: (event: React.MouseEvent) => void; + href?: string; + onClick?: ButtonOnClickHandler; className?: string; } -const PlainButton: React.StatelessComponent = ({ children, isDisabled, onClick, type, className }) => ( - -); +const createHrefOnClick = (href: string) => () => { + window.open(href, '_blank'); +}; + +const PlainButton: React.StatelessComponent = ({ + children, + isDisabled, + onClick, + href, + type, + className, +}) => { + const computedOnClick = isDisabled ? undefined : href ? createHrefOnClick(href) : onClick; + return ( + + ); +}; const darkenOnHoverAmount = 0.1; const darkenOnActiveAmount = 0.2; diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index b5c4f96e4..7888e0ccb 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -17,6 +17,8 @@ export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info'; export const COINBASE_API_BASE_URL = 'https://api.coinbase.com/v2'; export const PROGRESS_STALL_AT_WIDTH = '95%'; export const PROGRESS_FINISH_ANIMATION_TIME_MS = 200; +export const METAMASK_CHROME_STORE_URL = + 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en'; export const ETHEREUM_NODE_URL_BY_NETWORK = { [Network.Mainnet]: 'https://mainnet.infura.io/', [Network.Kovan]: 'https://kovan.infura.io/', -- cgit v1.2.3 From 7460f2796a2a549eaed15051009e35229fb1280f Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 15:11:47 -0800 Subject: feat: add more info section to the metamask panel --- packages/instant/src/components/install_wallet_panel_content.tsx | 8 ++++++-- packages/instant/src/components/standard_panel_content.tsx | 4 ++-- packages/instant/src/constants.ts | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/install_wallet_panel_content.tsx b/packages/instant/src/components/install_wallet_panel_content.tsx index 07e56ed70..7000e27f6 100644 --- a/packages/instant/src/components/install_wallet_panel_content.tsx +++ b/packages/instant/src/components/install_wallet_panel_content.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { METAMASK_CHROME_STORE_URL } from '../constants'; +import { META_MASK_CHROME_STORE_URL, META_MASK_SITE_URL } from '../constants'; import { ColorOption } from '../style/theme'; import { MetaMaskLogo } from './meta_mask_logo'; @@ -14,9 +14,13 @@ export const InstallWalletPanelContent: React.StatelessComponent} title="Install MetaMask" description="Please install the MetaMask wallet extension from the Chrome Store." + moreInfoSettings={{ + href: META_MASK_SITE_URL, + text: 'What is MetaMask?', + }} action={ diff --git a/packages/instant/src/components/standard_panel_content.tsx b/packages/instant/src/components/standard_panel_content.tsx index fca5383ea..95a79bd55 100644 --- a/packages/instant/src/components/standard_panel_content.tsx +++ b/packages/instant/src/components/standard_panel_content.tsx @@ -29,7 +29,7 @@ export const StandardPanelContent: React.StatelessComponent ( - + {image} @@ -43,16 +43,15 @@ export const StandardPanelContent: React.StatelessComponent {moreInfoSettings && ( - - - {moreInfoSettings.text} - - + + {moreInfoSettings.text} + )} diff --git a/packages/instant/src/components/ui/button.tsx b/packages/instant/src/components/ui/button.tsx index 479ef6c77..fbc5bcad4 100644 --- a/packages/instant/src/components/ui/button.tsx +++ b/packages/instant/src/components/ui/button.tsx @@ -2,6 +2,7 @@ import { darken, saturate } from 'polished'; import * as React from 'react'; import { ColorOption, styled } from '../../style/theme'; +import { util } from '../../util/util'; export type ButtonOnClickHandler = (event: React.MouseEvent) => void; @@ -19,10 +20,6 @@ export interface ButtonProps { className?: string; } -const createHrefOnClick = (href: string) => () => { - window.open(href, '_blank'); -}; - const PlainButton: React.StatelessComponent = ({ children, isDisabled, @@ -31,7 +28,7 @@ const PlainButton: React.StatelessComponent = ({ type, className, }) => { - const computedOnClick = isDisabled ? undefined : href ? createHrefOnClick(href) : onClick; + const computedOnClick = isDisabled ? undefined : href ? util.createHrefOnClick(href) : onClick; return ( -- cgit v1.2.3 From a8a1ea92a614181ebdf6c738139723f0d5c6da69 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 9 Nov 2018 16:30:38 -0800 Subject: fix: no longer refer to error account state --- packages/instant/src/components/payment_method.tsx | 1 - 1 file changed, 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 27f6383a4..f596c5ad6 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -45,7 +45,6 @@ export class PaymentMethod extends React.Component { switch (account.state) { case AccountState.Loading: return 'loading...'; - case AccountState.Error: case AccountState.Locked: case AccountState.None: return 'connect your wallet'; -- cgit v1.2.3 From 7626d1d6fe5f1b5a505db4482e0b7337747ca4d2 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sun, 11 Nov 2018 14:54:07 +0100 Subject: Rename tutorial to match verb structure --- packages/website/translations/chinese.json | 2 +- packages/website/translations/english.json | 2 +- packages/website/translations/korean.json | 2 +- packages/website/translations/russian.json | 2 +- packages/website/translations/spanish.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 95b9bda62..e3798a072 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -83,7 +83,7 @@ "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", - "ORDER_BASICS": "0x order basics", + "ORDER_BASICS": "Make & take orders", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Access the shared liquidity pool using the Standard Relayer API", diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index 465bd49b4..f91633492 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -87,7 +87,7 @@ "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", - "ORDER_BASICS": "0x order basics", + "ORDER_BASICS": "Make & take orders", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API", diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index 5485e5583..ca8cbe3d0 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -83,7 +83,7 @@ "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", - "ORDER_BASICS": "0x order basics", + "ORDER_BASICS": "Make & take orders", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API", diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index a2e2a8cef..a43d1e7b7 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -83,7 +83,7 @@ "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", - "ORDER_BASICS": "0x order basics", + "ORDER_BASICS": "Make & take orders", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API", diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index acbc59c3d..4d404ac6b 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -84,7 +84,7 @@ "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", - "ORDER_BASICS": "0x order basics", + "ORDER_BASICS": "Make & take orders", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API", -- cgit v1.2.3 From 753b33aec5a12a30f08701aa04b6ec67e7f590de Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sun, 11 Nov 2018 15:31:52 +0100 Subject: Remove "Home" menu item, instead make different parts of logo link to different sections of the website --- .../website/public/images/developers/logo/0x.svg | 1 + .../website/public/images/developers/logo/docs.svg | 6 +++ packages/website/public/images/docs_logo.svg | 24 ----------- .../ts/components/documentation/docs_logo.tsx | 25 +++++++++-- .../ts/components/documentation/docs_top_bar.tsx | 48 +++++++++++----------- .../website/ts/components/nested_sidebar_menu.tsx | 2 +- .../ts/pages/documentation/developers_page.tsx | 2 +- packages/website/ts/utils/constants.ts | 4 -- 8 files changed, 53 insertions(+), 59 deletions(-) create mode 100644 packages/website/public/images/developers/logo/0x.svg create mode 100644 packages/website/public/images/developers/logo/docs.svg delete mode 100644 packages/website/public/images/docs_logo.svg (limited to 'packages') diff --git a/packages/website/public/images/developers/logo/0x.svg b/packages/website/public/images/developers/logo/0x.svg new file mode 100644 index 000000000..a584bbc62 --- /dev/null +++ b/packages/website/public/images/developers/logo/0x.svg @@ -0,0 +1 @@ +Asset 1 \ No newline at end of file diff --git a/packages/website/public/images/developers/logo/docs.svg b/packages/website/public/images/developers/logo/docs.svg new file mode 100644 index 000000000..d3d14f66e --- /dev/null +++ b/packages/website/public/images/developers/logo/docs.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/website/public/images/docs_logo.svg b/packages/website/public/images/docs_logo.svg deleted file mode 100644 index e3c4b628b..000000000 --- a/packages/website/public/images/docs_logo.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index 2840d5960..54ea9e2b4 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -1,17 +1,34 @@ import { Link } from '@0x/react-shared'; import * as React from 'react'; +import { styled } from 'ts/style/theme'; import { WebsitePaths } from 'ts/types'; +import { Container } from '../ui/container'; + export interface DocsLogoProps { - height: number; containerStyle?: React.CSSProperties; } +const Image = styled.img` + &:hover { + opacity: 0.7; + } +`; + export const DocsLogo: React.StatelessComponent = props => { return ( - - - + + + + + + + + + + + + ); }; diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index cf26e8a2a..c4291b78f 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -37,35 +37,33 @@ export class DocsTopBar extends React.Component - - - - - {this._renderMenuItems(constants.DEVELOPER_TOPBAR_LINKS)} - - - - - - + + + + {this._renderMenuItems(constants.DEVELOPER_TOPBAR_LINKS)} - - + + + + + + + - + {this.props.screenWidth === ScreenWidths.Sm && this._renderDrawer()} ); diff --git a/packages/website/ts/components/nested_sidebar_menu.tsx b/packages/website/ts/components/nested_sidebar_menu.tsx index db7d55261..552839fb7 100644 --- a/packages/website/ts/components/nested_sidebar_menu.tsx +++ b/packages/website/ts/components/nested_sidebar_menu.tsx @@ -70,7 +70,7 @@ export class MenuItem extends React.Component { borderRadius="4px" padding="0.4em 0.375em" width="100%" - backgroundColor={isActive ? colors.lightLinkBlue : colors.grey100} + backgroundColor={isActive ? colors.lightLinkBlue : 'transparent'} fontSize="14px" textAlign="left" > diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index d6986b399..bda04f51e 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -160,7 +160,7 @@ export class DevelopersPage extends React.Component - + diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts index 0a8a86c50..379f28022 100644 --- a/packages/website/ts/utils/constants.ts +++ b/packages/website/ts/utils/constants.ts @@ -103,10 +103,6 @@ export const constants = { URL_BIGNUMBERJS_GITHUB: 'http://mikemcl.github.io/bignumber.js', URL_MISSION_AND_VALUES_BLOG_POST: 'https://blog.0xproject.com/the-0x-mission-and-values-181a58706f9f', DEVELOPER_TOPBAR_LINKS: [ - { - title: Key.Home, - to: WebsitePaths.Home, - }, { title: Key.Wiki, to: WebsitePaths.Wiki, -- cgit v1.2.3 From 1ec8a4115f386c45b12bdf0b6ebdcabb1a1c5bb7 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sun, 11 Nov 2018 16:48:31 +0100 Subject: Fix menuItem background colors depending on the context --- packages/website/ts/components/nested_sidebar_menu.tsx | 13 +++++++++++-- packages/website/ts/pages/documentation/doc_page.tsx | 6 +++++- packages/website/ts/pages/documentation/docs_home.tsx | 1 + packages/website/ts/pages/wiki/wiki.tsx | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/components/nested_sidebar_menu.tsx b/packages/website/ts/components/nested_sidebar_menu.tsx index 552839fb7..4d4bc4617 100644 --- a/packages/website/ts/components/nested_sidebar_menu.tsx +++ b/packages/website/ts/components/nested_sidebar_menu.tsx @@ -4,11 +4,13 @@ import * as _ from 'lodash'; import * as React from 'react'; import { Button } from 'ts/components/ui/button'; import { Text } from 'ts/components/ui/text'; +import { ScreenWidths } from 'ts/types'; export interface NestedSidebarMenuProps { sectionNameToLinks: ObjectMap; sidebarHeader?: React.ReactNode; shouldReformatMenuItemNames?: boolean; + screenWidth: ScreenWidths; } export const NestedSidebarMenu = (props: NestedSidebarMenuProps) => { @@ -22,7 +24,7 @@ export const NestedSidebarMenu = (props: NestedSidebarMenuProps) => { ...link, title: menuItemTitle, }; - return ; + return ; }); // tslint:disable-next-line:no-unused-variable return ( @@ -44,6 +46,7 @@ export const NestedSidebarMenu = (props: NestedSidebarMenuProps) => { export interface MenuItemProps { link: ALink; + screenWidth: ScreenWidths; } export interface MenuItemState { @@ -70,7 +73,13 @@ export class MenuItem extends React.Component { borderRadius="4px" padding="0.4em 0.375em" width="100%" - backgroundColor={isActive ? colors.lightLinkBlue : 'transparent'} + backgroundColor={ + isActive + ? colors.lightLinkBlue + : this.props.screenWidth === ScreenWidths.Sm + ? 'white' + : colors.grey100 + } fontSize="14px" textAlign="left" > diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 28bf2dba1..80bde130c 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -94,7 +94,11 @@ export class DocPage extends React.Component { const sidebar = _.isUndefined(this.state.docAgnosticFormat) ? (
) : ( - + ); return ( { sidebarHeader={isSmallScreen ? this._renderSidebarHeader() : undefined} sectionNameToLinks={sectionNameToLinks} shouldReformatMenuItemNames={false} + screenWidth={this.props.screenWidth} /> ); return ( diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index c1802b1f8..c3c1600a5 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -76,6 +76,7 @@ export class Wiki extends React.Component { ); return ( -- cgit v1.2.3 From 2d43f312c8c3505bfd650be2a0975e39303d9d24 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sun, 11 Nov 2018 16:50:08 +0100 Subject: Adjust paddin --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 6e85c1499..b8a35fab0 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -89,7 +89,7 @@ export class DevelopersDropDown extends React.Component -- cgit v1.2.3 From 0d201173ef8908de43bdb83acb7aa8ed4ce1e09a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sun, 11 Nov 2018 17:51:00 +0100 Subject: Replace remaining scroll-links with Link component --- packages/react-docs/src/components/type.tsx | 11 ++--------- packages/react-shared/src/components/anchor_title.tsx | 18 +++--------------- 2 files changed, 5 insertions(+), 24 deletions(-) (limited to 'packages') diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 412b99b9d..0adfedc5a 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -3,7 +3,6 @@ import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0x/types'; import { errorUtils } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; -import { Link as ScrollLink } from 'react-scroll'; import * as ReactTooltip from 'react-tooltip'; import { DocsInfo } from '../docs_info'; @@ -224,13 +223,7 @@ export const Type: React.SFC = (props: TypeProps): any => { {sharedUtils.isUserOnMobile() || props.isInPopover || isExportedClassReference ? ( {typeName} ) : ( - + = (props: TypeProps): any => { /> - + )} ); diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index bd99edcab..a9105e132 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -1,15 +1,9 @@ import * as React from 'react'; -import { Link as ScrollLink } from 'react-scroll'; import styled from 'styled-components'; +import { Link } from '../components/link'; import { HeaderSizes, Styles } from '../types'; import { colors } from '../utils/colors'; -import { constants } from '../utils/constants'; - -const headerSizeToScrollOffset: { [headerSize: string]: number } = { - h2: -20, - h3: 0, -}; export interface AnchorTitleProps { title: string | React.ReactNode; @@ -73,15 +67,9 @@ export class AnchorTitle extends React.Component {!this.props.isDisabled && ( - + - + )}
); -- cgit v1.2.3 From 399a7d5fec9af4f3491a77f0c2d46738f3d8ffa7 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sun, 11 Nov 2018 22:07:58 +0100 Subject: Increase logo size --- packages/website/ts/components/documentation/docs_logo.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index 54ea9e2b4..ac331db79 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -20,12 +20,12 @@ export const DocsLogo: React.StatelessComponent = props => { - + - + - + -- cgit v1.2.3 From 6ef628613e658e90a06cbe5e34f119082e06678e Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sun, 11 Nov 2018 15:09:59 -0800 Subject: update changelog --- packages/order-watcher/CHANGELOG.json | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages') diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index d574f4a18..f93eda527 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -1,4 +1,14 @@ [ + { + "version: "2.2.1", + "changes": [ + { + "note": "start jsonRpcRequestId at 1, not 0", + "pr": 1227 + } + ], + "timestamp": 1541977777 + }, { "version": "2.2.0", "changes": [ -- cgit v1.2.3 From 76b3caa1241a4b35d07b7a5060d7d77649035001 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sun, 11 Nov 2018 15:13:42 -0800 Subject: Update CHANGELOG.json --- packages/order-watcher/CHANGELOG.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index 38d308b74..840e55698 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -1,6 +1,6 @@ [ { - "version: "2.2.2", + "version": "2.2.2", "changes": [ { "note": "start jsonRpcRequestId at 1, not 0", -- cgit v1.2.3 From dbce3f89356f55d2298ac3e7944106f5d57550f2 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 12 Nov 2018 13:20:41 +0100 Subject: Remove unused instance variable --- packages/subproviders/src/subproviders/ledger.ts | 1 - 1 file changed, 1 deletion(-) (limited to 'packages') diff --git a/packages/subproviders/src/subproviders/ledger.ts b/packages/subproviders/src/subproviders/ledger.ts index 28e348f90..b5ca10ce1 100644 --- a/packages/subproviders/src/subproviders/ledger.ts +++ b/packages/subproviders/src/subproviders/ledger.ts @@ -32,7 +32,6 @@ const DEFAULT_ADDRESS_SEARCH_LIMIT = 1000; */ export class LedgerSubprovider extends BaseWalletSubprovider { // tslint:disable-next-line:no-unused-variable - private readonly _nonceLock = new Lock(); private readonly _connectionLock = new Lock(); private readonly _networkId: number; private _baseDerivationPath: string; -- cgit v1.2.3 From 320460feb92cbd65a504aca6fb095b1233776e29 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 12 Nov 2018 13:21:25 +0100 Subject: fix: lowercase supplied address before comparing with derived addresses (which are not checksummed) --- packages/subproviders/src/utils/wallet_utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/subproviders/src/utils/wallet_utils.ts b/packages/subproviders/src/utils/wallet_utils.ts index 4c233645b..7027ca8a0 100644 --- a/packages/subproviders/src/utils/wallet_utils.ts +++ b/packages/subproviders/src/utils/wallet_utils.ts @@ -56,10 +56,11 @@ export const walletUtils = { parentDerivedKeyInfo: DerivedHDKeyInfo, searchLimit: number, ): DerivedHDKeyInfo | undefined { + const lowercaseAddress = address.toLowerCase(); let matchedKey: DerivedHDKeyInfo | undefined; const derivedKeyIterator = new DerivedHDKeyInfoIterator(parentDerivedKeyInfo, searchLimit); for (const key of derivedKeyIterator) { - if (key.address === address) { + if (key.address === lowercaseAddress) { matchedKey = key; break; } -- cgit v1.2.3 From 0d565fe32fda046d544ff22ab03d5f8842b1a115 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 12 Nov 2018 13:27:14 +0100 Subject: Improve logo spacing --- .../website/public/images/developers/logo/0x.svg | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/website/public/images/developers/logo/0x.svg b/packages/website/public/images/developers/logo/0x.svg index a584bbc62..f02903925 100644 --- a/packages/website/public/images/developers/logo/0x.svg +++ b/packages/website/public/images/developers/logo/0x.svg @@ -1 +1,24 @@ -Asset 1 \ No newline at end of file + + + +Asset 1 + + + + + + + + + + + -- cgit v1.2.3 From 33dbdb0184a08a1a1748c234669b5b7758ad308b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 12 Nov 2018 13:44:24 +0100 Subject: Move connect schemas to JSON Schemas --- packages/connect/src/http_client.ts | 29 +++++++++++----------- .../src/schemas/asset_pairs_request_opts_schema.ts | 8 ------ .../src/schemas/order_config_request_schema.ts | 24 ------------------ .../src/schemas/orderbook_request_schema.ts | 9 ------- .../src/schemas/orders_request_opts_schema.ts | 19 -------------- .../src/schemas/paged_request_opts_schema.ts | 8 ------ .../connect/src/schemas/request_opts_schema.ts | 7 ------ packages/connect/src/schemas/schemas.ts | 15 ----------- packages/json-schemas/CHANGELOG.json | 5 +++- .../schemas/asset_pairs_request_opts_schema.json | 8 ++++++ .../schemas/order_config_request_schema.json | 24 ++++++++++++++++++ .../schemas/orderbook_request_schema.json | 9 +++++++ .../schemas/orders_request_opts_schema.json | 19 ++++++++++++++ .../schemas/paged_request_opts_schema.json | 8 ++++++ .../json-schemas/schemas/request_opts_schema.json | 7 ++++++ packages/json-schemas/src/schemas.ts | 12 +++++++++ packages/json-schemas/tsconfig.json | 8 +++++- 17 files changed, 112 insertions(+), 107 deletions(-) delete mode 100644 packages/connect/src/schemas/asset_pairs_request_opts_schema.ts delete mode 100644 packages/connect/src/schemas/order_config_request_schema.ts delete mode 100644 packages/connect/src/schemas/orderbook_request_schema.ts delete mode 100644 packages/connect/src/schemas/orders_request_opts_schema.ts delete mode 100644 packages/connect/src/schemas/paged_request_opts_schema.ts delete mode 100644 packages/connect/src/schemas/request_opts_schema.ts delete mode 100644 packages/connect/src/schemas/schemas.ts create mode 100644 packages/json-schemas/schemas/asset_pairs_request_opts_schema.json create mode 100644 packages/json-schemas/schemas/order_config_request_schema.json create mode 100644 packages/json-schemas/schemas/orderbook_request_schema.json create mode 100644 packages/json-schemas/schemas/orders_request_opts_schema.json create mode 100644 packages/json-schemas/schemas/paged_request_opts_schema.json create mode 100644 packages/json-schemas/schemas/request_opts_schema.json (limited to 'packages') diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts index b6c031fa8..c52425431 100644 --- a/packages/connect/src/http_client.ts +++ b/packages/connect/src/http_client.ts @@ -19,7 +19,6 @@ import { fetchAsync } from '@0x/utils'; import * as _ from 'lodash'; import * as queryString from 'query-string'; -import { schemas as clientSchemas } from './schemas/schemas'; import { Client, HttpRequestOptions, HttpRequestType } from './types'; import { relayerResponseJsonParsers } from './utils/relayer_response_json_parsers'; @@ -61,9 +60,9 @@ export class HttpClient implements Client { requestOpts?: RequestOpts & AssetPairsRequestOpts & PagedRequestOpts, ): Promise { if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.assetPairsRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.pagedRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.requestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.assetPairsRequestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.pagedRequestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); } const httpRequestOpts = { params: requestOpts, @@ -81,9 +80,9 @@ export class HttpClient implements Client { requestOpts?: RequestOpts & OrdersRequestOpts & PagedRequestOpts, ): Promise { if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.ordersRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.pagedRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.requestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.ordersRequestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.pagedRequestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); } const httpRequestOpts = { params: requestOpts, @@ -99,7 +98,7 @@ export class HttpClient implements Client { */ public async getOrderAsync(orderHash: string, requestOpts?: RequestOpts): Promise { if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.requestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); } assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); const httpRequestOpts = { @@ -119,10 +118,10 @@ export class HttpClient implements Client { request: OrderbookRequest, requestOpts?: RequestOpts & PagedRequestOpts, ): Promise { - assert.doesConformToSchema('request', request, clientSchemas.orderBookRequestSchema); + assert.doesConformToSchema('request', request, schemas.orderBookRequestSchema); if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.pagedRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.requestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.pagedRequestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); } const httpRequestOpts = { params: _.defaults({}, request, requestOpts), @@ -142,9 +141,9 @@ export class HttpClient implements Client { requestOpts?: RequestOpts, ): Promise { if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.requestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); } - assert.doesConformToSchema('request', request, clientSchemas.orderConfigRequestSchema); + assert.doesConformToSchema('request', request, schemas.orderConfigRequestSchema); const httpRequestOpts = { params: requestOpts, payload: request, @@ -160,8 +159,8 @@ export class HttpClient implements Client { */ public async getFeeRecipientsAsync(requestOpts?: RequestOpts & PagedRequestOpts): Promise { if (!_.isUndefined(requestOpts)) { - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.pagedRequestOptsSchema); - assert.doesConformToSchema('requestOpts', requestOpts, clientSchemas.requestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.pagedRequestOptsSchema); + assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema); } const httpRequestOpts = { params: requestOpts, diff --git a/packages/connect/src/schemas/asset_pairs_request_opts_schema.ts b/packages/connect/src/schemas/asset_pairs_request_opts_schema.ts deleted file mode 100644 index a9e3942a4..000000000 --- a/packages/connect/src/schemas/asset_pairs_request_opts_schema.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const assetPairsRequestOptsSchema = { - id: '/AssetPairsRequestOpts', - type: 'object', - properties: { - assetDataA: { $ref: '/hexSchema' }, - assetDataB: { $ref: '/hexSchema' }, - }, -}; diff --git a/packages/connect/src/schemas/order_config_request_schema.ts b/packages/connect/src/schemas/order_config_request_schema.ts deleted file mode 100644 index 0eda430e8..000000000 --- a/packages/connect/src/schemas/order_config_request_schema.ts +++ /dev/null @@ -1,24 +0,0 @@ -export const orderConfigRequestSchema = { - id: '/OrderConfigRequest', - type: 'object', - properties: { - makerAddress: { $ref: '/addressSchema' }, - takerAddress: { $ref: '/addressSchema' }, - makerAssetAmount: { $ref: '/numberSchema' }, - takerAssetAmount: { $ref: '/numberSchema' }, - makerAssetData: { $ref: '/hexSchema' }, - takerAssetData: { $ref: '/hexSchema' }, - exchangeAddress: { $ref: '/addressSchema' }, - expirationTimeSeconds: { $ref: '/numberSchema' }, - }, - required: [ - 'makerAddress', - 'takerAddress', - 'makerAssetAmount', - 'takerAssetAmount', - 'makerAssetData', - 'takerAssetData', - 'exchangeAddress', - 'expirationTimeSeconds', - ], -}; diff --git a/packages/connect/src/schemas/orderbook_request_schema.ts b/packages/connect/src/schemas/orderbook_request_schema.ts deleted file mode 100644 index 0c9389d50..000000000 --- a/packages/connect/src/schemas/orderbook_request_schema.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const orderBookRequestSchema = { - id: '/OrderBookRequest', - type: 'object', - properties: { - baseAssetData: { $ref: '/hexSchema' }, - quoteAssetData: { $ref: '/hexSchema' }, - }, - required: ['baseAssetData', 'quoteAssetData'], -}; diff --git a/packages/connect/src/schemas/orders_request_opts_schema.ts b/packages/connect/src/schemas/orders_request_opts_schema.ts deleted file mode 100644 index 71ce3d06f..000000000 --- a/packages/connect/src/schemas/orders_request_opts_schema.ts +++ /dev/null @@ -1,19 +0,0 @@ -export const ordersRequestOptsSchema = { - id: '/OrdersRequestOpts', - type: 'object', - properties: { - makerAssetProxyId: { $ref: '/hexSchema' }, - takerAssetProxyId: { $ref: '/hexSchema' }, - makerAssetAddress: { $ref: '/addressSchema' }, - takerAssetAddress: { $ref: '/addressSchema' }, - exchangeAddress: { $ref: '/addressSchema' }, - senderAddress: { $ref: '/addressSchema' }, - makerAssetData: { $ref: '/hexSchema' }, - takerAssetData: { $ref: '/hexSchema' }, - traderAssetData: { $ref: '/hexSchema' }, - makerAddress: { $ref: '/addressSchema' }, - takerAddress: { $ref: '/addressSchema' }, - traderAddress: { $ref: '/addressSchema' }, - feeRecipientAddress: { $ref: '/addressSchema' }, - }, -}; diff --git a/packages/connect/src/schemas/paged_request_opts_schema.ts b/packages/connect/src/schemas/paged_request_opts_schema.ts deleted file mode 100644 index eb2e52100..000000000 --- a/packages/connect/src/schemas/paged_request_opts_schema.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const pagedRequestOptsSchema = { - id: '/PagedRequestOpts', - type: 'object', - properties: { - page: { type: 'number' }, - perPage: { type: 'number' }, - }, -}; diff --git a/packages/connect/src/schemas/request_opts_schema.ts b/packages/connect/src/schemas/request_opts_schema.ts deleted file mode 100644 index a51e98069..000000000 --- a/packages/connect/src/schemas/request_opts_schema.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const requestOptsSchema = { - id: '/RequestOpts', - type: 'object', - properties: { - networkId: { type: 'number' }, - }, -}; diff --git a/packages/connect/src/schemas/schemas.ts b/packages/connect/src/schemas/schemas.ts deleted file mode 100644 index 8d101ed6f..000000000 --- a/packages/connect/src/schemas/schemas.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { assetPairsRequestOptsSchema } from './asset_pairs_request_opts_schema'; -import { orderConfigRequestSchema } from './order_config_request_schema'; -import { orderBookRequestSchema } from './orderbook_request_schema'; -import { ordersRequestOptsSchema } from './orders_request_opts_schema'; -import { pagedRequestOptsSchema } from './paged_request_opts_schema'; -import { requestOptsSchema } from './request_opts_schema'; - -export const schemas = { - orderConfigRequestSchema, - orderBookRequestSchema, - ordersRequestOptsSchema, - pagedRequestOptsSchema, - requestOptsSchema, - assetPairsRequestOptsSchema, -}; diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index 3bd6552e3..3120d6247 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -1,11 +1,14 @@ [ { - "version": "2.0.1", + "version": "2.1.0", "changes": [ { "note": "Improve schemas by enforcing that amounts that must be whole numbers (e.g Order asset amounts) no longer allow decimal amounts", "pr": 1173 + }, + { + "note": "Add schemas from @0x/connect" } ] }, diff --git a/packages/json-schemas/schemas/asset_pairs_request_opts_schema.json b/packages/json-schemas/schemas/asset_pairs_request_opts_schema.json new file mode 100644 index 000000000..174a8fdc3 --- /dev/null +++ b/packages/json-schemas/schemas/asset_pairs_request_opts_schema.json @@ -0,0 +1,8 @@ +{ + "id": "/AssetPairsRequestOpts", + "type": "object", + "properties": { + "assetDataA": { "$ref": "/hexSchema" }, + "assetDataB": { "$ref": "/hexSchema" } + } +} diff --git a/packages/json-schemas/schemas/order_config_request_schema.json b/packages/json-schemas/schemas/order_config_request_schema.json new file mode 100644 index 000000000..ca9b2e30e --- /dev/null +++ b/packages/json-schemas/schemas/order_config_request_schema.json @@ -0,0 +1,24 @@ +{ + "id": "/OrderConfigRequest", + "type": "object", + "properties": { + "makerAddress": { "$ref": "/addressSchema" }, + "takerAddress": { "$ref": "/addressSchema" }, + "makerAssetAmount": { "$ref": "/wholeNumberSchema" }, + "takerAssetAmount": { "$ref": "/wholeNumberSchema" }, + "makerAssetData": { "$ref": "/hexSchema" }, + "takerAssetData": { "$ref": "/hexSchema" }, + "exchangeAddress": { "$ref": "/addressSchema" }, + "expirationTimeSeconds": { "$ref": "/wholeNumberSchema" } + }, + "required": [ + "makerAddress", + "takerAddress", + "makerAssetAmount", + "takerAssetAmount", + "makerAssetData", + "takerAssetData", + "exchangeAddress", + "expirationTimeSeconds" + ] +} diff --git a/packages/json-schemas/schemas/orderbook_request_schema.json b/packages/json-schemas/schemas/orderbook_request_schema.json new file mode 100644 index 000000000..27848bdcb --- /dev/null +++ b/packages/json-schemas/schemas/orderbook_request_schema.json @@ -0,0 +1,9 @@ +{ + "id": "/OrderBookRequest", + "type": "object", + "properties": { + "baseAssetData": { "$ref": "/hexSchema" }, + "quoteAssetData": { "$ref": "/hexSchema" } + }, + "required": ["baseAssetData", "quoteAssetData"] +} \ No newline at end of file diff --git a/packages/json-schemas/schemas/orders_request_opts_schema.json b/packages/json-schemas/schemas/orders_request_opts_schema.json new file mode 100644 index 000000000..10da51060 --- /dev/null +++ b/packages/json-schemas/schemas/orders_request_opts_schema.json @@ -0,0 +1,19 @@ +{ + "id": "/OrdersRequestOpts", + "type": "object", + "properties": { + "makerAssetProxyId": { "$ref": "/hexSchema" }, + "takerAssetProxyId": { "$ref": "/hexSchema" }, + "makerAssetAddress": { "$ref": "/addressSchema" }, + "takerAssetAddress": { "$ref": "/addressSchema" }, + "exchangeAddress": { "$ref": "/addressSchema" }, + "senderAddress": { "$ref": "/addressSchema" }, + "makerAssetData": { "$ref": "/hexSchema" }, + "takerAssetData": { "$ref": "/hexSchema" }, + "traderAssetData": { "$ref": "/hexSchema" }, + "makerAddress": { "$ref": "/addressSchema" }, + "takerAddress": { "$ref": "/addressSchema" }, + "traderAddress": { "$ref": "/addressSchema" }, + "feeRecipientAddress": { "$ref": "/addressSchema" } + } +} diff --git a/packages/json-schemas/schemas/paged_request_opts_schema.json b/packages/json-schemas/schemas/paged_request_opts_schema.json new file mode 100644 index 000000000..7cfc73947 --- /dev/null +++ b/packages/json-schemas/schemas/paged_request_opts_schema.json @@ -0,0 +1,8 @@ +{ + "id": "/PagedRequestOpts", + "type": "object", + "properties": { + "page": { "type": "number" }, + "perPage": { "type": "number" } + } +} diff --git a/packages/json-schemas/schemas/request_opts_schema.json b/packages/json-schemas/schemas/request_opts_schema.json new file mode 100644 index 000000000..b50547d18 --- /dev/null +++ b/packages/json-schemas/schemas/request_opts_schema.json @@ -0,0 +1,7 @@ +{ + "id": "/RequestOpts", + "type": "object", + "properties": { + "networkId": { "type": "number" } + } +} diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts index 8ece5de75..21a6f424c 100644 --- a/packages/json-schemas/src/schemas.ts +++ b/packages/json-schemas/src/schemas.ts @@ -1,4 +1,5 @@ import * as addressSchema from '../schemas/address_schema.json'; +import * as assetPairsRequestOptsSchema from '../schemas/asset_pairs_request_opts_schema.json'; import * as blockParamSchema from '../schemas/block_param_schema.json'; import * as blockRangeSchema from '../schemas/block_range_schema.json'; import * as callDataSchema from '../schemas/call_data_schema.json'; @@ -10,11 +11,15 @@ import * as indexFilterValuesSchema from '../schemas/index_filter_values_schema. import * as jsNumber from '../schemas/js_number.json'; import * as numberSchema from '../schemas/number_schema.json'; import * as orderCancellationRequestsSchema from '../schemas/order_cancel_schema.json'; +import * as orderConfigRequestSchema from '../schemas/order_config_request_schema.json'; import * as orderFillOrKillRequestsSchema from '../schemas/order_fill_or_kill_requests_schema.json'; import * as orderFillRequestsSchema from '../schemas/order_fill_requests_schema.json'; import * as orderHashSchema from '../schemas/order_hash_schema.json'; import * as orderSchema from '../schemas/order_schema.json'; +import * as orderBookRequestSchema from '../schemas/orderbook_request_schema.json'; +import * as ordersRequestOptsSchema from '../schemas/orders_request_opts_schema.json'; import * as ordersSchema from '../schemas/orders_schema.json'; +import * as pagedRequestOptsSchema from '../schemas/paged_request_opts_schema.json'; import * as paginatedCollectionSchema from '../schemas/paginated_collection_schema.json'; import * as relayerApiAssetDataPairsResponseSchema from '../schemas/relayer_api_asset_data_pairs_response_schema.json'; import * as relayerApiAssetDataPairsSchema from '../schemas/relayer_api_asset_data_pairs_schema.json'; @@ -30,6 +35,7 @@ import * as relayerApiOrdersChannelSubscribeSchema from '../schemas/relayer_api_ import * as relayerApiOrdersChannelUpdateSchema from '../schemas/relayer_api_orders_channel_update_response_schema.json'; import * as relayerApiOrdersResponseSchema from '../schemas/relayer_api_orders_response_schema.json'; import * as relayerApiOrdersSchema from '../schemas/relayer_api_orders_schema.json'; +import * as requestOptsSchema from '../schemas/request_opts_schema.json'; import * as signedOrderSchema from '../schemas/signed_order_schema.json'; import * as signedOrdersSchema from '../schemas/signed_orders_schema.json'; import * as tokenSchema from '../schemas/token_schema.json'; @@ -58,6 +64,12 @@ export const schemas = { blockRangeSchema, tokenSchema, jsNumber, + requestOptsSchema, + pagedRequestOptsSchema, + ordersRequestOptsSchema, + orderBookRequestSchema, + orderConfigRequestSchema, + assetPairsRequestOptsSchema, txDataSchema, paginatedCollectionSchema, relayerApiErrorResponseSchema, diff --git a/packages/json-schemas/tsconfig.json b/packages/json-schemas/tsconfig.json index 7b14166c0..a79d54385 100644 --- a/packages/json-schemas/tsconfig.json +++ b/packages/json-schemas/tsconfig.json @@ -44,6 +44,12 @@ "./schemas/zero_ex_transaction_schema.json", "./schemas/tx_data_schema.json", "./schemas/index_filter_values_schema.json", - "./schemas/whole_number_schema.json" + "./schemas/whole_number_schema.json", + "./schemas/asset_pairs_request_opts_schema.json", + "./schemas/orderbook_request_schema.json", + "./schemas/orders_request_opts_schema.json", + "./schemas/paged_request_opts_schema.json", + "./schemas/request_opts_schema.json", + "./schemas/order_config_request_schema.json" ] } -- cgit v1.2.3 From a4a46dc076f4e491b30671bd9006a586ab9754bc Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 12 Nov 2018 13:50:23 +0100 Subject: chore: fix linter error --- packages/react-docs/src/components/type.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 0adfedc5a..fa3b658b4 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -1,4 +1,4 @@ -import { colors, constants as sharedConstants, Link, utils as sharedUtils } from '@0x/react-shared'; +import { colors, Link, utils as sharedUtils } from '@0x/react-shared'; import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0x/types'; import { errorUtils } from '@0x/utils'; import * as _ from 'lodash'; -- cgit v1.2.3 From 7f013515e7158e301e5276d1efade2b5d9355fa5 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 12 Nov 2018 13:53:39 +0100 Subject: Add PR number --- packages/json-schemas/CHANGELOG.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index 3120d6247..ae1369ca7 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -8,7 +8,8 @@ "pr": 1173 }, { - "note": "Add schemas from @0x/connect" + "note": "Add schemas from @0x/connect", + "pr": 1250 } ] }, -- cgit v1.2.3 From 4d5bc8b8eec4da97ff82c8785fb7c1f9392ca768 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 12 Nov 2018 13:54:38 +0100 Subject: Fix static tests --- packages/instant/src/redux/reducer.ts | 1 - 1 file changed, 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index 8c1902bb8..bc435d069 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -15,7 +15,6 @@ import { OrderProcessState, OrderState, } from '../types'; -import { assetUtils } from '../util/asset'; import { Action, ActionTypes } from './actions'; -- cgit v1.2.3 From 085d34834b8af5a96090d078929fedcabba95a9a Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 12 Nov 2018 14:30:14 +0100 Subject: Updated CHANGELOGS --- packages/0x.js/CHANGELOG.json | 9 +++++++++ packages/0x.js/CHANGELOG.md | 4 ++++ packages/abi-gen-wrappers/CHANGELOG.json | 9 +++++++++ packages/abi-gen-wrappers/CHANGELOG.md | 4 ++++ packages/assert/CHANGELOG.json | 9 +++++++++ packages/assert/CHANGELOG.md | 4 ++++ packages/asset-buyer/CHANGELOG.json | 9 +++++++++ packages/asset-buyer/CHANGELOG.md | 4 ++++ packages/base-contract/CHANGELOG.json | 9 +++++++++ packages/base-contract/CHANGELOG.md | 4 ++++ packages/connect/CHANGELOG.json | 9 +++++++++ packages/connect/CHANGELOG.md | 4 ++++ packages/contract-wrappers/CHANGELOG.json | 3 ++- packages/contract-wrappers/CHANGELOG.md | 6 ++++++ packages/dev-utils/CHANGELOG.json | 9 +++++++++ packages/dev-utils/CHANGELOG.md | 4 ++++ packages/fill-scenarios/CHANGELOG.json | 9 +++++++++ packages/fill-scenarios/CHANGELOG.md | 4 ++++ packages/json-schemas/CHANGELOG.json | 2 +- packages/json-schemas/CHANGELOG.md | 3 ++- packages/migrations/CHANGELOG.json | 9 +++++++++ packages/migrations/CHANGELOG.md | 4 ++++ packages/order-utils/CHANGELOG.json | 3 ++- packages/order-utils/CHANGELOG.md | 7 +++++++ packages/order-watcher/CHANGELOG.json | 9 +++++++++ packages/order-watcher/CHANGELOG.md | 4 ++++ packages/react-docs/CHANGELOG.json | 9 +++++++++ packages/react-docs/CHANGELOG.md | 4 ++++ packages/react-shared/CHANGELOG.json | 9 +++++++++ packages/react-shared/CHANGELOG.md | 4 ++++ packages/sol-compiler/CHANGELOG.json | 9 +++++++++ packages/sol-compiler/CHANGELOG.md | 4 ++++ packages/sol-cov/CHANGELOG.json | 9 +++++++++ packages/sol-cov/CHANGELOG.md | 4 ++++ packages/sol-doc/CHANGELOG.json | 9 +++++++++ packages/sol-doc/CHANGELOG.md | 4 ++++ packages/sra-spec/CHANGELOG.json | 9 +++++++++ packages/sra-spec/CHANGELOG.md | 4 ++++ packages/subproviders/CHANGELOG.json | 9 +++++++++ packages/subproviders/CHANGELOG.md | 4 ++++ packages/web3-wrapper/CHANGELOG.json | 9 +++++++++ packages/web3-wrapper/CHANGELOG.md | 4 ++++ 42 files changed, 254 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 7d9cb8312..c5c45026b 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "2.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "2.0.1", "changes": [ diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index d312b2c9b..3261e4004 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.2 - _November 12, 2018_ + + * Dependencies updated + ## v2.0.1 - _November 9, 2018_ * Dependencies updated diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json index c3273536b..14a0eadcb 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ b/packages/abi-gen-wrappers/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "1.0.3", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.2", "changes": [ diff --git a/packages/abi-gen-wrappers/CHANGELOG.md b/packages/abi-gen-wrappers/CHANGELOG.md index 18bd28cb8..649540841 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.md +++ b/packages/abi-gen-wrappers/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.3 - _November 12, 2018_ + + * Dependencies updated + ## v1.0.2 - _November 9, 2018_ * Dependencies updated diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json index 82c0938cf..67c14f68f 100644 --- a/packages/assert/CHANGELOG.json +++ b/packages/assert/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "1.0.16", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.15", "changes": [ diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md index 7d0895eca..01b1dbbb5 100644 --- a/packages/assert/CHANGELOG.md +++ b/packages/assert/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.16 - _November 12, 2018_ + + * Dependencies updated + ## v1.0.15 - _November 9, 2018_ * Dependencies updated diff --git a/packages/asset-buyer/CHANGELOG.json b/packages/asset-buyer/CHANGELOG.json index df4531063..aa0d28879 100644 --- a/packages/asset-buyer/CHANGELOG.json +++ b/packages/asset-buyer/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "2.2.1", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "2.2.0", "changes": [ diff --git a/packages/asset-buyer/CHANGELOG.md b/packages/asset-buyer/CHANGELOG.md index d6220767e..331e4df9d 100644 --- a/packages/asset-buyer/CHANGELOG.md +++ b/packages/asset-buyer/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.2.1 - _November 12, 2018_ + + * Dependencies updated + ## v2.2.0 - _November 9, 2018_ * `getAssetBuyerForProvidedOrders` factory function now takes 3 args instead of 4 (#1187) diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index f8a1051d6..b6ce29874 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "3.0.4", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "3.0.3", "changes": [ diff --git a/packages/base-contract/CHANGELOG.md b/packages/base-contract/CHANGELOG.md index d544f4f99..984eeb3f1 100644 --- a/packages/base-contract/CHANGELOG.md +++ b/packages/base-contract/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.4 - _November 12, 2018_ + + * Dependencies updated + ## v3.0.3 - _November 9, 2018_ * Dependencies updated diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json index 52ad9d575..583c55cfc 100644 --- a/packages/connect/CHANGELOG.json +++ b/packages/connect/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "3.0.4", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "3.0.3", "changes": [ diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index 8e38e16de..7a57c1f88 100644 --- a/packages/connect/CHANGELOG.md +++ b/packages/connect/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.4 - _November 12, 2018_ + + * Dependencies updated + ## v3.0.3 - _November 9, 2018_ * Dependencies updated diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index 0ab5e5d08..425c33643 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -17,7 +17,8 @@ "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", "pr": 1235 } - ] + ], + "timestamp": 1542028948 }, { "version": "3.0.1", diff --git a/packages/contract-wrappers/CHANGELOG.md b/packages/contract-wrappers/CHANGELOG.md index 1fe903dd9..52c3fece6 100644 --- a/packages/contract-wrappers/CHANGELOG.md +++ b/packages/contract-wrappers/CHANGELOG.md @@ -5,6 +5,12 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v4.0.0 - _November 12, 2018_ + + * Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync` (#1235) + * Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive (#1235) + * Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218) (#1235) + ## v3.0.1 - _November 9, 2018_ * Fix bug in `ForwarderWrapper` where `feeRecipientAddress` was not correctly normalized. (#1178) diff --git a/packages/dev-utils/CHANGELOG.json b/packages/dev-utils/CHANGELOG.json index 269cdc934..f526f6b3e 100644 --- a/packages/dev-utils/CHANGELOG.json +++ b/packages/dev-utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "1.0.15", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.14", "changes": [ diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index ee614a904..4e364f96a 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.15 - _November 12, 2018_ + + * Dependencies updated + ## v1.0.14 - _November 9, 2018_ * Dependencies updated diff --git a/packages/fill-scenarios/CHANGELOG.json b/packages/fill-scenarios/CHANGELOG.json index 8aa4e78d3..bd6e58334 100644 --- a/packages/fill-scenarios/CHANGELOG.json +++ b/packages/fill-scenarios/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "1.0.10", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.9", "changes": [ diff --git a/packages/fill-scenarios/CHANGELOG.md b/packages/fill-scenarios/CHANGELOG.md index 4ff28f82f..57a6431b6 100644 --- a/packages/fill-scenarios/CHANGELOG.md +++ b/packages/fill-scenarios/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.10 - _November 12, 2018_ + + * Dependencies updated + ## v1.0.9 - _November 9, 2018_ * Dependencies updated diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index c273c09af..24eacd192 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -12,7 +12,7 @@ "pr": 1250 } ], - "timestamp": 1541740904 + "timestamp": 1542028948 }, { "version": "2.0.0", diff --git a/packages/json-schemas/CHANGELOG.md b/packages/json-schemas/CHANGELOG.md index a1c784640..4f77d3aee 100644 --- a/packages/json-schemas/CHANGELOG.md +++ b/packages/json-schemas/CHANGELOG.md @@ -5,9 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v2.0.1 - _November 9, 2018_ +## v2.1.0 - _November 12, 2018_ * Improve schemas by enforcing that amounts that must be whole numbers (e.g Order asset amounts) no longer allow decimal amounts (#1173) + * Add schemas from @0x/connect (#1250) ## v2.0.0 - _October 18, 2018_ diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index b7128f8e1..f57139f40 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "2.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "2.0.1", "changes": [ diff --git a/packages/migrations/CHANGELOG.md b/packages/migrations/CHANGELOG.md index 387ae0abb..56c26a472 100644 --- a/packages/migrations/CHANGELOG.md +++ b/packages/migrations/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.2 - _November 12, 2018_ + + * Dependencies updated + ## v2.0.1 - _November 9, 2018_ * Dependencies updated diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json index 0ed6117df..6ce3169d5 100644 --- a/packages/order-utils/CHANGELOG.json +++ b/packages/order-utils/CHANGELOG.json @@ -22,7 +22,8 @@ "Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param", "pr": 1235 } - ] + ], + "timestamp": 1542028948 }, { "version": "2.0.1", diff --git a/packages/order-utils/CHANGELOG.md b/packages/order-utils/CHANGELOG.md index 31bd02595..eaa74d6ce 100644 --- a/packages/order-utils/CHANGELOG.md +++ b/packages/order-utils/CHANGELOG.md @@ -5,6 +5,13 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.0 - _November 12, 2018_ + + * Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync` (#1235) + * Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive (#1235) + * Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218) (#1235) + * Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param (#1235) + ## v2.0.1 - _November 9, 2018_ * Dependencies updated diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index c662903a3..1255bd25a 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "2.2.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "2.2.1", "changes": [ diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md index b271956c7..1470b0e48 100644 --- a/packages/order-watcher/CHANGELOG.md +++ b/packages/order-watcher/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.2.2 - _November 12, 2018_ + + * Dependencies updated + ## v2.2.1 - _November 9, 2018_ * Dependencies updated diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json index 228dfab4f..42de578a6 100644 --- a/packages/react-docs/CHANGELOG.json +++ b/packages/react-docs/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "1.0.16", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.15", "changes": [ diff --git a/packages/react-docs/CHANGELOG.md b/packages/react-docs/CHANGELOG.md index 991b3a490..7f0514ddb 100644 --- a/packages/react-docs/CHANGELOG.md +++ b/packages/react-docs/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.16 - _November 12, 2018_ + + * Dependencies updated + ## v1.0.15 - _November 9, 2018_ * Dependencies updated diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json index 4dd11398b..4394eeb2e 100644 --- a/packages/react-shared/CHANGELOG.json +++ b/packages/react-shared/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "1.0.19", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.18", "changes": [ diff --git a/packages/react-shared/CHANGELOG.md b/packages/react-shared/CHANGELOG.md index 54ca77b16..4104628bc 100644 --- a/packages/react-shared/CHANGELOG.md +++ b/packages/react-shared/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.19 - _November 12, 2018_ + + * Dependencies updated + ## v1.0.18 - _November 9, 2018_ * Dependencies updated diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index 724e68a68..b432d9d90 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "1.1.10", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.1.9", "changes": [ diff --git a/packages/sol-compiler/CHANGELOG.md b/packages/sol-compiler/CHANGELOG.md index 322313f9e..2e2d810a6 100644 --- a/packages/sol-compiler/CHANGELOG.md +++ b/packages/sol-compiler/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.1.10 - _November 12, 2018_ + + * Dependencies updated + ## v1.1.9 - _November 9, 2018_ * Dependencies updated diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-cov/CHANGELOG.json index e331d608f..83efa8ac7 100644 --- a/packages/sol-cov/CHANGELOG.json +++ b/packages/sol-cov/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "2.1.10", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "2.1.9", "changes": [ diff --git a/packages/sol-cov/CHANGELOG.md b/packages/sol-cov/CHANGELOG.md index e9d9d6952..50ca2d6e2 100644 --- a/packages/sol-cov/CHANGELOG.md +++ b/packages/sol-cov/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.1.10 - _November 12, 2018_ + + * Dependencies updated + ## v2.1.9 - _November 9, 2018_ * Dependencies updated diff --git a/packages/sol-doc/CHANGELOG.json b/packages/sol-doc/CHANGELOG.json index d54569a4d..a2e903a24 100644 --- a/packages/sol-doc/CHANGELOG.json +++ b/packages/sol-doc/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "1.0.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.4", "changes": [ diff --git a/packages/sol-doc/CHANGELOG.md b/packages/sol-doc/CHANGELOG.md index d44af5d7f..257744b98 100644 --- a/packages/sol-doc/CHANGELOG.md +++ b/packages/sol-doc/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.5 - _November 12, 2018_ + + * Dependencies updated + ## v1.0.4 - _November 9, 2018_ * Dependencies updated diff --git a/packages/sra-spec/CHANGELOG.json b/packages/sra-spec/CHANGELOG.json index e053b3163..37ad85385 100644 --- a/packages/sra-spec/CHANGELOG.json +++ b/packages/sra-spec/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "1.0.9", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.8", "changes": [ diff --git a/packages/sra-spec/CHANGELOG.md b/packages/sra-spec/CHANGELOG.md index 02d22431f..c53ad6b5b 100644 --- a/packages/sra-spec/CHANGELOG.md +++ b/packages/sra-spec/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.9 - _November 12, 2018_ + + * Dependencies updated + ## v1.0.8 - _November 9, 2018_ * Dependencies updated diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json index 816c776a5..49b1d99d0 100644 --- a/packages/subproviders/CHANGELOG.json +++ b/packages/subproviders/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "2.1.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "2.1.1", "changes": [ diff --git a/packages/subproviders/CHANGELOG.md b/packages/subproviders/CHANGELOG.md index 72ac9d1f7..a8ef8deb6 100644 --- a/packages/subproviders/CHANGELOG.md +++ b/packages/subproviders/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.1.2 - _November 12, 2018_ + + * Dependencies updated + ## v2.1.1 - _November 9, 2018_ * Dependencies updated diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index 7b21da73a..89d153eef 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542028948, + "version": "3.1.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "3.1.1", "changes": [ diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index ebbef2c48..80ac76b9a 100644 --- a/packages/web3-wrapper/CHANGELOG.md +++ b/packages/web3-wrapper/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.1.2 - _November 12, 2018_ + + * Dependencies updated + ## v3.1.1 - _November 9, 2018_ * Fix bug in `getTransactionByHashAsync` which was causing the return value to have the wrong type (raw fields instead of unmarshalled fields). (#1177) -- cgit v1.2.3 From 0ebbbdfca49028f196853bbfb082a1378c09f441 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 12 Nov 2018 14:30:26 +0100 Subject: Publish - 0x.js@2.0.2 - @0x/abi-gen-wrappers@1.0.3 - @0x/assert@1.0.16 - @0x/asset-buyer@2.2.1 - @0x/base-contract@3.0.4 - @0x/connect@3.0.4 - @0x/contract-wrappers@4.0.0 - contracts@2.1.52 - @0x/dev-tools-pages@0.0.4 - @0x/dev-utils@1.0.15 - @0x/fill-scenarios@1.0.10 - @0x/instant@0.0.5 - @0x/json-schemas@2.1.0 - @0x/metacoin@0.0.26 - @0x/migrations@2.0.2 - @0x/order-utils@3.0.0 - @0x/order-watcher@2.2.2 - @0x/react-docs@1.0.16 - @0x/react-shared@1.0.19 - @0x/sol-compiler@1.1.10 - @0x/sol-cov@2.1.10 - @0x/sol-doc@1.0.5 - @0x/sra-spec@1.0.9 - @0x/subproviders@2.1.2 - @0x/testnet-faucets@1.0.54 - @0x/web3-wrapper@3.1.2 - @0x/website@0.0.57 --- packages/0x.js/package.json | 22 +++++++++++----------- packages/abi-gen-wrappers/package.json | 6 +++--- packages/assert/package.json | 4 ++-- packages/asset-buyer/package.json | 16 ++++++++-------- packages/base-contract/package.json | 4 ++-- packages/connect/package.json | 8 ++++---- packages/contract-wrappers/package.json | 20 ++++++++++---------- packages/contracts/package.json | 16 ++++++++-------- packages/dev-tools-pages/package.json | 4 ++-- packages/dev-utils/package.json | 6 +++--- packages/fill-scenarios/package.json | 10 +++++----- packages/instant/package.json | 14 +++++++------- packages/json-schemas/package.json | 2 +- packages/metacoin/package.json | 14 +++++++------- packages/migrations/package.json | 16 ++++++++-------- packages/order-utils/package.json | 14 +++++++------- packages/order-watcher/package.json | 22 +++++++++++----------- packages/react-docs/package.json | 6 +++--- packages/react-shared/package.json | 4 ++-- packages/sol-compiler/package.json | 10 +++++----- packages/sol-cov/package.json | 10 +++++----- packages/sol-doc/package.json | 4 ++-- packages/sra-spec/package.json | 4 ++-- packages/subproviders/package.json | 6 +++--- packages/testnet-faucets/package.json | 8 ++++---- packages/web3-wrapper/package.json | 6 +++--- packages/website/package.json | 16 ++++++++-------- 27 files changed, 136 insertions(+), 136 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 38478980f..d49c8f188 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "2.0.1", + "version": "2.0.2", "engines": { "node": ">=6.12" }, @@ -43,10 +43,10 @@ "license": "Apache-2.0", "devDependencies": { "@0x/abi-gen": "^1.0.15", - "@0x/abi-gen-wrappers": "^1.0.2", + "@0x/abi-gen-wrappers": "^1.0.3", "@0x/contract-addresses": "^1.1.0", - "@0x/dev-utils": "^1.0.14", - "@0x/migrations": "^2.0.1", + "@0x/dev-utils": "^1.0.15", + "@0x/migrations": "^2.0.2", "@0x/tslint-config": "^1.0.10", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -73,16 +73,16 @@ "webpack": "^4.20.2" }, "dependencies": { - "@0x/assert": "^1.0.15", - "@0x/base-contract": "^3.0.3", - "@0x/contract-wrappers": "^3.0.1", - "@0x/order-utils": "^2.0.1", - "@0x/order-watcher": "^2.2.1", - "@0x/subproviders": "^2.1.1", + "@0x/assert": "^1.0.16", + "@0x/base-contract": "^3.0.4", + "@0x/contract-wrappers": "^4.0.0", + "@0x/order-utils": "^3.0.0", + "@0x/order-watcher": "^2.2.2", + "@0x/subproviders": "^2.1.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "@types/web3-provider-engine": "^14.0.0", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index a4316449f..5dab1fd3c 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -1,6 +1,6 @@ { "name": "@0x/abi-gen-wrappers", - "version": "1.0.2", + "version": "1.0.3", "engines": { "node": ">=6.12" }, @@ -33,14 +33,14 @@ "@0x/abi-gen": "^1.0.15", "@0x/tslint-config": "^1.0.10", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5", "shx": "^0.2.2" }, "dependencies": { - "@0x/base-contract": "^3.0.3" + "@0x/base-contract": "^3.0.4" }, "publishConfig": { "access": "public" diff --git a/packages/assert/package.json b/packages/assert/package.json index cc2fdaae9..1db886737 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,6 +1,6 @@ { "name": "@0x/assert", - "version": "1.0.15", + "version": "1.0.16", "engines": { "node": ">=6.12" }, @@ -44,7 +44,7 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/json-schemas": "^2.0.1", + "@0x/json-schemas": "^2.1.0", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", "lodash": "^4.17.5", diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json index fc2414952..58daac16e 100644 --- a/packages/asset-buyer/package.json +++ b/packages/asset-buyer/package.json @@ -1,6 +1,6 @@ { "name": "@0x/asset-buyer", - "version": "2.2.0", + "version": "2.2.1", "engines": { "node": ">=6.12" }, @@ -36,16 +36,16 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md", "dependencies": { - "@0x/assert": "^1.0.15", - "@0x/connect": "^3.0.3", - "@0x/contract-wrappers": "^3.0.1", - "@0x/json-schemas": "^2.0.1", - "@0x/order-utils": "^2.0.1", - "@0x/subproviders": "^2.1.1", + "@0x/assert": "^1.0.16", + "@0x/connect": "^3.0.4", + "@0x/contract-wrappers": "^4.0.0", + "@0x/json-schemas": "^2.1.0", + "@0x/order-utils": "^3.0.0", + "@0x/subproviders": "^2.1.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "ethereum-types": "^1.1.2", "lodash": "^4.17.10" }, diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index efa4a5c81..d92566208 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -1,6 +1,6 @@ { "name": "@0x/base-contract", - "version": "3.0.3", + "version": "3.0.4", "engines": { "node": ">=6.12" }, @@ -42,7 +42,7 @@ "dependencies": { "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/connect/package.json b/packages/connect/package.json index 527ac5bdc..09d8334a7 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0x/connect", - "version": "3.0.3", + "version": "3.0.4", "engines": { "node": ">=6.12" }, @@ -44,9 +44,9 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { - "@0x/assert": "^1.0.15", - "@0x/json-schemas": "^2.0.1", - "@0x/order-utils": "^2.0.1", + "@0x/assert": "^1.0.16", + "@0x/json-schemas": "^2.1.0", + "@0x/order-utils": "^3.0.0", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index cb69bbd33..ab316c586 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -1,6 +1,6 @@ { "name": "@0x/contract-wrappers", - "version": "3.0.1", + "version": "4.0.0", "description": "Smart TS wrappers for 0x smart contracts", "keywords": [ "0xproject", @@ -37,9 +37,9 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.14", - "@0x/migrations": "^2.0.1", - "@0x/subproviders": "^2.1.1", + "@0x/dev-utils": "^1.0.15", + "@0x/migrations": "^2.0.2", + "@0x/subproviders": "^2.1.2", "@0x/tslint-config": "^1.0.10", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -65,17 +65,17 @@ "web3-provider-engine": "14.0.6" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.2", - "@0x/assert": "^1.0.15", + "@0x/abi-gen-wrappers": "^1.0.3", + "@0x/assert": "^1.0.16", "@0x/contract-addresses": "^1.1.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/fill-scenarios": "^1.0.9", - "@0x/json-schemas": "^2.0.1", - "@0x/order-utils": "^2.0.1", + "@0x/fill-scenarios": "^1.0.10", + "@0x/json-schemas": "^2.1.0", + "@0x/order-utils": "^3.0.0", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "ethereum-types": "^1.1.2", "ethereumjs-blockstream": "6.0.0", "ethereumjs-util": "^5.1.1", diff --git a/packages/contracts/package.json b/packages/contracts/package.json index bf9bb4826..3e08ea2c4 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "contracts", - "version": "2.1.51", + "version": "2.1.52", "engines": { "node": ">=6.12" }, @@ -46,10 +46,10 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md", "devDependencies": { "@0x/abi-gen": "^1.0.15", - "@0x/dev-utils": "^1.0.14", - "@0x/sol-compiler": "^1.1.9", - "@0x/sol-cov": "^2.1.9", - "@0x/subproviders": "^2.1.1", + "@0x/dev-utils": "^1.0.15", + "@0x/sol-compiler": "^1.1.10", + "@0x/sol-cov": "^2.1.10", + "@0x/subproviders": "^2.1.2", "@0x/tslint-config": "^1.0.10", "@types/bn.js": "^4.11.0", "@types/ethereumjs-abi": "^0.6.0", @@ -71,12 +71,12 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0x/base-contract": "^3.0.3", - "@0x/order-utils": "^2.0.1", + "@0x/base-contract": "^3.0.4", + "@0x/order-utils": "^3.0.0", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "@types/js-combinatorics": "^0.5.29", "bn.js": "^4.11.8", "ethereum-types": "^1.1.2", diff --git a/packages/dev-tools-pages/package.json b/packages/dev-tools-pages/package.json index b1b89ac99..7dba0f5dc 100644 --- a/packages/dev-tools-pages/package.json +++ b/packages/dev-tools-pages/package.json @@ -1,6 +1,6 @@ { "name": "@0x/dev-tools-pages", - "version": "0.0.3", + "version": "0.0.4", "engines": { "node": ">=6.12" }, @@ -16,7 +16,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@0x/react-shared": "^1.0.18", + "@0x/react-shared": "^1.0.19", "basscss": "^8.0.3", "bowser": "^1.9.3", "less": "^2.7.2", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index e1b3201d3..a4d2381bd 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/dev-utils", - "version": "1.0.14", + "version": "1.0.15", "engines": { "node": ">=6.12" }, @@ -41,11 +41,11 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/subproviders": "^2.1.1", + "@0x/subproviders": "^2.1.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "@types/web3-provider-engine": "^14.0.0", "chai": "^4.0.1", "ethereum-types": "^1.1.2", diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index e9ca077fb..20825b6dd 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -1,6 +1,6 @@ { "name": "@0x/fill-scenarios", - "version": "1.0.9", + "version": "1.0.10", "description": "0x order fill scenario generator", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -28,14 +28,14 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.2", - "@0x/base-contract": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.3", + "@0x/base-contract": "^3.0.4", "@0x/contract-artifacts": "^1.1.0", - "@0x/order-utils": "^2.0.1", + "@0x/order-utils": "^3.0.0", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/instant/package.json b/packages/instant/package.json index 3c87743c1..4ec9e9bd3 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -1,6 +1,6 @@ { "name": "@0x/instant", - "version": "0.0.4", + "version": "0.0.5", "engines": { "node": ">=6.12" }, @@ -45,15 +45,15 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md", "dependencies": { - "@0x/assert": "^1.0.15", - "@0x/asset-buyer": "^2.2.0", - "@0x/json-schemas": "^2.0.1", - "@0x/order-utils": "^2.0.1", - "@0x/subproviders": "^2.1.1", + "@0x/assert": "^1.0.16", + "@0x/asset-buyer": "^2.2.1", + "@0x/json-schemas": "^2.1.0", + "@0x/order-utils": "^3.0.0", + "@0x/subproviders": "^2.1.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "copy-to-clipboard": "^3.0.8", "ethereum-types": "^1.1.2", "lodash": "^4.17.10", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index c87cbb65a..2f57f5097 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -1,6 +1,6 @@ { "name": "@0x/json-schemas", - "version": "2.0.1", + "version": "2.1.0", "engines": { "node": ">=6.12" }, diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 35a0834f2..250730d26 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -1,6 +1,6 @@ { "name": "@0x/metacoin", - "version": "0.0.25", + "version": "0.0.26", "engines": { "node": ">=6.12" }, @@ -30,14 +30,14 @@ "license": "Apache-2.0", "dependencies": { "@0x/abi-gen": "^1.0.15", - "@0x/base-contract": "^3.0.3", - "@0x/sol-cov": "^2.1.9", - "@0x/subproviders": "^2.1.1", + "@0x/base-contract": "^3.0.4", + "@0x/sol-cov": "^2.1.10", + "@0x/subproviders": "^2.1.2", "@0x/tslint-config": "^1.0.10", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "@types/mocha": "^5.2.2", "copyfiles": "^2.0.0", "ethereum-types": "^1.1.2", @@ -46,8 +46,8 @@ "run-s": "^0.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.14", - "@0x/sol-compiler": "^1.1.9", + "@0x/dev-utils": "^1.0.15", + "@0x/sol-compiler": "^1.1.10", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", "chai-bignumber": "^2.0.1", diff --git a/packages/migrations/package.json b/packages/migrations/package.json index d8c5fb6c2..cbab964d5 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -1,6 +1,6 @@ { "name": "@0x/migrations", - "version": "2.0.1", + "version": "2.0.2", "engines": { "node": ">=6.12" }, @@ -17,7 +17,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0x/dev-utils": "^1.0.14", + "@0x/dev-utils": "^1.0.15", "@0x/tslint-config": "^1.0.10", "@0x/types": "^1.2.1", "@types/yargs": "^10.0.0", @@ -29,16 +29,16 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.2", - "@0x/base-contract": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.3", + "@0x/base-contract": "^3.0.4", "@0x/contract-addresses": "^1.1.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/order-utils": "^2.0.1", - "@0x/sol-compiler": "^1.1.9", - "@0x/subproviders": "^2.1.1", + "@0x/order-utils": "^3.0.0", + "@0x/sol-compiler": "^1.1.10", + "@0x/subproviders": "^2.1.2", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "@ledgerhq/hw-app-eth": "^4.3.0", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index d6fb9892e..060150f96 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/order-utils", - "version": "2.0.1", + "version": "3.0.0", "engines": { "node": ">=6.12" }, @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md", "devDependencies": { - "@0x/dev-utils": "^1.0.14", + "@0x/dev-utils": "^1.0.15", "@0x/tslint-config": "^1.0.10", "@types/bn.js": "^4.11.0", "@types/lodash": "4.14.104", @@ -53,15 +53,15 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.2", - "@0x/assert": "^1.0.15", - "@0x/base-contract": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.3", + "@0x/assert": "^1.0.16", + "@0x/base-contract": "^3.0.4", "@0x/contract-artifacts": "^1.1.0", - "@0x/json-schemas": "^2.0.1", + "@0x/json-schemas": "^2.1.0", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "@types/node": "*", "bn.js": "^4.11.8", "ethereum-types": "^1.1.2", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 174e0a3a6..6bb1ef485 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@0x/order-watcher", - "version": "2.2.1", + "version": "2.2.2", "description": "An order watcher daemon that watches for order validity", "keywords": [ "0x", @@ -33,8 +33,8 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.14", - "@0x/migrations": "^2.0.1", + "@0x/dev-utils": "^1.0.15", + "@0x/migrations": "^2.0.2", "@0x/tslint-config": "^1.0.10", "@types/bintrees": "^1.0.2", "@types/lodash": "4.14.104", @@ -57,19 +57,19 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.2", - "@0x/assert": "^1.0.15", - "@0x/base-contract": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.3", + "@0x/assert": "^1.0.16", + "@0x/base-contract": "^3.0.4", "@0x/contract-addresses": "^1.1.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/contract-wrappers": "^3.0.1", - "@0x/fill-scenarios": "^1.0.9", - "@0x/json-schemas": "^2.0.1", - "@0x/order-utils": "^2.0.1", + "@0x/contract-wrappers": "^4.0.0", + "@0x/fill-scenarios": "^1.0.10", + "@0x/json-schemas": "^2.1.0", + "@0x/order-utils": "^3.0.0", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "bintrees": "^1.0.2", "ethereum-types": "^1.1.2", "ethereumjs-blockstream": "6.0.0", diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index 827a54fdb..fb1d6d78c 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -1,6 +1,6 @@ { "name": "@0x/react-docs", - "version": "1.0.15", + "version": "1.0.16", "engines": { "node": ">=6.12" }, @@ -24,7 +24,7 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0x/dev-utils": "^1.0.14", + "@0x/dev-utils": "^1.0.15", "@0x/tslint-config": "^1.0.10", "@types/compare-versions": "^3.0.0", "@types/styled-components": "^4.0.0", @@ -34,7 +34,7 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/react-shared": "^1.0.18", + "@0x/react-shared": "^1.0.19", "@0x/types": "^1.2.1", "@0x/utils": "^2.0.4", "@types/lodash": "4.14.104", diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 35a69f105..1336ce2dd 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -1,6 +1,6 @@ { "name": "@0x/react-shared", - "version": "1.0.18", + "version": "1.0.19", "engines": { "node": ">=6.12" }, @@ -25,7 +25,7 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0x/dev-utils": "^1.0.14", + "@0x/dev-utils": "^1.0.15", "@0x/tslint-config": "^1.0.10", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 766c789df..7c27dbc19 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-compiler", - "version": "1.1.9", + "version": "1.1.10", "engines": { "node": ">=6.12" }, @@ -42,7 +42,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md", "devDependencies": { - "@0x/dev-utils": "^1.0.14", + "@0x/dev-utils": "^1.0.15", "@0x/tslint-config": "^1.0.10", "@types/mkdirp": "^0.5.2", "@types/require-from-string": "^1.2.0", @@ -65,13 +65,13 @@ "zeppelin-solidity": "1.8.0" }, "dependencies": { - "@0x/assert": "^1.0.15", - "@0x/json-schemas": "^2.0.1", + "@0x/assert": "^1.0.16", + "@0x/json-schemas": "^2.1.0", "@0x/sol-resolver": "^1.0.16", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "@types/yargs": "^11.0.0", "chalk": "^2.3.0", "ethereum-types": "^1.1.2", diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index 34e7a8559..613bce8d3 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-cov", - "version": "2.1.9", + "version": "2.1.10", "engines": { "node": ">=6.12" }, @@ -42,12 +42,12 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md", "dependencies": { - "@0x/dev-utils": "^1.0.14", - "@0x/sol-compiler": "^1.1.9", - "@0x/subproviders": "^2.1.1", + "@0x/dev-utils": "^1.0.15", + "@0x/sol-compiler": "^1.1.10", + "@0x/subproviders": "^2.1.2", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "@types/solidity-parser-antlr": "^0.2.0", "ethereum-types": "^1.1.2", "ethereumjs-util": "^5.1.1", diff --git a/packages/sol-doc/package.json b/packages/sol-doc/package.json index 0eb5d6fd5..102911acc 100644 --- a/packages/sol-doc/package.json +++ b/packages/sol-doc/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-doc", - "version": "1.0.4", + "version": "1.0.5", "description": "Solidity documentation generator", "main": "lib/src/index.js", "types": "lib/src/index.d.js", @@ -25,7 +25,7 @@ "author": "F. Eugene Aumson", "license": "Apache-2.0", "dependencies": { - "@0x/sol-compiler": "^1.1.9", + "@0x/sol-compiler": "^1.1.10", "@0x/types": "^1.2.1", "@0x/utils": "^2.0.4", "ethereum-types": "^1.1.2", diff --git a/packages/sra-spec/package.json b/packages/sra-spec/package.json index e3b6ad979..1b7d0ccab 100644 --- a/packages/sra-spec/package.json +++ b/packages/sra-spec/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sra-spec", - "version": "1.0.8", + "version": "1.0.9", "engines": { "node": ">=6.12" }, @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md", "dependencies": { - "@0x/json-schemas": "^2.0.1", + "@0x/json-schemas": "^2.1.0", "@loopback/openapi-v3-types": "^0.8.2" }, "devDependencies": { diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 1a25b5e32..c5a1dc3d1 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -1,6 +1,6 @@ { "name": "@0x/subproviders", - "version": "2.1.1", + "version": "2.1.2", "engines": { "node": ">=6.12" }, @@ -29,11 +29,11 @@ } }, "dependencies": { - "@0x/assert": "^1.0.15", + "@0x/assert": "^1.0.16", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "@ledgerhq/hw-app-eth": "^4.3.0", "@ledgerhq/hw-transport-u2f": "4.24.0", "@types/eth-lightwallet": "^3.0.0", diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index c46f5465a..fec328ec7 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@0x/testnet-faucets", - "version": "1.0.53", + "version": "1.0.54", "engines": { "node": ">=6.12" }, @@ -18,11 +18,11 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^2.0.1", - "@0x/subproviders": "^2.1.1", + "0x.js": "^2.0.2", + "@0x/subproviders": "^2.1.2", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "body-parser": "^1.17.1", "ethereum-types": "^1.1.2", "ethereumjs-tx": "^1.3.5", diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 2b87cc92a..9f3bfe3c3 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@0x/web3-wrapper", - "version": "3.1.1", + "version": "3.1.2", "engines": { "node": ">=6.12" }, @@ -53,8 +53,8 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/assert": "^1.0.15", - "@0x/json-schemas": "^2.0.1", + "@0x/assert": "^1.0.16", + "@0x/json-schemas": "^2.1.0", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", "ethereum-types": "^1.1.2", diff --git a/packages/website/package.json b/packages/website/package.json index fd671d85d..143751656 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "@0x/website", - "version": "0.0.56", + "version": "0.0.57", "engines": { "node": ">=6.12" }, @@ -20,16 +20,16 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "@0x/contract-wrappers": "^3.0.1", - "@0x/json-schemas": "^2.0.1", - "@0x/order-utils": "^2.0.1", - "@0x/react-docs": "^1.0.15", - "@0x/react-shared": "^1.0.18", - "@0x/subproviders": "^2.1.1", + "@0x/contract-wrappers": "^4.0.0", + "@0x/json-schemas": "^2.1.0", + "@0x/order-utils": "^3.0.0", + "@0x/react-docs": "^1.0.16", + "@0x/react-shared": "^1.0.19", + "@0x/subproviders": "^2.1.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.1", + "@0x/web3-wrapper": "^3.1.2", "accounting": "^0.4.1", "basscss": "^8.0.3", "blockies": "^0.0.2", -- cgit v1.2.3 From 853c77dc092d1e4bef84e89aef4f62cf1b8aa793 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 12 Nov 2018 09:07:54 -0800 Subject: Update packages/order-watcher/CHANGELOG.json Co-Authored-By: WyseNynja --- packages/order-watcher/CHANGELOG.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index 840e55698..4f3b58f7f 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -3,7 +3,7 @@ "version": "2.2.2", "changes": [ { - "note": "start jsonRpcRequestId at 1, not 0", + "note": "Start jsonRpcRequestId at 1, not 0 as 0 breaks Parity websocket RPC", "pr": 1227 } ], -- cgit v1.2.3 From 08797392e0c3d89289cf7e298c42eedff4de9de0 Mon Sep 17 00:00:00 2001 From: Fabio B Date: Mon, 12 Nov 2018 09:08:02 -0800 Subject: Update packages/order-watcher/CHANGELOG.json Co-Authored-By: WyseNynja --- packages/order-watcher/CHANGELOG.json | 1 - 1 file changed, 1 deletion(-) (limited to 'packages') diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index 4f3b58f7f..568e39a27 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -7,7 +7,6 @@ "pr": 1227 } ], - "timestamp": 1541977777 }, { "version": "2.2.1", -- cgit v1.2.3 From 22f217807d44e364cad6ebe90560326a755cdd11 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 12 Nov 2018 09:08:23 -0800 Subject: Update CHANGELOG.json --- packages/order-watcher/CHANGELOG.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index 568e39a27..44d3c5aaa 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -6,7 +6,7 @@ "note": "Start jsonRpcRequestId at 1, not 0 as 0 breaks Parity websocket RPC", "pr": 1227 } - ], + ] }, { "version": "2.2.1", -- cgit v1.2.3 From cdf78494d5884f44b7459e350e41109beea20d43 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 12 Nov 2018 09:12:59 -0800 Subject: Update CHANGELOG.json --- packages/order-watcher/CHANGELOG.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index 728c15c9a..dbb4824fc 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -3,7 +3,7 @@ "version": "2.2.3", "changes": [ { - "note": "Start jsonRpcRequestId at 1, not 0 as 0 breaks Parity websocket RPC", + "note": "Start jsonRpcRequestId at 1, not 0 as 0 breaks the web3.js websocket RPC provider", "pr": 1227 } ] -- cgit v1.2.3 From b82148ea60b5316d346968bd76cbd35346e85d78 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Sun, 11 Nov 2018 20:58:17 -0800 Subject: feat(instant): add extra asset metadata --- packages/instant/src/data/asset_meta_data_map.ts | 163 ++++++++++++++++++++--- 1 file changed, 141 insertions(+), 22 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/data/asset_meta_data_map.ts b/packages/instant/src/data/asset_meta_data_map.ts index 970b6c383..6ecb9af85 100644 --- a/packages/instant/src/data/asset_meta_data_map.ts +++ b/packages/instant/src/data/asset_meta_data_map.ts @@ -8,42 +8,42 @@ export const assetMetaDataMap: ObjectMap = { '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: 'rgb(54, 50, 60)', + primaryColor: '#333333', symbol: 'zrx', name: '0x', }, '0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: '#ec3e6c', + primaryColor: '#EC4F81', symbol: 'spank', name: 'Spank', }, '0xf47261b0000000000000000000000000d26114cd6ee289accf82350c8d8487fedb8a0c07': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: '#2e61ea', + primaryColor: '#2458E7', symbol: 'omg', name: 'OmiseGo', }, '0xf47261b00000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: '#87e4ca', + primaryColor: '#68CCBB', symbol: 'mkr', name: 'Maker', }, '0xf47261b00000000000000000000000000d8775f648430679a709e98d2b0cb6250d2887ef': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: '#9c326c', + primaryColor: '#FF5000', symbol: 'bat', name: 'Basic Attention Token', }, '0xf47261b0000000000000000000000000744d70fdbe2ba4cf95131626614a1763df805b9e': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: '#5663b0', + primaryColor: '#4763D7', symbol: 'snt', name: 'Status', }, @@ -54,32 +54,151 @@ export const assetMetaDataMap: ObjectMap = { symbol: 'mana', name: 'Decentraland', }, - '0xf47261b0000000000000000000000000a74476443119a942de498590fe1f2454d7d4ac0d': { + '0xf47261b00000000000000000000000001985365e9f78359a9b6ad760e32412f4a445e862': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: '#263469', - symbol: 'gnt', - name: 'Golem', + primaryColor: '#512D80', + symbol: 'rep', + name: 'Augur', }, - '0xf47261b000000000000000000000000012480e24eb5bec1a9d4369cab6a80cad3c0a377a': { + '0xf47261b00000000000000000000000000abdace70d3790235af448c88547603b945604ea': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: '#de5445', - symbol: 'sub', - name: 'Substratum', + primaryColor: '#2c3c8c', + symbol: 'dnt', + name: 'district0x', }, - '0xf47261b000000000000000000000000008d32b0da63e2C3bcF8019c9c5d849d7a9d791e6': { + '0xf47261b000000000000000000000000005f4a42e251f2d52b8ed15e9fedaacfcef1fad27': { + assetProxyId: AssetProxyId.ERC20, + decimals: 12, + primaryColor: '#048998', + symbol: 'zil', + name: 'Zilliqa', + }, + '0xf47261b00000000000000000000000008f8221afbb33998d8584a2b05749ba73c37a938a': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: '#000', - symbol: 'dentacoin', - name: 'Dentacoin', + primaryColor: '#58BFD6', + symbol: 'req', + name: 'Request Network', }, - '0xf47261b00000000000000000000000001985365e9f78359a9b6ad760e32412f4a445e862': { + '0xf47261b0000000000000000000000000e0b7927c4af23765cb51314a0e0521a9645f0e2a': { + assetProxyId: AssetProxyId.ERC20, + decimals: 9, + primaryColor: '#BC9952', + symbol: 'dgd', + name: 'DigixDao', + }, + '0xf47261b00000000000000000000000004f3afec4e5a3f2a6a1a411def7d7dfe50ee057bf': { + assetProxyId: AssetProxyId.ERC20, + decimals: 9, + primaryColor: '#DEB564', + symbol: 'dgx', + name: 'Digix Gold Token', + }, + '0xf47261b0000000000000000000000000419d0d8bdd9af5e606ae2232ed285aff190e711b': { + assetProxyId: AssetProxyId.ERC20, + decimals: 8, + primaryColor: '#E40057', + symbol: 'fun', + name: 'FunFair', + }, + '0xf47261b000000000000000000000000041e5560054824ea6b0732e656e3ad64e20e94e45': { + assetProxyId: AssetProxyId.ERC20, + decimals: 8, + primaryColor: '#04bc24', + symbol: 'cvc', + name: 'Civic', + }, + '0xf47261b00000000000000000000000005ca9a71b1d01849c0a95490cc00559717fcf0d1d': { assetProxyId: AssetProxyId.ERC20, decimals: 18, - primaryColor: '#512D80', - symbol: 'rep', - name: 'Augur', + primaryColor: '#F7296E', + symbol: 'ae', + name: 'Aeternity', + }, + '0xf47261b0000000000000000000000000408e41876cccdc0f92210600ef50372656052a38': { + assetProxyId: AssetProxyId.ERC20, + decimals: 18, + primaryColor: '#233C5A', + symbol: 'ren', + name: 'Republic Protocol', + }, + '0xf47261b0000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca': { + assetProxyId: AssetProxyId.ERC20, + decimals: 18, + primaryColor: '#325CD2', + symbol: 'link', + name: 'ChainLink', + }, + '0xf47261b00000000000000000000000006810e776880c02933d47db1b9fc05908e5386b96': { + assetProxyId: AssetProxyId.ERC20, + decimals: 18, + primaryColor: '#48A4C0', + symbol: 'gno', + name: 'Gnosis', + }, + '0xf47261b0000000000000000000000000960b236a07cf122663c4303350609a66a7b288c0': { + assetProxyId: AssetProxyId.ERC20, + decimals: 18, + primaryColor: '#04a29e', + symbol: 'ant', + name: 'Aragon', + }, + '0xf47261b00000000000000000000000004156d3342d5c385a87d264f90653733592000581': { + assetProxyId: AssetProxyId.ERC20, + decimals: 8, + primaryColor: '#4CABA7', + symbol: 'salt', + name: 'Salt', + }, + '0xf47261b0000000000000000000000000595832f8fc6bf59c85c527fec3740a1b7a361269': { + assetProxyId: AssetProxyId.ERC20, + decimals: 6, + primaryColor: '#5BC9D4', + symbol: 'powr', + name: 'PowerLedger', + }, + '0xf47261b00000000000000000000000008eb24319393716668d768dcec29356ae9cffe285': { + assetProxyId: AssetProxyId.ERC20, + decimals: 8, + primaryColor: '#523CE8', + symbol: 'agi', + name: 'SingularityNET', + }, + '0xf47261b000000000000000000000000039bb259f66e1c59d5abef88375979b4d20d98022': { + assetProxyId: AssetProxyId.ERC20, + decimals: 8, + primaryColor: '#EDB740', + symbol: 'wax', + name: 'WAX', + }, + '0xf47261b0000000000000000000000000beb9ef514a379b997e0798fdcc901ee474b6d9a1': { + assetProxyId: AssetProxyId.ERC20, + decimals: 18, + primaryColor: '#333333', + symbol: 'mln', + name: 'Melon', + }, + '0xf47261b000000000000000000000000058b6a8a3302369daec383334672404ee733ab239': { + assetProxyId: AssetProxyId.ERC20, + decimals: 18, + primaryColor: '#232D37', + symbol: 'lpt', + name: 'Livepeer', + }, + '0xf47261b000000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a': { + assetProxyId: AssetProxyId.ERC20, + decimals: 4, + primaryColor: '#3A74F6', + symbol: 'ast', + name: 'AirSwap', + }, + '0xf47261b000000000000000000000000089d24a6b4ccb1b6faa2625fe562bdd9a23260359': { + assetProxyId: AssetProxyId.ERC20, + decimals: 18, + primaryColor: '#F2B350', + symbol: 'dai', + name: 'Dai Stablecoin', }, }; -- cgit v1.2.3 From 79f0324abc6e59d5595770e44d620e6d0cccd6bc Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 12 Nov 2018 13:30:47 -0800 Subject: feat: integrate wallet flow with heartbeat and other branches --- .../instant/src/components/buy_order_progress.tsx | 2 +- packages/instant/src/components/payment_method.tsx | 12 ++-- .../src/components/zero_ex_instant_provider.tsx | 7 ++- .../containers/connected_account_payment_method.ts | 39 +++++++++++-- packages/instant/src/redux/async_data.ts | 65 ++++++++++++---------- packages/instant/src/util/heartbeater_factory.ts | 4 +- 6 files changed, 81 insertions(+), 48 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/buy_order_progress.tsx b/packages/instant/src/components/buy_order_progress.tsx index cb02c8d8c..d93e74c9f 100644 --- a/packages/instant/src/components/buy_order_progress.tsx +++ b/packages/instant/src/components/buy_order_progress.tsx @@ -1,7 +1,7 @@ import * as _ from 'lodash'; import * as React from 'react'; -import { ProgressBar, TimedProgressBar } from '../components/timed_progress_bar'; +import { TimedProgressBar } from '../components/timed_progress_bar'; import { TimeCounter } from '../components/time_counter'; import { Container } from '../components/ui/container'; diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index f596c5ad6..25c879519 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -2,7 +2,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { ColorOption } from '../style/theme'; -import { Account, AccountState, Network, StandardSlidingPanelContent } from '../types'; +import { Account, AccountState, Network } from '../types'; import { MetaMaskLogo } from './meta_mask_logo'; import { PaymentMethodDropdown } from './payment_method_dropdown'; @@ -15,7 +15,8 @@ import { Text } from './ui/text'; export interface PaymentMethodProps { account: Account; network: Network; - openStandardSlidingPanel: (content: StandardSlidingPanelContent) => void; + onInstallWalletClick: () => void; + onUnlockWalletClick: () => void; } export class PaymentMethod extends React.Component { @@ -80,7 +81,7 @@ export class PaymentMethod extends React.Component { case AccountState.Locked: return ( } > Please Unlock MetaMask @@ -89,7 +90,7 @@ export class PaymentMethod extends React.Component { case AccountState.None: return ( } > Install MetaMask @@ -107,9 +108,6 @@ export class PaymentMethod extends React.Component { return null; } }; - private readonly _openInstallWalletPanel = () => { - this.props.openStandardSlidingPanel(StandardSlidingPanelContent.InstallWallet); - }; } interface WalletPromptProps { diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 411f118cc..863bc99b7 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -91,12 +91,13 @@ export class ZeroExInstantProvider extends React.Component void; + onInstallWalletClick: () => void; + unlockWalletAndDispatchToStore: (providerState: ProviderState) => void; +} + +interface ConnectedProps { + onInstallWalletClick: () => void; + onUnlockWalletClick: () => void; + account: Account; + network: Network; } +type FinalProps = ConnectedProps & ConnectedAccountPaymentMethodProps; + const mapStateToProps = (state: State, _ownProps: ConnectedAccountPaymentMethodProps): ConnectedState => ({ - account: state.providerState.account, network: state.network, + providerState: state.providerState, }); const mapDispatchToProps = ( dispatch: Dispatch, ownProps: ConnectedAccountPaymentMethodProps, ): ConnectedDispatch => ({ - openStandardSlidingPanel: (content: StandardSlidingPanelContent) => - dispatch(actions.openStandardSlidingPanel(content)), + onInstallWalletClick: () => dispatch(actions.openStandardSlidingPanel(StandardSlidingPanelContent.InstallWallet)), + unlockWalletAndDispatchToStore: async (providerState: ProviderState) => + asyncData.fetchAccountInfoAndDispatchToStore(providerState, dispatch, true), +}); + +const mergeProps = ( + connectedState: ConnectedState, + connectedDispatch: ConnectedDispatch, + ownProps: ConnectedAccountPaymentMethodProps, +): FinalProps => ({ + ...ownProps, + network: connectedState.network, + account: connectedState.providerState.account, + onInstallWalletClick: connectedDispatch.onInstallWalletClick, + onUnlockWalletClick: () => { + connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState); + }, }); export const ConnectedAccountPaymentMethod: React.ComponentClass = connect( mapStateToProps, mapDispatchToProps, + mergeProps, )(PaymentMethod); diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts index b920ac914..8999ef097 100644 --- a/packages/instant/src/redux/async_data.ts +++ b/packages/instant/src/redux/async_data.ts @@ -1,71 +1,75 @@ import { AssetProxyId } from '@0x/types'; import * as _ from 'lodash'; +import { Dispatch } from 'redux'; import { BIG_NUMBER_ZERO } from '../constants'; -import { AccountState, ERC20Asset, OrderProcessState } from '../types'; +import { AccountState, ERC20Asset, OrderProcessState, ProviderState } from '../types'; import { assetUtils } from '../util/asset'; import { buyQuoteUpdater } from '../util/buy_quote_updater'; import { coinbaseApi } from '../util/coinbase_api'; import { errorFlasher } from '../util/error_flasher'; import { actions } from './actions'; -import { Store } from './store'; +import { State } from './reducer'; export const asyncData = { - fetchEthPriceAndDispatchToStore: async (store: Store) => { + fetchEthPriceAndDispatchToStore: async (dispatch: Dispatch) => { try { const ethUsdPrice = await coinbaseApi.getEthUsdPrice(); - store.dispatch(actions.updateEthUsdPrice(ethUsdPrice)); + dispatch(actions.updateEthUsdPrice(ethUsdPrice)); } catch (e) { const errorMessage = 'Error fetching ETH/USD price'; - errorFlasher.flashNewErrorMessage(store.dispatch, errorMessage); - store.dispatch(actions.updateEthUsdPrice(BIG_NUMBER_ZERO)); + errorFlasher.flashNewErrorMessage(dispatch, errorMessage); + dispatch(actions.updateEthUsdPrice(BIG_NUMBER_ZERO)); } }, - fetchAvailableAssetDatasAndDispatchToStore: async (store: Store) => { - const { providerState, assetMetaDataMap, network } = store.getState(); + fetchAvailableAssetDatasAndDispatchToStore: async (state: State, dispatch: Dispatch) => { + const { providerState, assetMetaDataMap, network } = state; const assetBuyer = providerState.assetBuyer; try { const assetDatas = await assetBuyer.getAvailableAssetDatasAsync(); const assets = assetUtils.createAssetsFromAssetDatas(assetDatas, assetMetaDataMap, network); - store.dispatch(actions.setAvailableAssets(assets)); + dispatch(actions.setAvailableAssets(assets)); } catch (e) { const errorMessage = 'Could not find any assets'; - errorFlasher.flashNewErrorMessage(store.dispatch, errorMessage); + errorFlasher.flashNewErrorMessage(dispatch, errorMessage); // On error, just specify that none are available - store.dispatch(actions.setAvailableAssets([])); + dispatch(actions.setAvailableAssets([])); } }, - fetchAccountInfoAndDispatchToStore: async (options: { store: Store; shouldSetToLoading: boolean }) => { - const { store, shouldSetToLoading } = options; - const { providerState } = store.getState(); + fetchAccountInfoAndDispatchToStore: async ( + providerState: ProviderState, + dispatch: Dispatch, + shouldAttemptUnlock: boolean = false, + shouldSetToLoading: boolean = false, + ) => { const web3Wrapper = providerState.web3Wrapper; const provider = providerState.provider; if (shouldSetToLoading && providerState.account.state !== AccountState.Loading) { - store.dispatch(actions.setAccountStateLoading()); + dispatch(actions.setAccountStateLoading()); } let availableAddresses: string[]; try { // TODO(bmillman): Add support at the web3Wrapper level for calling `eth_requestAccounts` instead of calling enable here const isPrivacyModeEnabled = !_.isUndefined((provider as any).enable); - availableAddresses = isPrivacyModeEnabled - ? await (provider as any).enable() - : await web3Wrapper.getAvailableAddressesAsync(); + availableAddresses = + isPrivacyModeEnabled && shouldAttemptUnlock + ? await (provider as any).enable() + : await web3Wrapper.getAvailableAddressesAsync(); } catch (e) { - store.dispatch(actions.setAccountStateLocked()); + dispatch(actions.setAccountStateLocked()); return; } if (!_.isEmpty(availableAddresses)) { const activeAddress = availableAddresses[0]; - store.dispatch(actions.setAccountStateReady(activeAddress)); + dispatch(actions.setAccountStateReady(activeAddress)); // tslint:disable-next-line:no-floating-promises - asyncData.fetchAccountBalanceAndDispatchToStore(store); + asyncData.fetchAccountBalanceAndDispatchToStore(providerState, dispatch); } else { - store.dispatch(actions.setAccountStateLocked()); + dispatch(actions.setAccountStateLocked()); } }, - fetchAccountBalanceAndDispatchToStore: async (store: Store) => { - const { providerState } = store.getState(); + fetchAccountBalanceAndDispatchToStore: async (providerState: ProviderState, dispatch: Dispatch) => { const web3Wrapper = providerState.web3Wrapper; const account = providerState.account; if (account.state !== AccountState.Ready) { @@ -74,15 +78,18 @@ export const asyncData = { try { const address = account.address; const ethBalanceInWei = await web3Wrapper.getBalanceInWeiAsync(address); - store.dispatch(actions.updateAccountEthBalance({ address, ethBalanceInWei })); + dispatch(actions.updateAccountEthBalance({ address, ethBalanceInWei })); } catch (e) { // leave balance as is return; } }, - fetchCurrentBuyQuoteAndDispatchToStore: async (options: { store: Store; shouldSetPending: boolean }) => { - const { store, shouldSetPending } = options; - const { buyOrderState, providerState, selectedAsset, selectedAssetAmount, affiliateInfo } = store.getState(); + fetchCurrentBuyQuoteAndDispatchToStore: async ( + state: State, + dispatch: Dispatch, + shouldSetPending: boolean = false, + ) => { + const { buyOrderState, providerState, selectedAsset, selectedAssetAmount, affiliateInfo } = state; const assetBuyer = providerState.assetBuyer; if ( !_.isUndefined(selectedAssetAmount) && @@ -92,7 +99,7 @@ export const asyncData = { ) { await buyQuoteUpdater.updateBuyQuoteAsync( assetBuyer, - store.dispatch, + dispatch, selectedAsset as ERC20Asset, selectedAssetAmount, shouldSetPending, diff --git a/packages/instant/src/util/heartbeater_factory.ts b/packages/instant/src/util/heartbeater_factory.ts index 96a8ac4e6..06fcdb8bb 100644 --- a/packages/instant/src/util/heartbeater_factory.ts +++ b/packages/instant/src/util/heartbeater_factory.ts @@ -10,13 +10,13 @@ export interface HeartbeatFactoryOptions { export const generateAccountHeartbeater = (options: HeartbeatFactoryOptions): Heartbeater => { const { store, shouldPerformImmediatelyOnStart } = options; return new Heartbeater(async () => { - await asyncData.fetchAccountInfoAndDispatchToStore({ store, shouldSetToLoading: false }); + await asyncData.fetchAccountInfoAndDispatchToStore(store.getState().providerState, store.dispatch, false); }, shouldPerformImmediatelyOnStart); }; export const generateBuyQuoteHeartbeater = (options: HeartbeatFactoryOptions): Heartbeater => { const { store, shouldPerformImmediatelyOnStart } = options; return new Heartbeater(async () => { - await asyncData.fetchCurrentBuyQuoteAndDispatchToStore({ store, shouldSetPending: false }); + await asyncData.fetchCurrentBuyQuoteAndDispatchToStore(store.getState(), store.dispatch, false); }, shouldPerformImmediatelyOnStart); }; -- cgit v1.2.3 From 711b307e6c56457647a98c6d76725aa90ac0d53e Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 12 Nov 2018 15:28:54 -0800 Subject: feat: prevent eth balance blink --- packages/instant/src/redux/async_data.ts | 6 +++--- packages/instant/src/redux/reducer.ts | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts index 8999ef097..2682677b9 100644 --- a/packages/instant/src/redux/async_data.ts +++ b/packages/instant/src/redux/async_data.ts @@ -72,9 +72,9 @@ export const asyncData = { fetchAccountBalanceAndDispatchToStore: async (providerState: ProviderState, dispatch: Dispatch) => { const web3Wrapper = providerState.web3Wrapper; const account = providerState.account; - if (account.state !== AccountState.Ready) { - return; - } + // if (account.state !== AccountState.Ready) { + // return; + // } try { const address = account.address; const ethBalanceInWei = await web3Wrapper.getBalanceInWeiAsync(address); diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index 4688250bc..28f094184 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -73,11 +73,16 @@ export const createReducer = (initialState: State) => { case ActionTypes.SET_ACCOUNT_STATE_LOCKED: return reduceStateWithAccount(state, LOCKED_ACCOUNT); case ActionTypes.SET_ACCOUNT_STATE_READY: { - const account: AccountReady = { + const address = action.data; + const newAccount: AccountReady = { state: AccountState.Ready, - address: action.data, + address, }; - return reduceStateWithAccount(state, account); + const currentAccount = state.providerState.account; + if (currentAccount.state === AccountState.Ready && currentAccount.address === address) { + newAccount.ethBalanceInWei = currentAccount.ethBalanceInWei; + } + return reduceStateWithAccount(state, newAccount); } case ActionTypes.UPDATE_ACCOUNT_ETH_BALANCE: { const { address, ethBalanceInWei } = action.data; -- cgit v1.2.3 From 01b36b494996c641a3cb5bd3fd894624a8dad210 Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 12 Nov 2018 17:30:28 -0800 Subject: fix: remove requirement of default case in all switch statements --- packages/instant/src/components/payment_method.tsx | 4 ---- packages/instant/src/components/scaling_input.tsx | 2 -- packages/instant/src/components/standard_sliding_panel.tsx | 2 +- packages/instant/src/redux/async_data.ts | 11 +++-------- packages/instant/src/redux/reducer.ts | 7 +++++-- packages/instant/src/util/asset.ts | 2 -- packages/instant/src/util/etherscan.ts | 3 +-- packages/instant/tslint.json | 3 ++- 8 files changed, 12 insertions(+), 22 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 25c879519..49ec22164 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -51,8 +51,6 @@ export class PaymentMethod extends React.Component { return 'connect your wallet'; case AccountState.Ready: return 'payment method'; - default: - return 'payment method'; } }; private readonly _renderTitleLabel = (): React.ReactNode => { @@ -104,8 +102,6 @@ export class PaymentMethod extends React.Component { network={network} /> ); - default: - return null; } }; } diff --git a/packages/instant/src/components/scaling_input.tsx b/packages/instant/src/components/scaling_input.tsx index 1abadb78b..e1599a316 100644 --- a/packages/instant/src/components/scaling_input.tsx +++ b/packages/instant/src/components/scaling_input.tsx @@ -156,8 +156,6 @@ export class ScalingInput extends React.Component { diff --git a/packages/instant/src/components/standard_sliding_panel.tsx b/packages/instant/src/components/standard_sliding_panel.tsx index 9409d9664..f587ff79a 100644 --- a/packages/instant/src/components/standard_sliding_panel.tsx +++ b/packages/instant/src/components/standard_sliding_panel.tsx @@ -22,7 +22,7 @@ export class StandardSlidingPanel extends React.Component; - default: + case StandardSlidingPanelContent.None: return null; } }; diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts index 2682677b9..15ac31a5a 100644 --- a/packages/instant/src/redux/async_data.ts +++ b/packages/instant/src/redux/async_data.ts @@ -1,4 +1,5 @@ import { AssetProxyId } from '@0x/types'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import { Dispatch } from 'redux'; @@ -64,19 +65,13 @@ export const asyncData = { const activeAddress = availableAddresses[0]; dispatch(actions.setAccountStateReady(activeAddress)); // tslint:disable-next-line:no-floating-promises - asyncData.fetchAccountBalanceAndDispatchToStore(providerState, dispatch); + asyncData.fetchAccountBalanceAndDispatchToStore(activeAddress, providerState.web3Wrapper, dispatch); } else { dispatch(actions.setAccountStateLocked()); } }, - fetchAccountBalanceAndDispatchToStore: async (providerState: ProviderState, dispatch: Dispatch) => { - const web3Wrapper = providerState.web3Wrapper; - const account = providerState.account; - // if (account.state !== AccountState.Ready) { - // return; - // } + fetchAccountBalanceAndDispatchToStore: async (address: string, web3Wrapper: Web3Wrapper, dispatch: Dispatch) => { try { - const address = account.address; const ethBalanceInWei = await web3Wrapper.getBalanceInWeiAsync(address); dispatch(actions.updateAccountEthBalance({ address, ethBalanceInWei })); } catch (e) { diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index 28f094184..3d7c3f483 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -74,13 +74,16 @@ export const createReducer = (initialState: State) => { return reduceStateWithAccount(state, LOCKED_ACCOUNT); case ActionTypes.SET_ACCOUNT_STATE_READY: { const address = action.data; - const newAccount: AccountReady = { + let newAccount: AccountReady = { state: AccountState.Ready, address, }; const currentAccount = state.providerState.account; if (currentAccount.state === AccountState.Ready && currentAccount.address === address) { - newAccount.ethBalanceInWei = currentAccount.ethBalanceInWei; + newAccount = { + ...newAccount, + ethBalanceInWei: currentAccount.ethBalanceInWei, + }; } return reduceStateWithAccount(state, newAccount); } diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts index fbfbb19f3..40560d3eb 100644 --- a/packages/instant/src/util/asset.ts +++ b/packages/instant/src/util/asset.ts @@ -80,8 +80,6 @@ export const assetUtils = { return metaData.symbol.toUpperCase(); case AssetProxyId.ERC721: return metaData.name; - default: - return defaultName; } }, formattedSymbolForAsset: (asset?: ERC20Asset, defaultName: string = '???'): string => { diff --git a/packages/instant/src/util/etherscan.ts b/packages/instant/src/util/etherscan.ts index 4d62c4d9f..f9bf82827 100644 --- a/packages/instant/src/util/etherscan.ts +++ b/packages/instant/src/util/etherscan.ts @@ -8,9 +8,8 @@ const etherscanPrefix = (networkId: number): string | undefined => { return 'kovan.'; case Network.Mainnet: return ''; - default: - return undefined; } + return ''; }; export const etherscanUtil = { diff --git a/packages/instant/tslint.json b/packages/instant/tslint.json index 08b76be97..d43ee8da7 100644 --- a/packages/instant/tslint.json +++ b/packages/instant/tslint.json @@ -3,6 +3,7 @@ "rules": { "custom-no-magic-numbers": false, "semicolon": [true, "always", "ignore-bound-class-methods"], - "max-classes-per-file": false + "max-classes-per-file": false, + "switch-default": false } } -- cgit v1.2.3 From c67632dff5d6f16f303c12f1595af1b813d1402c Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 12 Nov 2018 17:42:56 -0800 Subject: feat: make all button fontsizes 16px by default --- packages/instant/src/components/buy_button.tsx | 1 - packages/instant/src/components/buy_order_state_buttons.tsx | 2 +- packages/instant/src/components/install_wallet_panel_content.tsx | 1 - packages/instant/src/components/placing_order_button.tsx | 2 +- packages/instant/src/components/secondary_button.tsx | 2 -- packages/instant/src/components/ui/button.tsx | 2 +- 6 files changed, 3 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx index c10e07b83..8b6121e43 100644 --- a/packages/instant/src/components/buy_button.tsx +++ b/packages/instant/src/components/buy_button.tsx @@ -43,7 +43,6 @@ export class BuyButton extends React.Component { onClick={this._handleClick} isDisabled={shouldDisableButton} fontColor={ColorOption.white} - fontSize="16px" > Buy diff --git a/packages/instant/src/components/buy_order_state_buttons.tsx b/packages/instant/src/components/buy_order_state_buttons.tsx index 6041bf4f5..e563bec73 100644 --- a/packages/instant/src/components/buy_order_state_buttons.tsx +++ b/packages/instant/src/components/buy_order_state_buttons.tsx @@ -35,7 +35,7 @@ export const BuyOrderStateButtons: React.StatelessComponent - diff --git a/packages/instant/src/components/install_wallet_panel_content.tsx b/packages/instant/src/components/install_wallet_panel_content.tsx index 7000e27f6..546874212 100644 --- a/packages/instant/src/components/install_wallet_panel_content.tsx +++ b/packages/instant/src/components/install_wallet_panel_content.tsx @@ -22,7 +22,6 @@ export const InstallWalletPanelContent: React.StatelessComponent diff --git a/packages/instant/src/components/placing_order_button.tsx b/packages/instant/src/components/placing_order_button.tsx index 74d6b9fc4..2516b90b1 100644 --- a/packages/instant/src/components/placing_order_button.tsx +++ b/packages/instant/src/components/placing_order_button.tsx @@ -7,7 +7,7 @@ import { Container } from './ui/container'; import { Spinner } from './ui/spinner'; export const PlacingOrderButton: React.StatelessComponent<{}> = props => ( - +export class InstallWalletPanelContent extends React.Component { + public render(): React.ReactNode { + const panelProps = this._getStandardPanelContentProps(); + return ; + } + private readonly _getStandardPanelContentProps = (): StandardPanelContentProps => { + const isMobileOS = envUtil.isMobileOperatingSystem(); + const browser = envUtil.getBrowser(); + const operatingSystem = envUtil.getOperatingSystem(); + if (isMobileOS) { + let description = 'Please install the Coinbase Wallet app.'; + let actionText = 'Learn More'; + let actionUrl = COINBASE_WALLET_SITE_URL; + switch (operatingSystem) { + case OperatingSystem.Android: + description = 'Please install the Coinbase Wallet app from the Google Play Store.'; + actionText = 'Get Coinbase Wallet'; + actionUrl = COINBASE_WALLET_ANDROID_APP_STORE_URL; + break; + case OperatingSystem.iOS: + description = 'Please install the Coinbase Wallet app from the iOS App Store.'; + actionText = 'Get Coinbase Wallet'; + actionUrl = COINBASE_WALLET_IOS_APP_STORE_URL; + break; + default: + break; + } + return { + image: , + description, + moreInfoSettings: { + href: COINBASE_WALLET_SITE_URL, + text: 'What is Coinbase Wallet?', + }, + action: ( + + ), + }; + } else { + let description = 'Please install the MetaMask wallet browser extension.'; + let actionText = 'Learn More'; + let actionUrl = META_MASK_SITE_URL; + switch (browser) { + case Browser.Chrome: + description = 'Please install the MetaMask wallet browser extension from the Chrome Store.'; + actionText = 'Get Chrome Extension'; + actionUrl = META_MASK_CHROME_STORE_URL; + break; + case Browser.Firefox: + description = 'Please install the MetaMask wallet browser extension from the Firefox Store.'; + actionText = 'Get Firefox Extension'; + actionUrl = META_MASK_FIREFOX_STORE_URL; + break; + case Browser.Opera: + description = 'Please install the MetaMask wallet browser extension from the Opera Store.'; + actionText = 'Get Opera Add-on'; + actionUrl = META_MASK_OPERA_STORE_URL; + break; + default: + break; + } + return { + image: , + title: 'Install MetaMask', + description, + moreInfoSettings: { + href: META_MASK_SITE_URL, + text: 'What is MetaMask?', + }, + action: ( + + ), + }; } - /> -); + }; +} diff --git a/packages/instant/src/components/meta_mask_logo.tsx b/packages/instant/src/components/meta_mask_logo.tsx index d1ad10c23..bfbc67270 100644 --- a/packages/instant/src/components/meta_mask_logo.tsx +++ b/packages/instant/src/components/meta_mask_logo.tsx @@ -72,6 +72,8 @@ export const MetaMaskLogo: React.StatelessComponent = ({ widt ); +MetaMaskLogo.displayName = 'MetaMaskLogo'; + MetaMaskLogo.defaultProps = { width: 85, height: 80, diff --git a/packages/instant/src/components/standard_panel_content.tsx b/packages/instant/src/components/standard_panel_content.tsx index 89e4da70c..582b3318e 100644 --- a/packages/instant/src/components/standard_panel_content.tsx +++ b/packages/instant/src/components/standard_panel_content.tsx @@ -13,7 +13,7 @@ export interface MoreInfoSettings { export interface StandardPanelContentProps { image: React.ReactNode; - title: string; + title?: string; description: string; moreInfoSettings?: MoreInfoSettings; action: React.ReactNode; @@ -31,11 +31,13 @@ export const StandardPanelContent: React.StatelessComponent {image} - - - {title} - - + {title && ( + + + {title} + + + )} {description} diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index 2bf7849ec..8170ae354 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -19,8 +19,13 @@ export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info'; export const COINBASE_API_BASE_URL = 'https://api.coinbase.com/v2'; export const PROGRESS_STALL_AT_WIDTH = '95%'; export const PROGRESS_FINISH_ANIMATION_TIME_MS = 200; +export const COINBASE_WALLET_IOS_APP_STORE_URL = 'https://itunes.apple.com/us/app/coinbase-wallet/id1278383455?mt=8'; +export const COINBASE_WALLET_ANDROID_APP_STORE_URL = 'https://play.google.com/store/apps/details?id=org.toshi&hl=en'; +export const COINBASE_WALLET_SITE_URL = 'https://wallet.coinbase.com/'; +export const META_MASK_FIREFOX_STORE_URL = 'https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/'; export const META_MASK_CHROME_STORE_URL = 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en'; +export const META_MASK_OPERA_STORE_URL = 'https://addons.opera.com/en/extensions/details/metamask/'; export const META_MASK_SITE_URL = 'https://metamask.io/'; export const ETHEREUM_NODE_URL_BY_NETWORK = { [Network.Mainnet]: 'https://mainnet.infura.io/', diff --git a/packages/instant/src/style/theme.ts b/packages/instant/src/style/theme.ts index 1e9f55e00..489f11dc3 100644 --- a/packages/instant/src/style/theme.ts +++ b/packages/instant/src/style/theme.ts @@ -17,6 +17,7 @@ export enum ColorOption { darkOrange = 'darkOrange', green = 'green', red = 'red', + blue = 'blue', } export const theme: Theme = { @@ -32,6 +33,7 @@ export const theme: Theme = { darkOrange: '#F2994C', green: '#3CB34F', red: '#D00000', + blue: '#135df6', }; export const transparentWhite = 'rgba(255,255,255,0.3)'; diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index b6f449f38..e2ba9238a 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -137,3 +137,22 @@ export interface StandardSlidingPanelSettings { animationState: SlideAnimationState; content: StandardSlidingPanelContent; } + +export enum Browser { + Chrome = 'Chrome', + Firefox = 'Firefox', + Opera = 'Opera', + Safari = 'Safari', + Edge = 'Edge', + Other = 'Other', +} + +export enum OperatingSystem { + Android = 'Android', + iOS = 'iOS', + Mac = 'Mac', + Windows = 'Windows', + WindowsPhone = 'WindowsPhone', + Linux = 'Linux', + Other = 'Other', +} diff --git a/packages/instant/src/util/env.ts b/packages/instant/src/util/env.ts new file mode 100644 index 000000000..038ec6c88 --- /dev/null +++ b/packages/instant/src/util/env.ts @@ -0,0 +1,42 @@ +import * as bowser from 'bowser'; + +import { Browser, OperatingSystem } from '../types'; + +export const envUtil = { + getBrowser(): Browser { + if (bowser.chrome) { + return Browser.Chrome; + } else if (bowser.firefox) { + return Browser.Firefox; + } else if (bowser.opera) { + return Browser.Opera; + } else if (bowser.msedge) { + return Browser.Edge; + } else if (bowser.safari) { + return Browser.Safari; + } else { + return Browser.Other; + } + }, + isMobileOperatingSystem(): boolean { + return true; + }, + getOperatingSystem(): OperatingSystem { + return OperatingSystem.iOS; + // if (bowser.android) { + // return OperatingSystem.Android; + // } else if (bowser.ios) { + // return OperatingSystem.iOS; + // } else if (bowser.mac) { + // return OperatingSystem.Mac; + // } else if (bowser.windows) { + // return OperatingSystem.Windows; + // } else if (bowser.windowsphone) { + // return OperatingSystem.WindowsPhone; + // } else if (bowser.linux) { + // return OperatingSystem.Linux; + // } else { + // return OperatingSystem.Other; + // } + }, +}; -- cgit v1.2.3 From 9e0c232a738069cc5552ed2c050c95c04cbc89c4 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Tue, 13 Nov 2018 15:07:21 -0800 Subject: Remove ConnectedZeroExInstantContainer, introduce ConnectedBuyOrderProgressOrPaymentMethod --- .../instant/src/components/zero_ex_instant.tsx | 4 +-- .../src/components/zero_ex_instant_container.tsx | 19 ++---------- .../src/components/zero_ex_instant_overlay.tsx | 4 +-- ...nected_buy_order_progress_or_payment_method.tsx | 36 ++++++++++++++++++++++ .../connected_zero_ex_instant_container.ts | 21 ------------- 5 files changed, 43 insertions(+), 41 deletions(-) create mode 100644 packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx delete mode 100644 packages/instant/src/containers/connected_zero_ex_instant_container.ts (limited to 'packages') diff --git a/packages/instant/src/components/zero_ex_instant.tsx b/packages/instant/src/components/zero_ex_instant.tsx index f6ee28dba..65513af60 100644 --- a/packages/instant/src/components/zero_ex_instant.tsx +++ b/packages/instant/src/components/zero_ex_instant.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { INJECTED_DIV_CLASS } from '../constants'; -import { ConnectedZeroExInstantContainer } from '../containers/connected_zero_ex_instant_container'; +import { ZeroExInstantContainer } from '../components/zero_ex_instant_container'; import { ZeroExInstantProvider, ZeroExInstantProviderProps } from './zero_ex_instant_provider'; @@ -11,7 +11,7 @@ export const ZeroExInstant: React.StatelessComponent = props return (
- +
); diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 60f80e8d1..c0a197590 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -1,11 +1,10 @@ import * as React from 'react'; import { AvailableERC20TokenSelector } from '../containers/available_erc20_token_selector'; -import { ConnectedAccountPaymentMethod } from '../containers/connected_account_payment_method'; +import { ConnectedBuyOrderProgressOrPaymentMethod } from '../containers/connected_buy_order_progress_or_payment_method'; import { CurrentStandardSlidingPanel } from '../containers/current_standard_sliding_panel'; import { LatestBuyQuoteOrderDetails } from '../containers/latest_buy_quote_order_details'; import { LatestError } from '../containers/latest_error'; -import { SelectedAssetBuyOrderProgress } from '../containers/selected_asset_buy_order_progress'; import { SelectedAssetBuyOrderStateButtons } from '../containers/selected_asset_buy_order_state_buttons'; import { SelectedAssetInstantHeading } from '../containers/selected_asset_instant_heading'; import { ColorOption } from '../style/theme'; @@ -24,7 +23,7 @@ export interface ZeroExInstantContainerState { tokenSelectionPanelAnimationState: SlideAnimationState; } -export class ZeroExInstantContainer extends React.Component { +export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantContainerState> { public state = { tokenSelectionPanelAnimationState: 'none' as SlideAnimationState, }; @@ -51,7 +50,7 @@ export class ZeroExInstantContainer extends React.Component - {this._renderPaymentMethodOrBuyOrderProgress()} + @@ -79,16 +78,4 @@ export class ZeroExInstantContainer extends React.Component { - const { orderProcessState } = this.props; - if ( - orderProcessState === OrderProcessState.Processing || - orderProcessState === OrderProcessState.Success || - orderProcessState === OrderProcessState.Failure - ) { - return ; - } else { - return ; - } - }; } diff --git a/packages/instant/src/components/zero_ex_instant_overlay.tsx b/packages/instant/src/components/zero_ex_instant_overlay.tsx index a7e1bd65a..2856ea3e3 100644 --- a/packages/instant/src/components/zero_ex_instant_overlay.tsx +++ b/packages/instant/src/components/zero_ex_instant_overlay.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { ConnectedZeroExInstantContainer } from '../containers/connected_zero_ex_instant_container'; +import { ZeroExInstantContainer } from '../components/zero_ex_instant_container'; import { ColorOption } from '../style/theme'; import { Container } from './ui/container'; @@ -31,7 +31,7 @@ export const ZeroExInstantOverlay: React.StatelessComponent - + diff --git a/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx b/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx new file mode 100644 index 000000000..05071c8c3 --- /dev/null +++ b/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx @@ -0,0 +1,36 @@ +import * as React from 'react'; +import { connect } from 'react-redux'; + +import { State } from '../redux/reducer'; +import { OrderProcessState } from '../types'; + +import { ConnectedAccountPaymentMethod } from './connected_account_payment_method'; +import { SelectedAssetBuyOrderProgress } from './selected_asset_buy_order_progress'; + +interface BuyOrderProgressOrPaymentMethodProps { + orderProcessState: OrderProcessState; +} +export const BuyOrderProgressOrPaymentMethod = (props: BuyOrderProgressOrPaymentMethodProps) => { + const { orderProcessState } = props; + if ( + orderProcessState === OrderProcessState.Processing || + orderProcessState === OrderProcessState.Success || + orderProcessState === OrderProcessState.Failure + ) { + return ; + } + if (orderProcessState === OrderProcessState.None) { + return ; + } + return null; +}; + +interface ConnectedState extends BuyOrderProgressOrPaymentMethodProps {} + +export interface ConnectedBuyOrderProgressOrPaymentMethodProps {} +const mapStateToProps = (state: State, _ownProps: ConnectedBuyOrderProgressOrPaymentMethodProps): ConnectedState => ({ + orderProcessState: state.buyOrderState.processState, +}); +export const ConnectedBuyOrderProgressOrPaymentMethod: React.ComponentClass< + ConnectedBuyOrderProgressOrPaymentMethodProps +> = connect(mapStateToProps)(BuyOrderProgressOrPaymentMethod); diff --git a/packages/instant/src/containers/connected_zero_ex_instant_container.ts b/packages/instant/src/containers/connected_zero_ex_instant_container.ts deleted file mode 100644 index 9606d18c2..000000000 --- a/packages/instant/src/containers/connected_zero_ex_instant_container.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as React from 'react'; -import { connect } from 'react-redux'; - -import { State } from '../redux/reducer'; -import { OrderProcessState } from '../types'; - -import { ZeroExInstantContainer } from '../components/zero_ex_instant_container'; - -export interface ConnectedZeroExInstantContainerProps {} - -interface ConnectedState { - orderProcessState: OrderProcessState; -} - -const mapStateToProps = (state: State, _ownProps: ConnectedZeroExInstantContainerProps): ConnectedState => ({ - orderProcessState: state.buyOrderState.processState, -}); - -export const ConnectedZeroExInstantContainer: React.ComponentClass = connect( - mapStateToProps, -)(ZeroExInstantContainer); -- cgit v1.2.3 From bb79a5e3245e63aedefe66273196edc768be2ecd Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Tue, 13 Nov 2018 15:18:29 -0800 Subject: linting --- packages/instant/src/components/zero_ex_instant.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/src/components/zero_ex_instant.tsx b/packages/instant/src/components/zero_ex_instant.tsx index 65513af60..2267b4dbf 100644 --- a/packages/instant/src/components/zero_ex_instant.tsx +++ b/packages/instant/src/components/zero_ex_instant.tsx @@ -1,8 +1,9 @@ import * as React from 'react'; -import { INJECTED_DIV_CLASS } from '../constants'; import { ZeroExInstantContainer } from '../components/zero_ex_instant_container'; +import { INJECTED_DIV_CLASS } from '../constants'; + import { ZeroExInstantProvider, ZeroExInstantProviderProps } from './zero_ex_instant_provider'; export type ZeroExInstantProps = ZeroExInstantProviderProps; -- cgit v1.2.3 From 35bfd493e87b5d6c76f5bb2176b0992891a4a555 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 13 Nov 2018 17:07:38 -0800 Subject: feat: display the correct provider type and change unlock / install prompt content --- packages/instant/package.json | 1 + .../src/components/coinbase_wallet_logo.tsx | 6 +-- .../components/install_wallet_panel_content.tsx | 2 +- packages/instant/src/components/payment_method.tsx | 43 ++++----------- packages/instant/src/components/wallet_prompt.tsx | 32 ++++++++++++ .../containers/connected_account_payment_method.ts | 1 + packages/instant/src/types.ts | 9 ++++ packages/instant/src/util/env.ts | 61 +++++++++++++++------- .../instant/src/util/provider_state_factory.ts | 4 ++ 9 files changed, 104 insertions(+), 55 deletions(-) create mode 100644 packages/instant/src/components/wallet_prompt.tsx (limited to 'packages') diff --git a/packages/instant/package.json b/packages/instant/package.json index f71fe45ef..aa9157bcc 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -54,6 +54,7 @@ "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.4", "@0x/web3-wrapper": "^3.1.3", + "bowser": "^2.0.0-beta.3", "copy-to-clipboard": "^3.0.8", "ethereum-types": "^1.1.2", "lodash": "^4.17.10", diff --git a/packages/instant/src/components/coinbase_wallet_logo.tsx b/packages/instant/src/components/coinbase_wallet_logo.tsx index 1fe8df807..f5a7be81c 100644 --- a/packages/instant/src/components/coinbase_wallet_logo.tsx +++ b/packages/instant/src/components/coinbase_wallet_logo.tsx @@ -2,11 +2,10 @@ import * as React from 'react'; export interface CoinbaseWalletLogoProps { width?: number; - height?: number; } -export const CoinbaseWalletLogo: React.StatelessComponent = ({ width, height }) => ( - +export const CoinbaseWalletLogo: React.StatelessComponent = ({ width }) => ( + , + image: , description, moreInfoSettings: { href: COINBASE_WALLET_SITE_URL, diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 49ec22164..0f9f3ebfa 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -3,7 +3,9 @@ import * as React from 'react'; import { ColorOption } from '../style/theme'; import { Account, AccountState, Network } from '../types'; +import { envUtil } from '../util/env'; +import { CoinbaseWalletLogo } from './coinbase_wallet_logo'; import { MetaMaskLogo } from './meta_mask_logo'; import { PaymentMethodDropdown } from './payment_method_dropdown'; import { Circle } from './ui/circle'; @@ -11,10 +13,12 @@ import { Container } from './ui/container'; import { Flex } from './ui/flex'; import { Icon } from './ui/icon'; import { Text } from './ui/text'; +import { WalletPrompt } from './wallet_prompt'; export interface PaymentMethodProps { account: Account; network: Network; + walletName: string; onInstallWalletClick: () => void; onUnlockWalletClick: () => void; } @@ -62,7 +66,7 @@ export class PaymentMethod extends React.Component { - MetaMask + {this.props.walletName} @@ -72,6 +76,9 @@ export class PaymentMethod extends React.Component { }; private readonly _renderMainContent = (): React.ReactNode => { const { account, network } = this.props; + const isMobile = envUtil.isMobileOperatingSystem(); + // TODO: Use Toshi logo + const logo = isMobile ? undefined : ; switch (account.state) { case AccountState.Loading: // Just take up the same amount of space as the other states. @@ -82,16 +89,13 @@ export class PaymentMethod extends React.Component { onClick={this.props.onUnlockWalletClick} image={} > - Please Unlock MetaMask + Please Unlock {this.props.walletName}
); case AccountState.None: return ( - } - > - Install MetaMask + + {isMobile ? 'Install Coinbase Wallet' : 'Install MetaMask'} ); case AccountState.Ready: @@ -105,28 +109,3 @@ export class PaymentMethod extends React.Component { } }; } - -interface WalletPromptProps { - image: React.ReactNode; - onClick?: () => void; -} - -const WalletPrompt: React.StatelessComponent = ({ onClick, image, children }) => ( - - - {image} - - {children} - - - -); diff --git a/packages/instant/src/components/wallet_prompt.tsx b/packages/instant/src/components/wallet_prompt.tsx new file mode 100644 index 000000000..cd0a7828b --- /dev/null +++ b/packages/instant/src/components/wallet_prompt.tsx @@ -0,0 +1,32 @@ +import * as React from 'react'; + +import { ColorOption } from '../style/theme'; + +import { Container } from './ui/container'; +import { Flex } from './ui/flex'; +import { Text } from './ui/text'; + +export interface WalletPromptProps { + image: React.ReactNode; + onClick?: () => void; +} + +export const WalletPrompt: React.StatelessComponent = ({ onClick, image, children }) => ( + + + {image} + + {children} + + + +); diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts index 65b3710a6..69c2ddf19 100644 --- a/packages/instant/src/containers/connected_account_payment_method.ts +++ b/packages/instant/src/containers/connected_account_payment_method.ts @@ -47,6 +47,7 @@ const mergeProps = ( network: connectedState.network, account: connectedState.providerState.account, onInstallWalletClick: connectedDispatch.onInstallWalletClick, + walletName: connectedState.providerState.name, onUnlockWalletClick: () => { connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState); }, diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index e2ba9238a..cbb1e2caf 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -95,6 +95,7 @@ export interface AffiliateInfo { } export interface ProviderState { + name: string; provider: Provider; assetBuyer: AssetBuyer; web3Wrapper: Web3Wrapper; @@ -156,3 +157,11 @@ export enum OperatingSystem { Linux = 'Linux', Other = 'Other', } + +export enum ProviderType { + Parity = 'Parity', + MetaMask = 'MetaMask', + Mist = 'Mist', + CoinbaseWallet = 'Coinbase Wallet', + Cipher = 'Cipher', +} diff --git a/packages/instant/src/util/env.ts b/packages/instant/src/util/env.ts index 038ec6c88..448ad5262 100644 --- a/packages/instant/src/util/env.ts +++ b/packages/instant/src/util/env.ts @@ -1,6 +1,8 @@ import * as bowser from 'bowser'; +import { Provider } from 'ethereum-types'; +import * as _ from 'lodash'; -import { Browser, OperatingSystem } from '../types'; +import { Browser, OperatingSystem, ProviderType } from '../types'; export const envUtil = { getBrowser(): Browser { @@ -19,24 +21,47 @@ export const envUtil = { } }, isMobileOperatingSystem(): boolean { - return true; + return bowser.mobile; }, getOperatingSystem(): OperatingSystem { - return OperatingSystem.iOS; - // if (bowser.android) { - // return OperatingSystem.Android; - // } else if (bowser.ios) { - // return OperatingSystem.iOS; - // } else if (bowser.mac) { - // return OperatingSystem.Mac; - // } else if (bowser.windows) { - // return OperatingSystem.Windows; - // } else if (bowser.windowsphone) { - // return OperatingSystem.WindowsPhone; - // } else if (bowser.linux) { - // return OperatingSystem.Linux; - // } else { - // return OperatingSystem.Other; - // } + if (bowser.android) { + return OperatingSystem.Android; + } else if (bowser.ios) { + return OperatingSystem.iOS; + } else if (bowser.mac) { + return OperatingSystem.Mac; + } else if (bowser.windows) { + return OperatingSystem.Windows; + } else if (bowser.windowsphone) { + return OperatingSystem.WindowsPhone; + } else if (bowser.linux) { + return OperatingSystem.Linux; + } else { + return OperatingSystem.Other; + } + }, + getProviderName(provider: Provider): ProviderType | string { + const constructorName = provider.constructor.name; + let parsedProviderName = constructorName; + // https://ethereum.stackexchange.com/questions/24266/elegant-way-to-detect-current-provider-int-web3-js + switch (constructorName) { + case 'EthereumProvider': + parsedProviderName = ProviderType.Mist; + break; + + default: + parsedProviderName = constructorName; + break; + } + if ((provider as any).isParity) { + parsedProviderName = ProviderType.Parity; + } else if ((provider as any).isMetaMask) { + parsedProviderName = ProviderType.MetaMask; + } else if (!_.isUndefined(_.get(window, 'SOFA'))) { + parsedProviderName = ProviderType.CoinbaseWallet; + } else if (!_.isUndefined(_.get(window, '__CIPHER__'))) { + parsedProviderName = ProviderType.Cipher; + } + return parsedProviderName; }, }; diff --git a/packages/instant/src/util/provider_state_factory.ts b/packages/instant/src/util/provider_state_factory.ts index 3281f6bfb..452a71460 100644 --- a/packages/instant/src/util/provider_state_factory.ts +++ b/packages/instant/src/util/provider_state_factory.ts @@ -4,6 +4,7 @@ import * as _ from 'lodash'; import { LOADING_ACCOUNT, NO_ACCOUNT } from '../constants'; import { Maybe, Network, OrderSource, ProviderState } from '../types'; +import { envUtil } from '../util/env'; import { assetBuyerFactory } from './asset_buyer_factory'; import { providerFactory } from './provider_factory'; @@ -29,6 +30,7 @@ export const providerStateFactory = { provider: Provider, ): ProviderState => { const providerState: ProviderState = { + name: envUtil.getProviderName(provider), provider, web3Wrapper: new Web3Wrapper(provider), assetBuyer: assetBuyerFactory.getAssetBuyer(provider, orderSource, network), @@ -40,6 +42,7 @@ export const providerStateFactory = { const injectedProviderIfExists = providerFactory.getInjectedProviderIfExists(); if (!_.isUndefined(injectedProviderIfExists)) { const providerState: ProviderState = { + name: envUtil.getProviderName(injectedProviderIfExists), provider: injectedProviderIfExists, web3Wrapper: new Web3Wrapper(injectedProviderIfExists), assetBuyer: assetBuyerFactory.getAssetBuyer(injectedProviderIfExists, orderSource, network), @@ -53,6 +56,7 @@ export const providerStateFactory = { getInitialProviderStateFallback: (orderSource: OrderSource, network: Network): ProviderState => { const provider = providerFactory.getFallbackNoSigningProvider(network); const providerState: ProviderState = { + name: envUtil.getProviderName(provider), provider, web3Wrapper: new Web3Wrapper(provider), assetBuyer: assetBuyerFactory.getAssetBuyer(provider, orderSource, network), -- cgit v1.2.3 From d19c8ae9b1469ae4f3bd5b4cb76c3ad679e9d641 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 13 Nov 2018 17:46:58 -0800 Subject: feat: add coinbase wallet app logo to wallet prompt --- packages/instant/src/components/coinbase_wallet_logo.tsx | 16 ++++++++++++++++ packages/instant/src/components/payment_method.tsx | 5 ++--- packages/instant/src/components/wallet_prompt.tsx | 10 ++++++---- 3 files changed, 24 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/coinbase_wallet_logo.tsx b/packages/instant/src/components/coinbase_wallet_logo.tsx index f5a7be81c..f3c9ccdc2 100644 --- a/packages/instant/src/components/coinbase_wallet_logo.tsx +++ b/packages/instant/src/components/coinbase_wallet_logo.tsx @@ -30,3 +30,19 @@ CoinbaseWalletLogo.displayName = 'CoinbaseWalletLogo'; CoinbaseWalletLogo.defaultProps = { width: 164, }; + +export interface CoinbaseWalletAppLogoProps { + width?: number; +} + +export const CoinbaseWalletAppLogo: React.StatelessComponent = ({ width }) => ( + + + + +); diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 0f9f3ebfa..02c2b12bf 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -5,7 +5,7 @@ import { ColorOption } from '../style/theme'; import { Account, AccountState, Network } from '../types'; import { envUtil } from '../util/env'; -import { CoinbaseWalletLogo } from './coinbase_wallet_logo'; +import { CoinbaseWalletAppLogo, CoinbaseWalletLogo } from './coinbase_wallet_logo'; import { MetaMaskLogo } from './meta_mask_logo'; import { PaymentMethodDropdown } from './payment_method_dropdown'; import { Circle } from './ui/circle'; @@ -77,8 +77,7 @@ export class PaymentMethod extends React.Component { private readonly _renderMainContent = (): React.ReactNode => { const { account, network } = this.props; const isMobile = envUtil.isMobileOperatingSystem(); - // TODO: Use Toshi logo - const logo = isMobile ? undefined : ; + const logo = isMobile ? : ; switch (account.state) { case AccountState.Loading: // Just take up the same amount of space as the other states. diff --git a/packages/instant/src/components/wallet_prompt.tsx b/packages/instant/src/components/wallet_prompt.tsx index cd0a7828b..bcf66ee81 100644 --- a/packages/instant/src/components/wallet_prompt.tsx +++ b/packages/instant/src/components/wallet_prompt.tsx @@ -23,10 +23,12 @@ export const WalletPrompt: React.StatelessComponent = ({ onCl boxShadowOnHover={!!onClick} > - {image} - - {children} - + {image} + + + {children} + +
); -- cgit v1.2.3 From fe1746c7ac90efada77cb204414d2fca377f8a65 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 13 Nov 2018 17:50:15 -0800 Subject: chore: remove unused import --- packages/instant/src/components/payment_method.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 02c2b12bf..0897045ce 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -5,7 +5,7 @@ import { ColorOption } from '../style/theme'; import { Account, AccountState, Network } from '../types'; import { envUtil } from '../util/env'; -import { CoinbaseWalletAppLogo, CoinbaseWalletLogo } from './coinbase_wallet_logo'; +import { CoinbaseWalletAppLogo } from './coinbase_wallet_logo'; import { MetaMaskLogo } from './meta_mask_logo'; import { PaymentMethodDropdown } from './payment_method_dropdown'; import { Circle } from './ui/circle'; -- cgit v1.2.3 From af6aa2df93d533293316512c5b724a2fa40315d6 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 13 Nov 2018 16:57:46 -0800 Subject: fix(instant): catch errors coming from calls to the orderValidator contract --- .../src/utils/order_provider_response_processor.ts | 29 +++++++++++++--------- 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'packages') diff --git a/packages/asset-buyer/src/utils/order_provider_response_processor.ts b/packages/asset-buyer/src/utils/order_provider_response_processor.ts index 28f684f3c..25e85b2cc 100644 --- a/packages/asset-buyer/src/utils/order_provider_response_processor.ts +++ b/packages/asset-buyer/src/utils/order_provider_response_processor.ts @@ -44,19 +44,24 @@ export const orderProviderResponseProcessor = { let unsortedOrders = filteredOrders; // if an orderValidator is provided, use on chain information to calculate remaining fillable makerAsset amounts if (!_.isUndefined(orderValidator)) { - // TODO(bmillman): improvement - // try/catch this request and throw a more domain specific error const takerAddresses = _.map(filteredOrders, () => constants.NULL_ADDRESS); - const ordersAndTradersInfo = await orderValidator.getOrdersAndTradersInfoAsync( - filteredOrders, - takerAddresses, - ); - // take orders + on chain information and find the valid orders and remaining fillable maker asset amounts - unsortedOrders = getValidOrdersWithRemainingFillableMakerAssetAmountsFromOnChain( - filteredOrders, - ordersAndTradersInfo, - isMakerAssetZrxToken, - ); + try { + const ordersAndTradersInfo = await orderValidator.getOrdersAndTradersInfoAsync( + filteredOrders, + takerAddresses, + ); + // take orders + on chain information and find the valid orders and remaining fillable maker asset amounts + unsortedOrders = getValidOrdersWithRemainingFillableMakerAssetAmountsFromOnChain( + filteredOrders, + ordersAndTradersInfo, + isMakerAssetZrxToken, + ); + } catch (err) { + // Sometimes we observe this call to orderValidator fail with response `0x` + // Because of differences in Parity / Geth implementations, its very hard to tell if this response is a "system error" + // or a revert. In this case we just swallow these errors and fallback to partial fill information from the SRA. + // TODO(bmillman): report these errors so we have an idea of how often we're getting these failures. + } } // sort orders by rate // TODO(bmillman): optimization -- cgit v1.2.3 From 1a1caa1ca21f3e86985bb18be233c3efcade52d1 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 13 Nov 2018 18:04:44 -0800 Subject: feat: center title label with circle --- packages/instant/src/components/payment_method.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 0897045ce..f9d02ec5b 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -38,7 +38,7 @@ export class PaymentMethod extends React.Component { > {this._renderTitleText()}
- {this._renderTitleLabel()} + {this._renderTitleLabel()}
{this._renderMainContent()} @@ -62,14 +62,14 @@ export class PaymentMethod extends React.Component { if (account.state === AccountState.Ready || account.state === AccountState.Locked) { const circleColor: ColorOption = account.state === AccountState.Ready ? ColorOption.green : ColorOption.red; return ( - + {this.props.walletName} - + ); } return null; -- cgit v1.2.3 From 921ef90a14003ff72f8a11d00519806251e85778 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 13 Nov 2018 19:34:34 -0800 Subject: feat: dont show payment dropdown content on mobile --- packages/instant/src/components/payment_method_dropdown.tsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method_dropdown.tsx b/packages/instant/src/components/payment_method_dropdown.tsx index 58f1cc044..b330dbcd6 100644 --- a/packages/instant/src/components/payment_method_dropdown.tsx +++ b/packages/instant/src/components/payment_method_dropdown.tsx @@ -3,6 +3,7 @@ import copy from 'copy-to-clipboard'; import * as React from 'react'; import { Network } from '../types'; +import { envUtil } from '../util/env'; import { etherscanUtil } from '../util/etherscan'; import { format } from '../util/format'; @@ -22,6 +23,9 @@ export class PaymentMethodDropdown extends React.Component; } private readonly _getDropdownItemConfigs = (): DropdownItemConfig[] => { + if (envUtil.isMobileOperatingSystem()) { + return []; + } const viewOnEtherscan = { text: 'View on Etherscan', onClick: this._handleEtherscanClick, -- cgit v1.2.3 From 15105cde0f69bd6faaa0d35a32797f77b7b163b5 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 13 Nov 2018 19:44:31 -0800 Subject: refactor: move wallet panel content os switching logic into two methods --- .../components/install_wallet_panel_content.tsx | 157 +++++++++++---------- 1 file changed, 79 insertions(+), 78 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/install_wallet_panel_content.tsx b/packages/instant/src/components/install_wallet_panel_content.tsx index 0700e9051..5cba8d996 100644 --- a/packages/instant/src/components/install_wallet_panel_content.tsx +++ b/packages/instant/src/components/install_wallet_panel_content.tsx @@ -27,86 +27,87 @@ export class InstallWalletPanelContent extends React.Component { const isMobileOS = envUtil.isMobileOperatingSystem(); - const browser = envUtil.getBrowser(); - const operatingSystem = envUtil.getOperatingSystem(); if (isMobileOS) { - let description = 'Please install the Coinbase Wallet app.'; - let actionText = 'Learn More'; - let actionUrl = COINBASE_WALLET_SITE_URL; - switch (operatingSystem) { - case OperatingSystem.Android: - description = 'Please install the Coinbase Wallet app from the Google Play Store.'; - actionText = 'Get Coinbase Wallet'; - actionUrl = COINBASE_WALLET_ANDROID_APP_STORE_URL; - break; - case OperatingSystem.iOS: - description = 'Please install the Coinbase Wallet app from the iOS App Store.'; - actionText = 'Get Coinbase Wallet'; - actionUrl = COINBASE_WALLET_IOS_APP_STORE_URL; - break; - default: - break; - } - return { - image: , - description, - moreInfoSettings: { - href: COINBASE_WALLET_SITE_URL, - text: 'What is Coinbase Wallet?', - }, - action: ( - - ), - }; + return this._getMobilePanelContentProps(); } else { - let description = 'Please install the MetaMask wallet browser extension.'; - let actionText = 'Learn More'; - let actionUrl = META_MASK_SITE_URL; - switch (browser) { - case Browser.Chrome: - description = 'Please install the MetaMask wallet browser extension from the Chrome Store.'; - actionText = 'Get Chrome Extension'; - actionUrl = META_MASK_CHROME_STORE_URL; - break; - case Browser.Firefox: - description = 'Please install the MetaMask wallet browser extension from the Firefox Store.'; - actionText = 'Get Firefox Extension'; - actionUrl = META_MASK_FIREFOX_STORE_URL; - break; - case Browser.Opera: - description = 'Please install the MetaMask wallet browser extension from the Opera Store.'; - actionText = 'Get Opera Add-on'; - actionUrl = META_MASK_OPERA_STORE_URL; - break; - default: - break; - } - return { - image: , - title: 'Install MetaMask', - description, - moreInfoSettings: { - href: META_MASK_SITE_URL, - text: 'What is MetaMask?', - }, - action: ( - - ), - }; + return this._getDesktopPanelContentProps(); + } + }; + private readonly _getDesktopPanelContentProps = (): StandardPanelContentProps => { + const browser = envUtil.getBrowser(); + let description = 'Please install the MetaMask wallet browser extension.'; + let actionText = 'Learn More'; + let actionUrl = META_MASK_SITE_URL; + switch (browser) { + case Browser.Chrome: + description = 'Please install the MetaMask wallet browser extension from the Chrome Store.'; + actionText = 'Get Chrome Extension'; + actionUrl = META_MASK_CHROME_STORE_URL; + break; + case Browser.Firefox: + description = 'Please install the MetaMask wallet browser extension from the Firefox Store.'; + actionText = 'Get Firefox Extension'; + actionUrl = META_MASK_FIREFOX_STORE_URL; + break; + case Browser.Opera: + description = 'Please install the MetaMask wallet browser extension from the Opera Store.'; + actionText = 'Get Opera Add-on'; + actionUrl = META_MASK_OPERA_STORE_URL; + break; + default: + break; + } + return { + image: , + title: 'Install MetaMask', + description, + moreInfoSettings: { + href: META_MASK_SITE_URL, + text: 'What is MetaMask?', + }, + action: ( + + ), + }; + }; + private readonly _getMobilePanelContentProps = (): StandardPanelContentProps => { + const operatingSystem = envUtil.getOperatingSystem(); + let description = 'Please install the Coinbase Wallet app.'; + let actionText = 'Learn More'; + let actionUrl = COINBASE_WALLET_SITE_URL; + switch (operatingSystem) { + case OperatingSystem.Android: + description = 'Please install the Coinbase Wallet app from the Google Play Store.'; + actionText = 'Get Coinbase Wallet'; + actionUrl = COINBASE_WALLET_ANDROID_APP_STORE_URL; + break; + case OperatingSystem.iOS: + description = 'Please install the Coinbase Wallet app from the iOS App Store.'; + actionText = 'Get Coinbase Wallet'; + actionUrl = COINBASE_WALLET_IOS_APP_STORE_URL; + break; + default: + break; } + return { + image: , + description, + moreInfoSettings: { + href: COINBASE_WALLET_SITE_URL, + text: 'What is Coinbase Wallet?', + }, + action: ( + + ), + }; }; } -- cgit v1.2.3 From 80e7e84a06319a79a757406b58df318cce3dfa08 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 13 Nov 2018 19:49:06 -0800 Subject: fix: do not remove payment dropdown when confirmation pending --- .../src/containers/connected_buy_order_progress_or_payment_method.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx b/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx index 05071c8c3..cace18e7e 100644 --- a/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx +++ b/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx @@ -18,8 +18,7 @@ export const BuyOrderProgressOrPaymentMethod = (props: BuyOrderProgressOrPayment orderProcessState === OrderProcessState.Failure ) { return ; - } - if (orderProcessState === OrderProcessState.None) { + } else { return ; } return null; -- cgit v1.2.3 From b0e9f5803327f5cbd4ca0cbee7e9217c46a3f1ba Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 14 Nov 2018 15:38:21 +0100 Subject: Fix a bug in an order-watcher order removal when maker token is ZRX --- packages/order-watcher/CHANGELOG.json | 10 ++++++++++ .../src/order_watcher/dependent_order_hashes_tracker.ts | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index 7119d7953..fd6167bd4 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -1,4 +1,14 @@ [ + { + "version": "2.2.4", + "changes": [ + { + "note": + "Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX", + "pr": 1259 + } + ] + }, { "version": "2.2.3", "changes": [ diff --git a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts b/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts index 1ec568a9b..4c8585985 100644 --- a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts +++ b/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts @@ -89,7 +89,9 @@ export class DependentOrderHashesTracker { (decodedMakerAssetData as ERC721AssetData).tokenId, ); } - this._removeFromERC20DependentOrderhashes(signedOrder, this._zrxTokenAddress); + if ((decodedMakerAssetData as ERC20AssetData).tokenAddress !== this._zrxTokenAddress) { + this._removeFromERC20DependentOrderhashes(signedOrder, this._zrxTokenAddress); + } this._removeFromMakerDependentOrderhashes(signedOrder); } private _getDependentOrderHashesByERC20AssetData(makerAddress: string, erc20AssetData: string): string[] { -- cgit v1.2.3 From 77c77631e1d11b7a331ecc6ec73cce82ef1eb0b4 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 14 Nov 2018 16:03:19 +0100 Subject: Add a comment --- .../order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'packages') diff --git a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts b/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts index 4c8585985..a956a94db 100644 --- a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts +++ b/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts @@ -89,6 +89,7 @@ export class DependentOrderHashesTracker { (decodedMakerAssetData as ERC721AssetData).tokenId, ); } + // If makerToken === ZRX then we already removed it and we don't need to remove it again. if ((decodedMakerAssetData as ERC20AssetData).tokenAddress !== this._zrxTokenAddress) { this._removeFromERC20DependentOrderhashes(signedOrder, this._zrxTokenAddress); } -- cgit v1.2.3 From 3f647c259a69428c1527f55a9cc1e3eaaa65da05 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 14 Nov 2018 16:16:32 +0100 Subject: Updated CHANGELOGS --- packages/0x.js/CHANGELOG.json | 9 +++++++++ packages/0x.js/CHANGELOG.md | 4 ++++ packages/abi-gen-wrappers/CHANGELOG.json | 9 +++++++++ packages/abi-gen-wrappers/CHANGELOG.md | 4 ++++ packages/abi-gen/CHANGELOG.json | 9 +++++++++ packages/abi-gen/CHANGELOG.md | 4 ++++ packages/assert/CHANGELOG.json | 9 +++++++++ packages/assert/CHANGELOG.md | 4 ++++ packages/asset-buyer/CHANGELOG.json | 3 ++- packages/asset-buyer/CHANGELOG.md | 4 ++++ packages/base-contract/CHANGELOG.json | 9 +++++++++ packages/base-contract/CHANGELOG.md | 4 ++++ packages/connect/CHANGELOG.json | 9 +++++++++ packages/connect/CHANGELOG.md | 4 ++++ packages/contract-wrappers/CHANGELOG.json | 9 +++++++++ packages/contract-wrappers/CHANGELOG.md | 4 ++++ packages/dev-utils/CHANGELOG.json | 9 +++++++++ packages/dev-utils/CHANGELOG.md | 4 ++++ packages/fill-scenarios/CHANGELOG.json | 9 +++++++++ packages/fill-scenarios/CHANGELOG.md | 4 ++++ packages/json-schemas/CHANGELOG.json | 9 +++++++++ packages/json-schemas/CHANGELOG.md | 4 ++++ packages/migrations/CHANGELOG.json | 9 +++++++++ packages/migrations/CHANGELOG.md | 4 ++++ packages/order-utils/CHANGELOG.json | 9 +++++++++ packages/order-utils/CHANGELOG.md | 4 ++++ packages/order-watcher/CHANGELOG.json | 3 ++- packages/order-watcher/CHANGELOG.md | 4 ++++ packages/react-docs/CHANGELOG.json | 9 +++++++++ packages/react-docs/CHANGELOG.md | 4 ++++ packages/react-shared/CHANGELOG.json | 9 +++++++++ packages/react-shared/CHANGELOG.md | 4 ++++ packages/sol-compiler/CHANGELOG.json | 9 +++++++++ packages/sol-compiler/CHANGELOG.md | 4 ++++ packages/sol-cov/CHANGELOG.json | 9 +++++++++ packages/sol-cov/CHANGELOG.md | 4 ++++ packages/sol-doc/CHANGELOG.json | 9 +++++++++ packages/sol-doc/CHANGELOG.md | 4 ++++ packages/sra-spec/CHANGELOG.json | 9 +++++++++ packages/sra-spec/CHANGELOG.md | 4 ++++ packages/subproviders/CHANGELOG.json | 9 +++++++++ packages/subproviders/CHANGELOG.md | 4 ++++ packages/utils/CHANGELOG.json | 9 +++++++++ packages/utils/CHANGELOG.md | 4 ++++ packages/web3-wrapper/CHANGELOG.json | 9 +++++++++ packages/web3-wrapper/CHANGELOG.md | 4 ++++ 46 files changed, 285 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index d8b99b7b4..0321ee200 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "2.0.4", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "2.0.3", diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index 46ec1ac5b..2467311bf 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.4 - _November 14, 2018_ + + * Dependencies updated + ## v2.0.3 - _November 13, 2018_ * Dependencies updated diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json index 9658c0377..fff2bc41e 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ b/packages/abi-gen-wrappers/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.0.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "1.0.4", diff --git a/packages/abi-gen-wrappers/CHANGELOG.md b/packages/abi-gen-wrappers/CHANGELOG.md index 45b91ad56..4dea965f1 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.md +++ b/packages/abi-gen-wrappers/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.5 - _November 14, 2018_ + + * Dependencies updated + ## v1.0.4 - _November 13, 2018_ * Dependencies updated diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json index 658a997f4..1735c6b53 100644 --- a/packages/abi-gen/CHANGELOG.json +++ b/packages/abi-gen/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.0.16", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.15", "changes": [ diff --git a/packages/abi-gen/CHANGELOG.md b/packages/abi-gen/CHANGELOG.md index 21fda1656..23e2f8914 100644 --- a/packages/abi-gen/CHANGELOG.md +++ b/packages/abi-gen/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.16 - _November 14, 2018_ + + * Dependencies updated + ## v1.0.15 - _November 9, 2018_ * Dependencies updated diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json index 67c14f68f..2b4a3e7a1 100644 --- a/packages/assert/CHANGELOG.json +++ b/packages/assert/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.0.17", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542028948, "version": "1.0.16", diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md index 01b1dbbb5..66f0971c1 100644 --- a/packages/assert/CHANGELOG.md +++ b/packages/assert/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.17 - _November 14, 2018_ + + * Dependencies updated + ## v1.0.16 - _November 12, 2018_ * Dependencies updated diff --git a/packages/asset-buyer/CHANGELOG.json b/packages/asset-buyer/CHANGELOG.json index 826b6150d..0e4623d05 100644 --- a/packages/asset-buyer/CHANGELOG.json +++ b/packages/asset-buyer/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "update `getBuyQuoteAsync` to return eth spent on assets instead of per unit amount", "pr": 1252 } - ] + ], + "timestamp": 1542208198 }, { "timestamp": 1542134075, diff --git a/packages/asset-buyer/CHANGELOG.md b/packages/asset-buyer/CHANGELOG.md index e10a42136..d6013e53e 100644 --- a/packages/asset-buyer/CHANGELOG.md +++ b/packages/asset-buyer/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.0 - _November 14, 2018_ + + * update `getBuyQuoteAsync` to return eth spent on assets instead of per unit amount (#1252) + ## v2.2.2 - _November 13, 2018_ * Dependencies updated diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index da86b840b..dc30ac076 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "3.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "3.0.5", diff --git a/packages/base-contract/CHANGELOG.md b/packages/base-contract/CHANGELOG.md index 21dcbb8dc..cf1b80b6d 100644 --- a/packages/base-contract/CHANGELOG.md +++ b/packages/base-contract/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.6 - _November 14, 2018_ + + * Dependencies updated + ## v3.0.5 - _November 13, 2018_ * Dependencies updated diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json index 3c86284d3..6960e1d97 100644 --- a/packages/connect/CHANGELOG.json +++ b/packages/connect/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "3.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "3.0.5", diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index 2ce218821..13afad09b 100644 --- a/packages/connect/CHANGELOG.md +++ b/packages/connect/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.6 - _November 14, 2018_ + + * Dependencies updated + ## v3.0.5 - _November 13, 2018_ * Dependencies updated diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index a454a067d..fbf3972a9 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "4.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "4.0.1", diff --git a/packages/contract-wrappers/CHANGELOG.md b/packages/contract-wrappers/CHANGELOG.md index 4352f4ecd..eca1b4633 100644 --- a/packages/contract-wrappers/CHANGELOG.md +++ b/packages/contract-wrappers/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v4.0.2 - _November 14, 2018_ + + * Dependencies updated + ## v4.0.1 - _November 13, 2018_ * Dependencies updated diff --git a/packages/dev-utils/CHANGELOG.json b/packages/dev-utils/CHANGELOG.json index 82b988c7b..d6cdd1c5a 100644 --- a/packages/dev-utils/CHANGELOG.json +++ b/packages/dev-utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.0.17", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "1.0.16", diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 134667db2..4becadf81 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.17 - _November 14, 2018_ + + * Dependencies updated + ## v1.0.16 - _November 13, 2018_ * Dependencies updated diff --git a/packages/fill-scenarios/CHANGELOG.json b/packages/fill-scenarios/CHANGELOG.json index 9b0a4ba92..deeae5f5d 100644 --- a/packages/fill-scenarios/CHANGELOG.json +++ b/packages/fill-scenarios/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.0.12", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "1.0.11", diff --git a/packages/fill-scenarios/CHANGELOG.md b/packages/fill-scenarios/CHANGELOG.md index 8812c7ded..c8bd402de 100644 --- a/packages/fill-scenarios/CHANGELOG.md +++ b/packages/fill-scenarios/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.12 - _November 14, 2018_ + + * Dependencies updated + ## v1.0.11 - _November 13, 2018_ * Dependencies updated diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index 24eacd192..bf815e523 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "2.1.1", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "2.1.0", "changes": [ diff --git a/packages/json-schemas/CHANGELOG.md b/packages/json-schemas/CHANGELOG.md index 4f77d3aee..dc412bded 100644 --- a/packages/json-schemas/CHANGELOG.md +++ b/packages/json-schemas/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.1.1 - _November 14, 2018_ + + * Dependencies updated + ## v2.1.0 - _November 12, 2018_ * Improve schemas by enforcing that amounts that must be whole numbers (e.g Order asset amounts) no longer allow decimal amounts (#1173) diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index dfceeff8a..5b0d58909 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "2.0.4", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "2.0.3", diff --git a/packages/migrations/CHANGELOG.md b/packages/migrations/CHANGELOG.md index ba1f59295..87d0b25ca 100644 --- a/packages/migrations/CHANGELOG.md +++ b/packages/migrations/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.4 - _November 14, 2018_ + + * Dependencies updated + ## v2.0.3 - _November 13, 2018_ * Dependencies updated diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json index d2a10ca02..55e7defda 100644 --- a/packages/order-utils/CHANGELOG.json +++ b/packages/order-utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "3.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "3.0.1", diff --git a/packages/order-utils/CHANGELOG.md b/packages/order-utils/CHANGELOG.md index bfb6082af..edf1569a7 100644 --- a/packages/order-utils/CHANGELOG.md +++ b/packages/order-utils/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.2 - _November 14, 2018_ + + * Dependencies updated + ## v3.0.1 - _November 13, 2018_ * Dependencies updated diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index fd6167bd4..b4d7a1501 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -7,7 +7,8 @@ "Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX", "pr": 1259 } - ] + ], + "timestamp": 1542208198 }, { "version": "2.2.3", diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md index 018a0d206..c7003f759 100644 --- a/packages/order-watcher/CHANGELOG.md +++ b/packages/order-watcher/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.2.4 - _November 14, 2018_ + + * Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX (#1259) + ## v2.2.3 - _November 13, 2018_ * Start jsonRpcRequestId at 1, not 0 as 0 breaks the web3.js websocket RPC provider (#1227) diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json index 401070f2a..0e9afc32a 100644 --- a/packages/react-docs/CHANGELOG.json +++ b/packages/react-docs/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.0.18", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "1.0.17", diff --git a/packages/react-docs/CHANGELOG.md b/packages/react-docs/CHANGELOG.md index 1cbbc7a84..db574e41b 100644 --- a/packages/react-docs/CHANGELOG.md +++ b/packages/react-docs/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.18 - _November 14, 2018_ + + * Dependencies updated + ## v1.0.17 - _November 13, 2018_ * Dependencies updated diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json index a54d7d1dc..cb8ae1bf0 100644 --- a/packages/react-shared/CHANGELOG.json +++ b/packages/react-shared/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.0.21", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "1.0.20", diff --git a/packages/react-shared/CHANGELOG.md b/packages/react-shared/CHANGELOG.md index 93a6b2694..0ecb66a27 100644 --- a/packages/react-shared/CHANGELOG.md +++ b/packages/react-shared/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.21 - _November 14, 2018_ + + * Dependencies updated + ## v1.0.20 - _November 13, 2018_ * Dependencies updated diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index cabfe4aab..fc39106dc 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.1.12", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "1.1.11", diff --git a/packages/sol-compiler/CHANGELOG.md b/packages/sol-compiler/CHANGELOG.md index 11030718b..b69976cdc 100644 --- a/packages/sol-compiler/CHANGELOG.md +++ b/packages/sol-compiler/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.1.12 - _November 14, 2018_ + + * Dependencies updated + ## v1.1.11 - _November 13, 2018_ * Dependencies updated diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-cov/CHANGELOG.json index 7512c8b61..bdeda8a96 100644 --- a/packages/sol-cov/CHANGELOG.json +++ b/packages/sol-cov/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "2.1.12", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "2.1.11", diff --git a/packages/sol-cov/CHANGELOG.md b/packages/sol-cov/CHANGELOG.md index be8522a6b..906c0dd52 100644 --- a/packages/sol-cov/CHANGELOG.md +++ b/packages/sol-cov/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.1.12 - _November 14, 2018_ + + * Dependencies updated + ## v2.1.11 - _November 13, 2018_ * Dependencies updated diff --git a/packages/sol-doc/CHANGELOG.json b/packages/sol-doc/CHANGELOG.json index 52659e99b..a9547c883 100644 --- a/packages/sol-doc/CHANGELOG.json +++ b/packages/sol-doc/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.0.7", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "1.0.6", diff --git a/packages/sol-doc/CHANGELOG.md b/packages/sol-doc/CHANGELOG.md index b1654bb7f..74a736c75 100644 --- a/packages/sol-doc/CHANGELOG.md +++ b/packages/sol-doc/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.7 - _November 14, 2018_ + + * Dependencies updated + ## v1.0.6 - _November 13, 2018_ * Dependencies updated diff --git a/packages/sra-spec/CHANGELOG.json b/packages/sra-spec/CHANGELOG.json index 37ad85385..3cc917e5a 100644 --- a/packages/sra-spec/CHANGELOG.json +++ b/packages/sra-spec/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "1.0.10", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542028948, "version": "1.0.9", diff --git a/packages/sra-spec/CHANGELOG.md b/packages/sra-spec/CHANGELOG.md index c53ad6b5b..8b2b7747b 100644 --- a/packages/sra-spec/CHANGELOG.md +++ b/packages/sra-spec/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.10 - _November 14, 2018_ + + * Dependencies updated + ## v1.0.9 - _November 12, 2018_ * Dependencies updated diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json index 2524c3945..cdc150c3a 100644 --- a/packages/subproviders/CHANGELOG.json +++ b/packages/subproviders/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "2.1.4", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "2.1.3", diff --git a/packages/subproviders/CHANGELOG.md b/packages/subproviders/CHANGELOG.md index c618a2067..eda76bd2f 100644 --- a/packages/subproviders/CHANGELOG.md +++ b/packages/subproviders/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.1.4 - _November 14, 2018_ + + * Dependencies updated + ## v2.1.3 - _November 13, 2018_ * Dependencies updated diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json index 6c9da5f37..1ef16e112 100644 --- a/packages/utils/CHANGELOG.json +++ b/packages/utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "2.0.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "2.0.4", "changes": [ diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 4fdd13d9c..9846dd344 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.5 - _November 14, 2018_ + + * Dependencies updated + ## v2.0.4 - _November 9, 2018_ * Dependencies updated diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index 8390f3804..b938f6986 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542208198, + "version": "3.1.4", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542134075, "version": "3.1.3", diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index c9fc00beb..70a00ee1e 100644 --- a/packages/web3-wrapper/CHANGELOG.md +++ b/packages/web3-wrapper/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.1.4 - _November 14, 2018_ + + * Dependencies updated + ## v3.1.3 - _November 13, 2018_ * Dependencies updated -- cgit v1.2.3 From fe1b7f15e8531615a54e46581cb734e635d3c755 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 14 Nov 2018 16:16:46 +0100 Subject: Publish - 0x.js@2.0.4 - @0x/abi-gen@1.0.16 - @0x/abi-gen-wrappers@1.0.5 - @0x/assert@1.0.17 - @0x/asset-buyer@3.0.0 - @0x/base-contract@3.0.6 - @0x/connect@3.0.6 - @0x/contract-wrappers@4.0.2 - contracts@2.1.54 - @0x/dev-tools-pages@0.0.6 - @0x/dev-utils@1.0.17 - @0x/fill-scenarios@1.0.12 - @0x/instant@0.0.7 - @0x/json-schemas@2.1.1 - @0x/metacoin@0.0.28 - @0x/migrations@2.0.4 - @0x/order-utils@3.0.2 - @0x/order-watcher@2.2.4 - @0x/react-docs@1.0.18 - @0x/react-shared@1.0.21 - @0x/sol-compiler@1.1.12 - @0x/sol-cov@2.1.12 - @0x/sol-doc@1.0.7 - @0x/sra-spec@1.0.10 - @0x/subproviders@2.1.4 - @0x/testnet-faucets@1.0.56 - @0x/utils@2.0.5 - @0x/web3-wrapper@3.1.4 - @0x/website@0.0.59 --- packages/0x.js/package.json | 26 +++++++++++++------------- packages/abi-gen-wrappers/package.json | 10 +++++----- packages/abi-gen/package.json | 4 ++-- packages/assert/package.json | 6 +++--- packages/asset-buyer/package.json | 18 +++++++++--------- packages/base-contract/package.json | 6 +++--- packages/connect/package.json | 10 +++++----- packages/contract-wrappers/package.json | 22 +++++++++++----------- packages/contracts/package.json | 20 ++++++++++---------- packages/dev-tools-pages/package.json | 4 ++-- packages/dev-utils/package.json | 8 ++++---- packages/fill-scenarios/package.json | 12 ++++++------ packages/instant/package.json | 16 ++++++++-------- packages/json-schemas/package.json | 4 ++-- packages/metacoin/package.json | 18 +++++++++--------- packages/migrations/package.json | 18 +++++++++--------- packages/order-utils/package.json | 16 ++++++++-------- packages/order-watcher/package.json | 24 ++++++++++++------------ packages/react-docs/package.json | 8 ++++---- packages/react-shared/package.json | 4 ++-- packages/sol-compiler/package.json | 12 ++++++------ packages/sol-cov/package.json | 12 ++++++------ packages/sol-doc/package.json | 6 +++--- packages/sra-spec/package.json | 4 ++-- packages/subproviders/package.json | 8 ++++---- packages/testnet-faucets/package.json | 10 +++++----- packages/utils/package.json | 2 +- packages/web3-wrapper/package.json | 8 ++++---- packages/website/package.json | 18 +++++++++--------- 29 files changed, 167 insertions(+), 167 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index c0f1d15d3..755ff7512 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "2.0.3", + "version": "2.0.4", "engines": { "node": ">=6.12" }, @@ -42,11 +42,11 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0x/abi-gen": "^1.0.15", - "@0x/abi-gen-wrappers": "^1.0.4", + "@0x/abi-gen": "^1.0.16", + "@0x/abi-gen-wrappers": "^1.0.5", "@0x/contract-addresses": "^1.1.0", - "@0x/dev-utils": "^1.0.16", - "@0x/migrations": "^2.0.3", + "@0x/dev-utils": "^1.0.17", + "@0x/migrations": "^2.0.4", "@0x/tslint-config": "^1.0.10", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -73,16 +73,16 @@ "webpack": "^4.20.2" }, "dependencies": { - "@0x/assert": "^1.0.16", - "@0x/base-contract": "^3.0.5", - "@0x/contract-wrappers": "^4.0.1", - "@0x/order-utils": "^3.0.1", - "@0x/order-watcher": "^2.2.3", - "@0x/subproviders": "^2.1.3", + "@0x/assert": "^1.0.17", + "@0x/base-contract": "^3.0.6", + "@0x/contract-wrappers": "^4.0.2", + "@0x/order-utils": "^3.0.2", + "@0x/order-watcher": "^2.2.4", + "@0x/subproviders": "^2.1.4", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "@types/web3-provider-engine": "^14.0.0", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 9d7833c7b..7236cf6ff 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -1,6 +1,6 @@ { "name": "@0x/abi-gen-wrappers", - "version": "1.0.4", + "version": "1.0.5", "engines": { "node": ">=6.12" }, @@ -30,17 +30,17 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { - "@0x/abi-gen": "^1.0.15", + "@0x/abi-gen": "^1.0.16", "@0x/tslint-config": "^1.0.10", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5", "shx": "^0.2.2" }, "dependencies": { - "@0x/base-contract": "^3.0.5" + "@0x/base-contract": "^3.0.6" }, "publishConfig": { "access": "public" diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index 5367c9c29..f69d24116 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -1,6 +1,6 @@ { "name": "@0x/abi-gen", - "version": "1.0.15", + "version": "1.0.16", "engines": { "node": ">=6.12" }, @@ -32,7 +32,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md", "dependencies": { "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", + "@0x/utils": "^2.0.5", "chalk": "^2.3.0", "ethereum-types": "^1.1.2", "glob": "^7.1.2", diff --git a/packages/assert/package.json b/packages/assert/package.json index 1db886737..ec093a5be 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,6 +1,6 @@ { "name": "@0x/assert", - "version": "1.0.16", + "version": "1.0.17", "engines": { "node": ">=6.12" }, @@ -44,9 +44,9 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/json-schemas": "^2.1.0", + "@0x/json-schemas": "^2.1.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", + "@0x/utils": "^2.0.5", "lodash": "^4.17.5", "valid-url": "^1.0.9" }, diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json index 2b577a5e2..fad33476b 100644 --- a/packages/asset-buyer/package.json +++ b/packages/asset-buyer/package.json @@ -1,6 +1,6 @@ { "name": "@0x/asset-buyer", - "version": "2.2.2", + "version": "3.0.0", "engines": { "node": ">=6.12" }, @@ -36,16 +36,16 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md", "dependencies": { - "@0x/assert": "^1.0.16", - "@0x/connect": "^3.0.5", - "@0x/contract-wrappers": "^4.0.1", - "@0x/json-schemas": "^2.1.0", - "@0x/order-utils": "^3.0.1", - "@0x/subproviders": "^2.1.3", + "@0x/assert": "^1.0.17", + "@0x/connect": "^3.0.6", + "@0x/contract-wrappers": "^4.0.2", + "@0x/json-schemas": "^2.1.1", + "@0x/order-utils": "^3.0.2", + "@0x/subproviders": "^2.1.4", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "ethereum-types": "^1.1.2", "lodash": "^4.17.10" }, diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index fb418d6fc..b1cdc3cc6 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -1,6 +1,6 @@ { "name": "@0x/base-contract", - "version": "3.0.5", + "version": "3.0.6", "engines": { "node": ">=6.12" }, @@ -41,8 +41,8 @@ }, "dependencies": { "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/connect/package.json b/packages/connect/package.json index fd44fe44a..8e3f3ac8f 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0x/connect", - "version": "3.0.5", + "version": "3.0.6", "engines": { "node": ">=6.12" }, @@ -44,12 +44,12 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { - "@0x/assert": "^1.0.16", - "@0x/json-schemas": "^2.1.0", - "@0x/order-utils": "^3.0.1", + "@0x/assert": "^1.0.17", + "@0x/json-schemas": "^2.1.1", + "@0x/order-utils": "^3.0.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", + "@0x/utils": "^2.0.5", "lodash": "^4.17.5", "query-string": "^5.0.1", "sinon": "^4.0.0", diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 678f42fde..2d6b4e3f8 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -1,6 +1,6 @@ { "name": "@0x/contract-wrappers", - "version": "4.0.1", + "version": "4.0.2", "description": "Smart TS wrappers for 0x smart contracts", "keywords": [ "0xproject", @@ -37,9 +37,9 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.16", - "@0x/migrations": "^2.0.3", - "@0x/subproviders": "^2.1.3", + "@0x/dev-utils": "^1.0.17", + "@0x/migrations": "^2.0.4", + "@0x/subproviders": "^2.1.4", "@0x/tslint-config": "^1.0.10", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -65,17 +65,17 @@ "web3-provider-engine": "14.0.6" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.4", - "@0x/assert": "^1.0.16", + "@0x/abi-gen-wrappers": "^1.0.5", + "@0x/assert": "^1.0.17", "@0x/contract-addresses": "^1.1.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/fill-scenarios": "^1.0.11", - "@0x/json-schemas": "^2.1.0", - "@0x/order-utils": "^3.0.1", + "@0x/fill-scenarios": "^1.0.12", + "@0x/json-schemas": "^2.1.1", + "@0x/order-utils": "^3.0.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "ethereum-types": "^1.1.2", "ethereumjs-blockstream": "6.0.0", "ethereumjs-util": "^5.1.1", diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 7ea31d20c..c87e2e95b 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "contracts", - "version": "2.1.53", + "version": "2.1.54", "engines": { "node": ">=6.12" }, @@ -45,11 +45,11 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md", "devDependencies": { - "@0x/abi-gen": "^1.0.15", - "@0x/dev-utils": "^1.0.16", - "@0x/sol-compiler": "^1.1.11", - "@0x/sol-cov": "^2.1.11", - "@0x/subproviders": "^2.1.3", + "@0x/abi-gen": "^1.0.16", + "@0x/dev-utils": "^1.0.17", + "@0x/sol-compiler": "^1.1.12", + "@0x/sol-cov": "^2.1.12", + "@0x/subproviders": "^2.1.4", "@0x/tslint-config": "^1.0.10", "@types/bn.js": "^4.11.0", "@types/ethereumjs-abi": "^0.6.0", @@ -71,12 +71,12 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0x/base-contract": "^3.0.5", - "@0x/order-utils": "^3.0.1", + "@0x/base-contract": "^3.0.6", + "@0x/order-utils": "^3.0.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "@types/js-combinatorics": "^0.5.29", "bn.js": "^4.11.8", "ethereum-types": "^1.1.2", diff --git a/packages/dev-tools-pages/package.json b/packages/dev-tools-pages/package.json index 01c3c3514..e6d954f15 100644 --- a/packages/dev-tools-pages/package.json +++ b/packages/dev-tools-pages/package.json @@ -1,6 +1,6 @@ { "name": "@0x/dev-tools-pages", - "version": "0.0.5", + "version": "0.0.6", "engines": { "node": ">=6.12" }, @@ -16,7 +16,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@0x/react-shared": "^1.0.20", + "@0x/react-shared": "^1.0.21", "basscss": "^8.0.3", "bowser": "^1.9.3", "less": "^2.7.2", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index aef64e9c1..3db391131 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/dev-utils", - "version": "1.0.16", + "version": "1.0.17", "engines": { "node": ">=6.12" }, @@ -41,11 +41,11 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/subproviders": "^2.1.3", + "@0x/subproviders": "^2.1.4", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "@types/web3-provider-engine": "^14.0.0", "chai": "^4.0.1", "ethereum-types": "^1.1.2", diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index 725bf68cf..2d9bff0e7 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -1,6 +1,6 @@ { "name": "@0x/fill-scenarios", - "version": "1.0.11", + "version": "1.0.12", "description": "0x order fill scenario generator", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -28,14 +28,14 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.4", - "@0x/base-contract": "^3.0.5", + "@0x/abi-gen-wrappers": "^1.0.5", + "@0x/base-contract": "^3.0.6", "@0x/contract-artifacts": "^1.1.0", - "@0x/order-utils": "^3.0.1", + "@0x/order-utils": "^3.0.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/instant/package.json b/packages/instant/package.json index f71fe45ef..6116d67ae 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -1,6 +1,6 @@ { "name": "@0x/instant", - "version": "0.0.6", + "version": "0.0.7", "engines": { "node": ">=6.12" }, @@ -45,15 +45,15 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md", "dependencies": { - "@0x/assert": "^1.0.16", - "@0x/asset-buyer": "^2.2.2", - "@0x/json-schemas": "^2.1.0", - "@0x/order-utils": "^3.0.1", - "@0x/subproviders": "^2.1.3", + "@0x/assert": "^1.0.17", + "@0x/asset-buyer": "^3.0.0", + "@0x/json-schemas": "^2.1.1", + "@0x/order-utils": "^3.0.2", + "@0x/subproviders": "^2.1.4", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "copy-to-clipboard": "^3.0.8", "ethereum-types": "^1.1.2", "lodash": "^4.17.10", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 2f57f5097..fb89a2d5b 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -1,6 +1,6 @@ { "name": "@0x/json-schemas", - "version": "2.1.0", + "version": "2.1.1", "engines": { "node": ">=6.12" }, @@ -46,7 +46,7 @@ }, "devDependencies": { "@0x/tslint-config": "^1.0.10", - "@0x/utils": "^2.0.4", + "@0x/utils": "^2.0.5", "@types/lodash.foreach": "^4.5.3", "@types/lodash.values": "^4.3.3", "@types/mocha": "^2.2.42", diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 91b8f1468..f990db6b0 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -1,6 +1,6 @@ { "name": "@0x/metacoin", - "version": "0.0.27", + "version": "0.0.28", "engines": { "node": ">=6.12" }, @@ -29,15 +29,15 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@0x/abi-gen": "^1.0.15", - "@0x/base-contract": "^3.0.5", - "@0x/sol-cov": "^2.1.11", - "@0x/subproviders": "^2.1.3", + "@0x/abi-gen": "^1.0.16", + "@0x/base-contract": "^3.0.6", + "@0x/sol-cov": "^2.1.12", + "@0x/subproviders": "^2.1.4", "@0x/tslint-config": "^1.0.10", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "@types/mocha": "^5.2.2", "copyfiles": "^2.0.0", "ethereum-types": "^1.1.2", @@ -46,8 +46,8 @@ "run-s": "^0.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.16", - "@0x/sol-compiler": "^1.1.11", + "@0x/dev-utils": "^1.0.17", + "@0x/sol-compiler": "^1.1.12", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", "chai-bignumber": "^2.0.1", diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 654db6495..8eaae96ba 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -1,6 +1,6 @@ { "name": "@0x/migrations", - "version": "2.0.3", + "version": "2.0.4", "engines": { "node": ">=6.12" }, @@ -17,7 +17,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0x/dev-utils": "^1.0.16", + "@0x/dev-utils": "^1.0.17", "@0x/tslint-config": "^1.0.10", "@0x/types": "^1.2.1", "@types/yargs": "^10.0.0", @@ -29,16 +29,16 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.4", - "@0x/base-contract": "^3.0.5", + "@0x/abi-gen-wrappers": "^1.0.5", + "@0x/base-contract": "^3.0.6", "@0x/contract-addresses": "^1.1.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/order-utils": "^3.0.1", - "@0x/sol-compiler": "^1.1.11", - "@0x/subproviders": "^2.1.3", + "@0x/order-utils": "^3.0.2", + "@0x/sol-compiler": "^1.1.12", + "@0x/subproviders": "^2.1.4", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "@ledgerhq/hw-app-eth": "^4.3.0", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index e5eacb272..fe5ea70b1 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/order-utils", - "version": "3.0.1", + "version": "3.0.2", "engines": { "node": ">=6.12" }, @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md", "devDependencies": { - "@0x/dev-utils": "^1.0.16", + "@0x/dev-utils": "^1.0.17", "@0x/tslint-config": "^1.0.10", "@types/bn.js": "^4.11.0", "@types/lodash": "4.14.104", @@ -53,15 +53,15 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.4", - "@0x/assert": "^1.0.16", - "@0x/base-contract": "^3.0.5", + "@0x/abi-gen-wrappers": "^1.0.5", + "@0x/assert": "^1.0.17", + "@0x/base-contract": "^3.0.6", "@0x/contract-artifacts": "^1.1.0", - "@0x/json-schemas": "^2.1.0", + "@0x/json-schemas": "^2.1.1", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "@types/node": "*", "bn.js": "^4.11.8", "ethereum-types": "^1.1.2", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 2bab37908..af88a120e 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@0x/order-watcher", - "version": "2.2.3", + "version": "2.2.4", "description": "An order watcher daemon that watches for order validity", "keywords": [ "0x", @@ -33,8 +33,8 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.16", - "@0x/migrations": "^2.0.3", + "@0x/dev-utils": "^1.0.17", + "@0x/migrations": "^2.0.4", "@0x/tslint-config": "^1.0.10", "@types/bintrees": "^1.0.2", "@types/lodash": "4.14.104", @@ -57,19 +57,19 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.4", - "@0x/assert": "^1.0.16", - "@0x/base-contract": "^3.0.5", + "@0x/abi-gen-wrappers": "^1.0.5", + "@0x/assert": "^1.0.17", + "@0x/base-contract": "^3.0.6", "@0x/contract-addresses": "^1.1.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/contract-wrappers": "^4.0.1", - "@0x/fill-scenarios": "^1.0.11", - "@0x/json-schemas": "^2.1.0", - "@0x/order-utils": "^3.0.1", + "@0x/contract-wrappers": "^4.0.2", + "@0x/fill-scenarios": "^1.0.12", + "@0x/json-schemas": "^2.1.1", + "@0x/order-utils": "^3.0.2", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "bintrees": "^1.0.2", "ethereum-types": "^1.1.2", "ethereumjs-blockstream": "6.0.0", diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index 31101becb..3e77a9a07 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -1,6 +1,6 @@ { "name": "@0x/react-docs", - "version": "1.0.17", + "version": "1.0.18", "engines": { "node": ">=6.12" }, @@ -24,7 +24,7 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0x/dev-utils": "^1.0.16", + "@0x/dev-utils": "^1.0.17", "@0x/tslint-config": "^1.0.10", "@types/compare-versions": "^3.0.0", "@types/styled-components": "^4.0.0", @@ -34,9 +34,9 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/react-shared": "^1.0.20", + "@0x/react-shared": "^1.0.21", "@0x/types": "^1.2.1", - "@0x/utils": "^2.0.4", + "@0x/utils": "^2.0.5", "@types/lodash": "4.14.104", "@types/material-ui": "^0.20.0", "@types/node": "*", diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index e372178b1..d2a00ca9c 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -1,6 +1,6 @@ { "name": "@0x/react-shared", - "version": "1.0.20", + "version": "1.0.21", "engines": { "node": ">=6.12" }, @@ -25,7 +25,7 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0x/dev-utils": "^1.0.16", + "@0x/dev-utils": "^1.0.17", "@0x/tslint-config": "^1.0.10", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 4c3d0928f..2904cfd23 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-compiler", - "version": "1.1.11", + "version": "1.1.12", "engines": { "node": ">=6.12" }, @@ -42,7 +42,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md", "devDependencies": { - "@0x/dev-utils": "^1.0.16", + "@0x/dev-utils": "^1.0.17", "@0x/tslint-config": "^1.0.10", "@types/mkdirp": "^0.5.2", "@types/require-from-string": "^1.2.0", @@ -65,13 +65,13 @@ "zeppelin-solidity": "1.8.0" }, "dependencies": { - "@0x/assert": "^1.0.16", - "@0x/json-schemas": "^2.1.0", + "@0x/assert": "^1.0.17", + "@0x/json-schemas": "^2.1.1", "@0x/sol-resolver": "^1.0.16", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "@types/yargs": "^11.0.0", "chalk": "^2.3.0", "ethereum-types": "^1.1.2", diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index b5f84a43b..159a2207d 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-cov", - "version": "2.1.11", + "version": "2.1.12", "engines": { "node": ">=6.12" }, @@ -42,12 +42,12 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md", "dependencies": { - "@0x/dev-utils": "^1.0.16", - "@0x/sol-compiler": "^1.1.11", - "@0x/subproviders": "^2.1.3", + "@0x/dev-utils": "^1.0.17", + "@0x/sol-compiler": "^1.1.12", + "@0x/subproviders": "^2.1.4", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "@types/solidity-parser-antlr": "^0.2.0", "ethereum-types": "^1.1.2", "ethereumjs-util": "^5.1.1", diff --git a/packages/sol-doc/package.json b/packages/sol-doc/package.json index 22de4b764..e56408f98 100644 --- a/packages/sol-doc/package.json +++ b/packages/sol-doc/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-doc", - "version": "1.0.6", + "version": "1.0.7", "description": "Solidity documentation generator", "main": "lib/src/index.js", "types": "lib/src/index.d.js", @@ -25,9 +25,9 @@ "author": "F. Eugene Aumson", "license": "Apache-2.0", "dependencies": { - "@0x/sol-compiler": "^1.1.11", + "@0x/sol-compiler": "^1.1.12", "@0x/types": "^1.2.1", - "@0x/utils": "^2.0.4", + "@0x/utils": "^2.0.5", "ethereum-types": "^1.1.2", "ethereumjs-util": "^5.1.1", "lodash": "^4.17.10", diff --git a/packages/sra-spec/package.json b/packages/sra-spec/package.json index 1b7d0ccab..fac5a5a4b 100644 --- a/packages/sra-spec/package.json +++ b/packages/sra-spec/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sra-spec", - "version": "1.0.9", + "version": "1.0.10", "engines": { "node": ">=6.12" }, @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md", "dependencies": { - "@0x/json-schemas": "^2.1.0", + "@0x/json-schemas": "^2.1.1", "@loopback/openapi-v3-types": "^0.8.2" }, "devDependencies": { diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index aa6026d96..d249e4d6d 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -1,6 +1,6 @@ { "name": "@0x/subproviders", - "version": "2.1.3", + "version": "2.1.4", "engines": { "node": ">=6.12" }, @@ -29,11 +29,11 @@ } }, "dependencies": { - "@0x/assert": "^1.0.16", + "@0x/assert": "^1.0.17", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "@ledgerhq/hw-app-eth": "^4.3.0", "@ledgerhq/hw-transport-u2f": "4.24.0", "@types/eth-lightwallet": "^3.0.0", diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index bb4a31654..ac720a748 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@0x/testnet-faucets", - "version": "1.0.55", + "version": "1.0.56", "engines": { "node": ">=6.12" }, @@ -18,11 +18,11 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^2.0.3", - "@0x/subproviders": "^2.1.3", + "0x.js": "^2.0.4", + "@0x/subproviders": "^2.1.4", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "body-parser": "^1.17.1", "ethereum-types": "^1.1.2", "ethereumjs-tx": "^1.3.5", diff --git a/packages/utils/package.json b/packages/utils/package.json index 24c2496b0..4b924226f 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/utils", - "version": "2.0.4", + "version": "2.0.5", "engines": { "node": ">=6.12" }, diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 6676db6d2..2469f7627 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@0x/web3-wrapper", - "version": "3.1.3", + "version": "3.1.4", "engines": { "node": ">=6.12" }, @@ -53,10 +53,10 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/assert": "^1.0.16", - "@0x/json-schemas": "^2.1.0", + "@0x/assert": "^1.0.17", + "@0x/json-schemas": "^2.1.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", + "@0x/utils": "^2.0.5", "ethereum-types": "^1.1.2", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/packages/website/package.json b/packages/website/package.json index a2c1df695..bb64b24db 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "@0x/website", - "version": "0.0.58", + "version": "0.0.59", "engines": { "node": ">=6.12" }, @@ -20,16 +20,16 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "@0x/contract-wrappers": "^4.0.1", - "@0x/json-schemas": "^2.1.0", - "@0x/order-utils": "^3.0.1", - "@0x/react-docs": "^1.0.17", - "@0x/react-shared": "^1.0.20", - "@0x/subproviders": "^2.1.3", + "@0x/contract-wrappers": "^4.0.2", + "@0x/json-schemas": "^2.1.1", + "@0x/order-utils": "^3.0.2", + "@0x/react-docs": "^1.0.18", + "@0x/react-shared": "^1.0.21", + "@0x/subproviders": "^2.1.4", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.4", - "@0x/web3-wrapper": "^3.1.3", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "accounting": "^0.4.1", "basscss": "^8.0.3", "blockies": "^0.0.2", -- cgit v1.2.3 From 997912a8f8647fed9ff10570e332ff84807907aa Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 13 Nov 2018 22:54:15 -0800 Subject: fix(instant): fix tabbing into erc20 token selector --- packages/instant/src/components/erc20_token_selector.tsx | 1 + packages/instant/src/components/ui/input.tsx | 1 + 2 files changed, 2 insertions(+) (limited to 'packages') diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index d4a77c278..afa3f84c3 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -39,6 +39,7 @@ export class ERC20TokenSelector extends React.Component width="100%" value={this.state.searchQuery} onChange={this._handleSearchInputChange} + tabindex={-1} /> {_.map(tokens, token => { diff --git a/packages/instant/src/components/ui/input.tsx b/packages/instant/src/components/ui/input.tsx index 2fb408db4..184f89066 100644 --- a/packages/instant/src/components/ui/input.tsx +++ b/packages/instant/src/components/ui/input.tsx @@ -3,6 +3,7 @@ import * as React from 'react'; import { ColorOption, styled } from '../../style/theme'; export interface InputProps { + tabindex?: number; className?: string; value?: string; width?: string; -- cgit v1.2.3 From 7688037fb86334ec2913c6fa850b6514fd9986b8 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 13 Nov 2018 23:14:23 -0800 Subject: fix(instant): border radius --- packages/instant/src/components/instant_heading.tsx | 7 +------ packages/instant/src/components/ui/container.tsx | 4 ++-- packages/instant/src/components/zero_ex_instant_container.tsx | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 7f9567454..002695269 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -32,12 +32,7 @@ export class InstantHeading extends React.Component { public render(): React.ReactNode { const iconOrAmounts = this._renderIcon() || this._renderAmountsSection(); return ( - + cssRuleIfExists(props, 'margin-bottom')} ${props => cssRuleIfExists(props, 'margin-left')} ${props => cssRuleIfExists(props, 'padding')} - ${props => cssRuleIfExists(props, 'border-radius')} ${props => cssRuleIfExists(props, 'border')} ${props => cssRuleIfExists(props, 'border-top')} ${props => cssRuleIfExists(props, 'border-bottom')} @@ -70,6 +69,7 @@ export const Container = ${props => props.display && stylesForMedia('display', props.display)} ${props => props.width && stylesForMedia('width', props.width)} ${props => props.height && stylesForMedia('height', props.height)} + ${props => props.borderRadius && stylesForMedia('border-radius', props.borderRadius)} background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')}; border-color: ${props => (props.borderColor ? props.theme[props.borderColor] : 'none')}; &:hover { diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index c0a197590..698bfef17 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -43,7 +43,7 @@ export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantCon zIndex={zIndex.mainContainer} position="relative" backgroundColor={ColorOption.white} - borderRadius="3px" + borderRadius={{ default: '3px', sm: '0px' }} hasBoxShadow={true} overflow="hidden" height="100%" -- cgit v1.2.3 From adce627888c126bec2ea008ddae7187bfa143625 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 13 Nov 2018 23:23:23 -0800 Subject: fix(instant): match token search on prefix --- packages/instant/src/components/erc20_token_selector.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index afa3f84c3..78741a617 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -63,8 +63,10 @@ export class ERC20TokenSelector extends React.Component if (_.isUndefined(searchQuery)) { return true; } - const stringToSearch = `${token.metaData.name} ${token.metaData.symbol}`; - return _.includes(stringToSearch.toLowerCase(), searchQuery.toLowerCase()); + const searchQueryLowerCase = searchQuery.toLowerCase(); + const tokenName = token.metaData.name.toLowerCase(); + const tokenSymbol = token.metaData.symbol.toLowerCase(); + return _.startsWith(tokenSymbol, searchQueryLowerCase) || _.startsWith(tokenName, searchQueryLowerCase); }; } -- cgit v1.2.3 From 504f4d9eb99589b4d9071a6f13cea9dcc11f226d Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 14 Nov 2018 14:02:34 -0800 Subject: fix(instant): fix tabIndex attribute error --- packages/instant/src/components/erc20_token_selector.tsx | 2 +- packages/instant/src/components/ui/input.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index 78741a617..e4d8749a9 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -39,7 +39,7 @@ export class ERC20TokenSelector extends React.Component width="100%" value={this.state.searchQuery} onChange={this._handleSearchInputChange} - tabindex={-1} + tabIndex={-1} /> {_.map(tokens, token => { diff --git a/packages/instant/src/components/ui/input.tsx b/packages/instant/src/components/ui/input.tsx index 184f89066..1ea5d8fe1 100644 --- a/packages/instant/src/components/ui/input.tsx +++ b/packages/instant/src/components/ui/input.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { ColorOption, styled } from '../../style/theme'; export interface InputProps { - tabindex?: number; + tabIndex?: number; className?: string; value?: string; width?: string; -- cgit v1.2.3 From fe23bf9e51dab87ee8c8995a9d53438daff19ea0 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 14 Nov 2018 14:54:41 -0800 Subject: feat: use capital values for enums --- packages/instant/src/constants.ts | 9 ++++++++- packages/instant/src/types.ts | 36 ++++++++++++++++++------------------ packages/instant/src/util/env.ts | 36 +++++++++++++++++------------------- 3 files changed, 43 insertions(+), 38 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index 8170ae354..5bd2349b3 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -1,6 +1,6 @@ import { BigNumber } from '@0x/utils'; -import { AccountNotReady, AccountState, Network } from './types'; +import { AccountNotReady, AccountState, Network, ProviderType } from './types'; export const BIG_NUMBER_ZERO = new BigNumber(0); export const ETH_DECIMALS = 18; @@ -41,3 +41,10 @@ export const LOADING_ACCOUNT: AccountNotReady = { export const LOCKED_ACCOUNT: AccountNotReady = { state: AccountState.Locked, }; +export const PROVIDER_TYPE_TO_NAME: { [key in ProviderType]: string } = { + [ProviderType.Cipher]: 'Cipher', + [ProviderType.MetaMask]: 'MetaMask', + [ProviderType.Mist]: 'Mist', + [ProviderType.CoinbaseWallet]: 'Coinbase Wallet', + [ProviderType.Parity]: 'Parity', +}; diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index cbb1e2caf..67f21a396 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -140,28 +140,28 @@ export interface StandardSlidingPanelSettings { } export enum Browser { - Chrome = 'Chrome', - Firefox = 'Firefox', - Opera = 'Opera', - Safari = 'Safari', - Edge = 'Edge', - Other = 'Other', + Chrome = 'CHROME', + Firefox = 'FIREFOX', + Opera = 'OPERA', + Safari = 'SAFARI', + Edge = 'EDGE', + Other = 'OTHER', } export enum OperatingSystem { - Android = 'Android', - iOS = 'iOS', - Mac = 'Mac', - Windows = 'Windows', - WindowsPhone = 'WindowsPhone', - Linux = 'Linux', - Other = 'Other', + Android = 'ANDROID', + iOS = 'IOS', + Mac = 'MAC', + Windows = 'WINDOWS', + WindowsPhone = 'WINDOWS_PHONE', + Linux = 'LINUX', + Other = 'OTHER', } export enum ProviderType { - Parity = 'Parity', - MetaMask = 'MetaMask', - Mist = 'Mist', - CoinbaseWallet = 'Coinbase Wallet', - Cipher = 'Cipher', + Parity = 'PARITY', + MetaMask = 'META_MASK', + Mist = 'MIST', + CoinbaseWallet = 'COINBASE_WALLET', + Cipher = 'CIPHER', } diff --git a/packages/instant/src/util/env.ts b/packages/instant/src/util/env.ts index 448ad5262..4a32f9cb1 100644 --- a/packages/instant/src/util/env.ts +++ b/packages/instant/src/util/env.ts @@ -2,6 +2,7 @@ import * as bowser from 'bowser'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; +import { PROVIDER_TYPE_TO_NAME } from '../constants'; import { Browser, OperatingSystem, ProviderType } from '../types'; export const envUtil = { @@ -40,28 +41,25 @@ export const envUtil = { return OperatingSystem.Other; } }, - getProviderName(provider: Provider): ProviderType | string { - const constructorName = provider.constructor.name; - let parsedProviderName = constructorName; - // https://ethereum.stackexchange.com/questions/24266/elegant-way-to-detect-current-provider-int-web3-js - switch (constructorName) { - case 'EthereumProvider': - parsedProviderName = ProviderType.Mist; - break; - - default: - parsedProviderName = constructorName; - break; - } - if ((provider as any).isParity) { - parsedProviderName = ProviderType.Parity; + getProviderType(provider: Provider): ProviderType | undefined { + if (provider.constructor.name === 'EthereumProvider') { + return ProviderType.Mist; + } else if ((provider as any).isParity) { + return ProviderType.Parity; } else if ((provider as any).isMetaMask) { - parsedProviderName = ProviderType.MetaMask; + return ProviderType.MetaMask; } else if (!_.isUndefined(_.get(window, 'SOFA'))) { - parsedProviderName = ProviderType.CoinbaseWallet; + return ProviderType.CoinbaseWallet; } else if (!_.isUndefined(_.get(window, '__CIPHER__'))) { - parsedProviderName = ProviderType.Cipher; + return ProviderType.Cipher; + } + return; + }, + getProviderName(provider: Provider): string { + const providerTypeIfExists = envUtil.getProviderType(provider); + if (_.isUndefined(providerTypeIfExists)) { + return provider.constructor.name; } - return parsedProviderName; + return PROVIDER_TYPE_TO_NAME[providerTypeIfExists]; }, }; -- cgit v1.2.3 From f2a6feff29ea990eb3fbf22726a4ff772fd8bfbc Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 14 Nov 2018 15:10:47 -0800 Subject: fix(website): currentProvider called on undefined --- packages/website/ts/blockchain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 25430c1c7..37f746f7c 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -591,7 +591,7 @@ export class Blockchain { } } else { const injectedWeb3IfExists = (window as any).web3; - if (!_.isUndefined(injectedWeb3IfExists.currentProvider)) { + if (!_.isUndefined(injectedWeb3IfExists) && !_.isUndefined(injectedWeb3IfExists.currentProvider)) { injectedProviderIfExists = injectedWeb3IfExists.currentProvider; } else { return undefined; -- cgit v1.2.3 From 408bbdb52e90a213df6a21ccfc66c2972ca6c790 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 14 Nov 2018 15:13:07 -0800 Subject: fix(website): remove node env definition from webpack --- packages/website/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'packages') diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js index ec265be93..33d5f648b 100644 --- a/packages/website/webpack.config.js +++ b/packages/website/webpack.config.js @@ -100,7 +100,6 @@ module.exports = (_env, argv) => { new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new webpack.DefinePlugin({ 'process.env': { - NODE_ENV: JSON.stringify(process.env.NODE_ENV), GIT_SHA: JSON.stringify(GIT_SHA), }, }), -- cgit v1.2.3 From 8e81b0680f407519a789c4f3de6245a8bafd3e72 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 14 Nov 2018 15:48:25 -0800 Subject: feat: expose webpack-dev-server content to local network --- packages/instant/package.json | 3 ++- packages/instant/webpack.config.js | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/instant/package.json b/packages/instant/package.json index 3ad043c2b..23e1d57fe 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -52,9 +52,9 @@ "@0x/subproviders": "^2.1.4", "@0x/types": "^1.2.1", "@0x/typescript-typings": "^3.0.4", - "bowser": "^2.0.0-beta.3", "@0x/utils": "^2.0.5", "@0x/web3-wrapper": "^3.1.4", + "bowser": "^2.0.0-beta.3", "copy-to-clipboard": "^3.0.8", "ethereum-types": "^1.1.2", "lodash": "^4.17.10", @@ -83,6 +83,7 @@ "awesome-typescript-loader": "^5.2.1", "enzyme": "^3.6.0", "enzyme-adapter-react-16": "^1.5.0", + "ip": "^1.1.5", "jest": "^23.6.0", "make-promises-safe": "^1.1.0", "npm-run-all": "^4.1.2", diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index 78a33ce90..c566237e6 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -1,7 +1,8 @@ const path = require('path'); +const ip = require('ip'); // The common js bundle (not this one) is built using tsc. // The umd bundle (this one) has a different entrypoint. -module.exports = { +const config = { entry: './src/index.umd.ts', output: { filename: '[name].bundle.js', @@ -24,5 +25,15 @@ module.exports = { devServer: { contentBase: path.join(__dirname, 'public'), port: 5000, + host: '0.0.0.0', + after: () => { + if (config.devServer.host === '0.0.0.0') { + console.log( + `webpack-dev-server can be accessed externally at: ${ip.address()}:${config.devServer.port}`, + ); + } + }, }, }; + +module.exports = config; -- cgit v1.2.3 From 633d17ffdeed4cd950f9d55f58b572f96390a63a Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 15 Nov 2018 09:41:20 -0800 Subject: fix: add http to external url string --- packages/instant/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index c566237e6..3129e13a6 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -29,7 +29,7 @@ const config = { after: () => { if (config.devServer.host === '0.0.0.0') { console.log( - `webpack-dev-server can be accessed externally at: ${ip.address()}:${config.devServer.port}`, + `webpack-dev-server can be accessed externally at: http://${ip.address()}:${config.devServer.port}`, ); } }, -- cgit v1.2.3 From b01db9141b90ed98c48c62823b6553873f940d0b Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 14 Nov 2018 16:00:03 -0800 Subject: feat: use stable version of bowser --- packages/instant/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/package.json b/packages/instant/package.json index 23e1d57fe..6caa3902b 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -54,7 +54,7 @@ "@0x/typescript-typings": "^3.0.4", "@0x/utils": "^2.0.5", "@0x/web3-wrapper": "^3.1.4", - "bowser": "^2.0.0-beta.3", + "bowser": "^1.9.4", "copy-to-clipboard": "^3.0.8", "ethereum-types": "^1.1.2", "lodash": "^4.17.10", -- cgit v1.2.3 From 29747a04874579d194f7f039b77bfcbcf33ed0c6 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 14 Nov 2018 16:15:29 -0800 Subject: feat: use blue for wallet prompt on mobile --- .../src/components/install_wallet_panel_content.tsx | 7 ++++++- packages/instant/src/components/payment_method.tsx | 6 +++++- packages/instant/src/components/wallet_prompt.tsx | 21 +++++++++++++++++---- packages/instant/src/style/theme.ts | 6 ++++-- 4 files changed, 32 insertions(+), 8 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/install_wallet_panel_content.tsx b/packages/instant/src/components/install_wallet_panel_content.tsx index 5cba8d996..3cc5ccc6b 100644 --- a/packages/instant/src/components/install_wallet_panel_content.tsx +++ b/packages/instant/src/components/install_wallet_panel_content.tsx @@ -104,7 +104,12 @@ export class InstallWalletPanelContent extends React.Component + ), diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index f9d02ec5b..662dd9d22 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -78,6 +78,9 @@ export class PaymentMethod extends React.Component { const { account, network } = this.props; const isMobile = envUtil.isMobileOperatingSystem(); const logo = isMobile ? : ; + const primaryColor = isMobile ? ColorOption.darkBlue : ColorOption.darkOrange; + const secondaryColor = isMobile ? ColorOption.lightBlue : ColorOption.lightOrange; + const colors = { primaryColor, secondaryColor }; switch (account.state) { case AccountState.Loading: // Just take up the same amount of space as the other states. @@ -87,13 +90,14 @@ export class PaymentMethod extends React.Component { } + {...colors} > Please Unlock {this.props.walletName} ); case AccountState.None: return ( - + {isMobile ? 'Install Coinbase Wallet' : 'Install MetaMask'} ); diff --git a/packages/instant/src/components/wallet_prompt.tsx b/packages/instant/src/components/wallet_prompt.tsx index bcf66ee81..a0b3ae457 100644 --- a/packages/instant/src/components/wallet_prompt.tsx +++ b/packages/instant/src/components/wallet_prompt.tsx @@ -9,13 +9,21 @@ import { Text } from './ui/text'; export interface WalletPromptProps { image: React.ReactNode; onClick?: () => void; + primaryColor: ColorOption; + secondaryColor: ColorOption; } -export const WalletPrompt: React.StatelessComponent = ({ onClick, image, children }) => ( +export const WalletPrompt: React.StatelessComponent = ({ + onClick, + image, + children, + secondaryColor, + primaryColor, +}) => ( = ({ onCl {image} - + {children} ); + +WalletPrompt.defaultProps = { + primaryColor: ColorOption.darkOrange, + secondaryColor: ColorOption.lightOrange, +}; diff --git a/packages/instant/src/style/theme.ts b/packages/instant/src/style/theme.ts index 489f11dc3..a0751286b 100644 --- a/packages/instant/src/style/theme.ts +++ b/packages/instant/src/style/theme.ts @@ -17,7 +17,8 @@ export enum ColorOption { darkOrange = 'darkOrange', green = 'green', red = 'red', - blue = 'blue', + darkBlue = 'darkBlue', + lightBlue = 'lightBlue', } export const theme: Theme = { @@ -33,7 +34,8 @@ export const theme: Theme = { darkOrange: '#F2994C', green: '#3CB34F', red: '#D00000', - blue: '#135df6', + darkBlue: '#135df6', + lightBlue: '#F2F7FF', }; export const transparentWhite = 'rgba(255,255,255,0.3)'; -- cgit v1.2.3 From f4cc152cfb6da5c13d2d95ccd2f1a022af9b91a0 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 14 Nov 2018 16:18:16 -0800 Subject: chore: remove wallet panel content for mobile --- .../components/install_wallet_panel_content.tsx | 52 +--------------------- 1 file changed, 1 insertion(+), 51 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/install_wallet_panel_content.tsx b/packages/instant/src/components/install_wallet_panel_content.tsx index 3cc5ccc6b..88c26f59c 100644 --- a/packages/instant/src/components/install_wallet_panel_content.tsx +++ b/packages/instant/src/components/install_wallet_panel_content.tsx @@ -1,19 +1,15 @@ import * as React from 'react'; import { - COINBASE_WALLET_ANDROID_APP_STORE_URL, - COINBASE_WALLET_IOS_APP_STORE_URL, - COINBASE_WALLET_SITE_URL, META_MASK_CHROME_STORE_URL, META_MASK_FIREFOX_STORE_URL, META_MASK_OPERA_STORE_URL, META_MASK_SITE_URL, } from '../constants'; import { ColorOption } from '../style/theme'; -import { Browser, OperatingSystem } from '../types'; +import { Browser } from '../types'; import { envUtil } from '../util/env'; -import { CoinbaseWalletLogo } from './coinbase_wallet_logo'; import { MetaMaskLogo } from './meta_mask_logo'; import { StandardPanelContent, StandardPanelContentProps } from './standard_panel_content'; import { Button } from './ui/button'; @@ -26,14 +22,6 @@ export class InstallWalletPanelContent extends React.Component; } private readonly _getStandardPanelContentProps = (): StandardPanelContentProps => { - const isMobileOS = envUtil.isMobileOperatingSystem(); - if (isMobileOS) { - return this._getMobilePanelContentProps(); - } else { - return this._getDesktopPanelContentProps(); - } - }; - private readonly _getDesktopPanelContentProps = (): StandardPanelContentProps => { const browser = envUtil.getBrowser(); let description = 'Please install the MetaMask wallet browser extension.'; let actionText = 'Learn More'; @@ -77,42 +65,4 @@ export class InstallWalletPanelContent extends React.Component { - const operatingSystem = envUtil.getOperatingSystem(); - let description = 'Please install the Coinbase Wallet app.'; - let actionText = 'Learn More'; - let actionUrl = COINBASE_WALLET_SITE_URL; - switch (operatingSystem) { - case OperatingSystem.Android: - description = 'Please install the Coinbase Wallet app from the Google Play Store.'; - actionText = 'Get Coinbase Wallet'; - actionUrl = COINBASE_WALLET_ANDROID_APP_STORE_URL; - break; - case OperatingSystem.iOS: - description = 'Please install the Coinbase Wallet app from the iOS App Store.'; - actionText = 'Get Coinbase Wallet'; - actionUrl = COINBASE_WALLET_IOS_APP_STORE_URL; - break; - default: - break; - } - return { - image: , - description, - moreInfoSettings: { - href: COINBASE_WALLET_SITE_URL, - text: 'What is Coinbase Wallet?', - }, - action: ( - - ), - }; - }; } -- cgit v1.2.3 From f9e012398606a85d286087f3e94bf8b95a52df55 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 14 Nov 2018 16:27:27 -0800 Subject: feat: make onUnlockWalletClick different based on ON --- .../src/components/coinbase_wallet_logo.tsx | 33 +++------------------- packages/instant/src/components/payment_method.tsx | 33 +++++++++++++++++++--- .../containers/connected_account_payment_method.ts | 27 ++++++++++++++++-- 3 files changed, 58 insertions(+), 35 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/coinbase_wallet_logo.tsx b/packages/instant/src/components/coinbase_wallet_logo.tsx index f3c9ccdc2..845b96d73 100644 --- a/packages/instant/src/components/coinbase_wallet_logo.tsx +++ b/packages/instant/src/components/coinbase_wallet_logo.tsx @@ -5,22 +5,13 @@ export interface CoinbaseWalletLogoProps { } export const CoinbaseWalletLogo: React.StatelessComponent = ({ width }) => ( - - + + - ); @@ -30,19 +21,3 @@ CoinbaseWalletLogo.displayName = 'CoinbaseWalletLogo'; CoinbaseWalletLogo.defaultProps = { width: 164, }; - -export interface CoinbaseWalletAppLogoProps { - width?: number; -} - -export const CoinbaseWalletAppLogo: React.StatelessComponent = ({ width }) => ( - - - - -); diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 662dd9d22..21bb2902b 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -1,11 +1,16 @@ import * as _ from 'lodash'; import * as React from 'react'; +import { + COINBASE_WALLET_ANDROID_APP_STORE_URL, + COINBASE_WALLET_IOS_APP_STORE_URL, + COINBASE_WALLET_SITE_URL, +} from '../constants'; import { ColorOption } from '../style/theme'; -import { Account, AccountState, Network } from '../types'; +import { Account, AccountState, Network, OperatingSystem } from '../types'; import { envUtil } from '../util/env'; -import { CoinbaseWalletAppLogo } from './coinbase_wallet_logo'; +import { CoinbaseWalletLogo } from './coinbase_wallet_logo'; import { MetaMaskLogo } from './meta_mask_logo'; import { PaymentMethodDropdown } from './payment_method_dropdown'; import { Circle } from './ui/circle'; @@ -77,7 +82,7 @@ export class PaymentMethod extends React.Component { private readonly _renderMainContent = (): React.ReactNode => { const { account, network } = this.props; const isMobile = envUtil.isMobileOperatingSystem(); - const logo = isMobile ? : ; + const logo = isMobile ? : ; const primaryColor = isMobile ? ColorOption.darkBlue : ColorOption.darkOrange; const secondaryColor = isMobile ? ColorOption.lightBlue : ColorOption.lightOrange; const colors = { primaryColor, secondaryColor }; @@ -97,7 +102,7 @@ export class PaymentMethod extends React.Component { ); case AccountState.None: return ( - + {isMobile ? 'Install Coinbase Wallet' : 'Install MetaMask'} ); @@ -111,4 +116,24 @@ export class PaymentMethod extends React.Component { ); } }; + private readonly _handleInstallWalletClick = (): void => { + const isMobile = envUtil.isMobileOperatingSystem(); + if (!isMobile) { + this.props.onInstallWalletClick(); + return; + } + const operatingSystem = envUtil.getOperatingSystem(); + let url = COINBASE_WALLET_SITE_URL; + switch (operatingSystem) { + case OperatingSystem.Android: + url = COINBASE_WALLET_ANDROID_APP_STORE_URL; + break; + case OperatingSystem.iOS: + url = COINBASE_WALLET_IOS_APP_STORE_URL; + break; + default: + break; + } + window.open(url, '_blank'); + }; } diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts index 69c2ddf19..beaaccf2f 100644 --- a/packages/instant/src/containers/connected_account_payment_method.ts +++ b/packages/instant/src/containers/connected_account_payment_method.ts @@ -3,10 +3,16 @@ import { connect } from 'react-redux'; import { Dispatch } from 'redux'; import { PaymentMethod, PaymentMethodProps } from '../components/payment_method'; +import { + COINBASE_WALLET_ANDROID_APP_STORE_URL, + COINBASE_WALLET_IOS_APP_STORE_URL, + COINBASE_WALLET_SITE_URL, +} from '../constants'; import { Action, actions } from '../redux/actions'; import { asyncData } from '../redux/async_data'; import { State } from '../redux/reducer'; -import { Network, Omit, ProviderState, StandardSlidingPanelContent } from '../types'; +import { Network, Omit, OperatingSystem, ProviderState, StandardSlidingPanelContent } from '../types'; +import { envUtil } from '../util/env'; export interface ConnectedAccountPaymentMethodProps {} @@ -49,7 +55,24 @@ const mergeProps = ( onInstallWalletClick: connectedDispatch.onInstallWalletClick, walletName: connectedState.providerState.name, onUnlockWalletClick: () => { - connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState); + const isMobile = envUtil.isMobileOperatingSystem(); + if (!isMobile) { + connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState); + return; + } + const operatingSystem = envUtil.getOperatingSystem(); + let url = COINBASE_WALLET_SITE_URL; + switch (operatingSystem) { + case OperatingSystem.Android: + url = COINBASE_WALLET_ANDROID_APP_STORE_URL; + break; + case OperatingSystem.iOS: + url = COINBASE_WALLET_IOS_APP_STORE_URL; + break; + default: + break; + } + window.open(url, '_blank'); }, }); -- cgit v1.2.3 From 4da574560d50f661227ec4d91acf20917c26b17b Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 15 Nov 2018 12:40:28 -0800 Subject: fix: remove redundant handler --- packages/instant/src/components/payment_method.tsx | 22 +--------------------- .../containers/connected_account_payment_method.ts | 10 +++++----- 2 files changed, 6 insertions(+), 26 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 21bb2902b..66ebe1f20 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -102,7 +102,7 @@ export class PaymentMethod extends React.Component { ); case AccountState.None: return ( - + {isMobile ? 'Install Coinbase Wallet' : 'Install MetaMask'} ); @@ -116,24 +116,4 @@ export class PaymentMethod extends React.Component { ); } }; - private readonly _handleInstallWalletClick = (): void => { - const isMobile = envUtil.isMobileOperatingSystem(); - if (!isMobile) { - this.props.onInstallWalletClick(); - return; - } - const operatingSystem = envUtil.getOperatingSystem(); - let url = COINBASE_WALLET_SITE_URL; - switch (operatingSystem) { - case OperatingSystem.Android: - url = COINBASE_WALLET_ANDROID_APP_STORE_URL; - break; - case OperatingSystem.iOS: - url = COINBASE_WALLET_IOS_APP_STORE_URL; - break; - default: - break; - } - window.open(url, '_blank'); - }; } diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts index beaaccf2f..eacbadfca 100644 --- a/packages/instant/src/containers/connected_account_payment_method.ts +++ b/packages/instant/src/containers/connected_account_payment_method.ts @@ -22,7 +22,7 @@ interface ConnectedState { } interface ConnectedDispatch { - onInstallWalletClick: () => void; + openInstallWalletPanel: () => void; unlockWalletAndDispatchToStore: (providerState: ProviderState) => void; } @@ -39,7 +39,7 @@ const mapDispatchToProps = ( dispatch: Dispatch, ownProps: ConnectedAccountPaymentMethodProps, ): ConnectedDispatch => ({ - onInstallWalletClick: () => dispatch(actions.openStandardSlidingPanel(StandardSlidingPanelContent.InstallWallet)), + openInstallWalletPanel: () => dispatch(actions.openStandardSlidingPanel(StandardSlidingPanelContent.InstallWallet)), unlockWalletAndDispatchToStore: async (providerState: ProviderState) => asyncData.fetchAccountInfoAndDispatchToStore(providerState, dispatch, true), }); @@ -52,12 +52,12 @@ const mergeProps = ( ...ownProps, network: connectedState.network, account: connectedState.providerState.account, - onInstallWalletClick: connectedDispatch.onInstallWalletClick, walletName: connectedState.providerState.name, - onUnlockWalletClick: () => { + onUnlockWalletClick: () => connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState), + onInstallWalletClick: () => { const isMobile = envUtil.isMobileOperatingSystem(); if (!isMobile) { - connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState); + connectedDispatch.openInstallWalletPanel(); return; } const operatingSystem = envUtil.getOperatingSystem(); -- cgit v1.2.3 From 447b0f91f9bdc200d14897be94796873c95490c7 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 14:20:19 -0800 Subject: Have heartbeat update not trigger errors --- .../src/components/zero_ex_instant_provider.tsx | 3 +- .../selected_erc20_asset_amount_input.ts | 9 ++++- packages/instant/src/redux/async_data.ts | 4 +- packages/instant/src/util/buy_quote_updater.ts | 44 ++++++++++++---------- packages/instant/src/util/heartbeater_factory.ts | 4 +- 5 files changed, 39 insertions(+), 25 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 18e71edb6..f6dadf3e4 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -113,7 +113,8 @@ export class ZeroExInstantProvider extends React.Component { const { buyOrderState, providerState, selectedAsset, selectedAssetUnitAmount, affiliateInfo } = state; const assetBuyer = providerState.assetBuyer; @@ -97,7 +97,7 @@ export const asyncData = { dispatch, selectedAsset as ERC20Asset, selectedAssetUnitAmount, - shouldSetPending, + { setPending: !options.updateSilently, dispatchErrors: !options.updateSilently }, affiliateInfo, ); } diff --git a/packages/instant/src/util/buy_quote_updater.ts b/packages/instant/src/util/buy_quote_updater.ts index fcdded0a9..eeb792bcf 100644 --- a/packages/instant/src/util/buy_quote_updater.ts +++ b/packages/instant/src/util/buy_quote_updater.ts @@ -16,12 +16,12 @@ export const buyQuoteUpdater = { dispatch: Dispatch, asset: ERC20Asset, assetUnitAmount: BigNumber, - setPending = true, + options: { setPending: boolean; dispatchErrors: boolean }, affiliateInfo?: AffiliateInfo, ): Promise => { // get a new buy quote. const baseUnitValue = Web3Wrapper.toBaseUnitAmount(assetUnitAmount, asset.metaData.decimals); - if (setPending) { + if (options.setPending) { // mark quote as pending dispatch(actions.setQuoteRequestStatePending()); } @@ -30,25 +30,29 @@ export const buyQuoteUpdater = { try { newBuyQuote = await assetBuyer.getBuyQuoteAsync(asset.assetData, baseUnitValue, { feePercentage }); } catch (error) { - dispatch(actions.setQuoteRequestStateFailure()); - let errorMessage; - if (error.message === AssetBuyerError.InsufficientAssetLiquidity) { - const assetName = assetUtils.bestNameForAsset(asset, 'of this asset'); - errorMessage = `Not enough ${assetName} available`; - } else if (error.message === AssetBuyerError.InsufficientZrxLiquidity) { - errorMessage = 'Not enough ZRX available'; - } else if ( - error.message === AssetBuyerError.StandardRelayerApiError || - error.message.startsWith(AssetBuyerError.AssetUnavailable) - ) { - const assetName = assetUtils.bestNameForAsset(asset, 'This asset'); - errorMessage = `${assetName} is currently unavailable`; - } - if (!_.isUndefined(errorMessage)) { - errorFlasher.flashNewErrorMessage(dispatch, errorMessage); - } else { - throw error; + if (options.dispatchErrors) { + dispatch(actions.setQuoteRequestStateFailure()); + let errorMessage; + if (error.message === AssetBuyerError.InsufficientAssetLiquidity) { + const assetName = assetUtils.bestNameForAsset(asset, 'of this asset'); + errorMessage = `Not enough ${assetName} available`; + } else if (error.message === AssetBuyerError.InsufficientZrxLiquidity) { + errorMessage = 'Not enough ZRX available'; + } else if ( + error.message === AssetBuyerError.StandardRelayerApiError || + error.message.startsWith(AssetBuyerError.AssetUnavailable) + ) { + const assetName = assetUtils.bestNameForAsset(asset, 'This asset'); + errorMessage = `${assetName} is currently unavailable`; + } + if (!_.isUndefined(errorMessage)) { + errorFlasher.flashNewErrorMessage(dispatch, errorMessage); + } else { + throw error; + } } + // TODO: report to error reporter on else + return; } // We have a successful new buy quote diff --git a/packages/instant/src/util/heartbeater_factory.ts b/packages/instant/src/util/heartbeater_factory.ts index 06fcdb8bb..2b852fb0d 100644 --- a/packages/instant/src/util/heartbeater_factory.ts +++ b/packages/instant/src/util/heartbeater_factory.ts @@ -17,6 +17,8 @@ export const generateAccountHeartbeater = (options: HeartbeatFactoryOptions): He export const generateBuyQuoteHeartbeater = (options: HeartbeatFactoryOptions): Heartbeater => { const { store, shouldPerformImmediatelyOnStart } = options; return new Heartbeater(async () => { - await asyncData.fetchCurrentBuyQuoteAndDispatchToStore(store.getState(), store.dispatch, false); + await asyncData.fetchCurrentBuyQuoteAndDispatchToStore(store.getState(), store.dispatch, { + updateSilently: true, + }); }, shouldPerformImmediatelyOnStart); }; -- cgit v1.2.3 From 33a156d9b5278c0e85a1fa0fe158440a41bcc60e Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 15:12:43 -0800 Subject: Send in affiliate info as option --- .../src/containers/selected_erc20_asset_amount_input.ts | 11 ++++------- packages/instant/src/redux/async_data.ts | 3 +-- packages/instant/src/util/buy_quote_updater.ts | 5 ++--- 3 files changed, 7 insertions(+), 12 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts index 3e6ef41a0..2c2661e1a 100644 --- a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts @@ -81,14 +81,11 @@ const mapDispatchToProps = ( // even if it's debounced, give them the illusion it's loading dispatch(actions.setQuoteRequestStatePending()); // tslint:disable-next-line:no-floating-promises - debouncedUpdateBuyQuoteAsync( - assetBuyer, - dispatch, - asset, - value, - { setPending: true, dispatchErrors: true }, + debouncedUpdateBuyQuoteAsync(assetBuyer, dispatch, asset, value, { + setPending: true, + dispatchErrors: true, affiliateInfo, - ); + }); } }, }); diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts index f4b3f94bf..5d30388b8 100644 --- a/packages/instant/src/redux/async_data.ts +++ b/packages/instant/src/redux/async_data.ts @@ -97,8 +97,7 @@ export const asyncData = { dispatch, selectedAsset as ERC20Asset, selectedAssetUnitAmount, - { setPending: !options.updateSilently, dispatchErrors: !options.updateSilently }, - affiliateInfo, + { setPending: !options.updateSilently, dispatchErrors: !options.updateSilently, affiliateInfo }, ); } }, diff --git a/packages/instant/src/util/buy_quote_updater.ts b/packages/instant/src/util/buy_quote_updater.ts index eeb792bcf..2fd16d781 100644 --- a/packages/instant/src/util/buy_quote_updater.ts +++ b/packages/instant/src/util/buy_quote_updater.ts @@ -16,8 +16,7 @@ export const buyQuoteUpdater = { dispatch: Dispatch, asset: ERC20Asset, assetUnitAmount: BigNumber, - options: { setPending: boolean; dispatchErrors: boolean }, - affiliateInfo?: AffiliateInfo, + options: { setPending: boolean; dispatchErrors: boolean; affiliateInfo?: AffiliateInfo }, ): Promise => { // get a new buy quote. const baseUnitValue = Web3Wrapper.toBaseUnitAmount(assetUnitAmount, asset.metaData.decimals); @@ -25,7 +24,7 @@ export const buyQuoteUpdater = { // mark quote as pending dispatch(actions.setQuoteRequestStatePending()); } - const feePercentage = oc(affiliateInfo).feePercentage(); + const feePercentage = oc(options.affiliateInfo).feePercentage(); let newBuyQuote: BuyQuote | undefined; try { newBuyQuote = await assetBuyer.getBuyQuoteAsync(asset.assetData, baseUnitValue, { feePercentage }); -- cgit v1.2.3 From 3931202d4a5ad2cb777e3f9e56276a30f2f8dcf0 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 15 Nov 2018 16:43:53 -0800 Subject: fix: remove unused vars --- packages/instant/src/components/payment_method.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx index 66ebe1f20..ebcd62f35 100644 --- a/packages/instant/src/components/payment_method.tsx +++ b/packages/instant/src/components/payment_method.tsx @@ -1,13 +1,8 @@ import * as _ from 'lodash'; import * as React from 'react'; -import { - COINBASE_WALLET_ANDROID_APP_STORE_URL, - COINBASE_WALLET_IOS_APP_STORE_URL, - COINBASE_WALLET_SITE_URL, -} from '../constants'; import { ColorOption } from '../style/theme'; -import { Account, AccountState, Network, OperatingSystem } from '../types'; +import { Account, AccountState, Network } from '../types'; import { envUtil } from '../util/env'; import { CoinbaseWalletLogo } from './coinbase_wallet_logo'; -- cgit v1.2.3 From ae1fb97794f0bc3609deaf9872f53768c3059880 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Thu, 15 Nov 2018 18:00:59 -0800 Subject: chore(instant): fix lint error --- packages/instant/src/components/zero_ex_instant_provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index f6dadf3e4..8be53ee20 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -112,8 +112,8 @@ export class ZeroExInstantProvider extends React.Component