├── .codeclimate.yml ├── .eslintrc ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── branch.sh ├── config ├── env.js ├── jest │ ├── cssTransform.js │ └── fileTransform.js ├── paths.js ├── polyfills.js ├── versionFilePlugin.js ├── webpack.config.dev.js ├── webpack.config.prod.js └── webpackDevServer.config.js ├── jestsetup.js ├── package.json ├── public ├── 200.html ├── OasisToS.pdf └── manifest.json ├── scripts ├── build.js ├── start.js └── test.js ├── src ├── assets │ ├── apple-touch-icon-114x114.png │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-144x144.png │ ├── apple-touch-icon-152x152.png │ ├── apple-touch-icon-57x57.png │ ├── apple-touch-icon-60x60.png │ ├── apple-touch-icon-72x72.png │ ├── apple-touch-icon-76x76.png │ ├── clock.svg │ ├── close_x.svg │ ├── coinbase-icon-512px.png │ ├── coinbase-wallet-wordmark.png │ ├── counter_1.svg │ ├── counter_2.svg │ ├── counter_3.svg │ ├── cross_normal.svg │ ├── cross_pressed.svg │ ├── dapphub_icn_metamask.svg │ ├── dot_red.svg │ ├── eth_circle_icon.svg │ ├── eth_circle_icon_full.svg │ ├── ethereum-logo.svg │ ├── ic_add_circle_24px.svg │ ├── ic_compare_arrows_black_24px.svg │ ├── ic_remove_24px.svg │ ├── icn-mist.svg │ ├── loading.svg │ ├── loadingLarge.svg │ ├── logo-oasis-hover.png │ ├── logo-oasis.png │ ├── metamask-logo.svg │ ├── mist-logo.svg │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── myallowance-disable.svg │ ├── myallowance-maximum.svg │ ├── myallowance-personal.svg │ ├── od-icons │ │ ├── icon-failed.svg │ │ ├── icon-info.svg │ │ ├── icon-loading.svg │ │ ├── icon-syncing.svg │ │ ├── icon-tick.svg │ │ ├── icon-warning.svg │ │ ├── icon_arrow_down.svg │ │ ├── icon_arrow_left.svg │ │ ├── icon_arrow_right.svg │ │ ├── icon_arrow_up.svg │ │ ├── icon_idle.svg │ │ └── od_transition_arrow.svg │ ├── od_metamask.svg │ ├── od_metamask_big.svg │ ├── od_mist.svg │ ├── od_parity.svg │ ├── order-warning-red.svg │ ├── order-warning.svg │ └── remove_button.svg ├── bootstrap │ ├── __mocks__ │ │ └── contracts.js │ ├── cache.js │ ├── contracts.js │ ├── healthcheck.js │ ├── market.js │ ├── network.js │ └── web3.js ├── components │ ├── ClickWarp.jsx │ ├── ClickWarp.scss │ ├── EthereumAddressInput.jsx │ ├── EthereumAddressInput.scss │ ├── EthereumAddressInput.test.js │ ├── EtherscanLink.jsx │ ├── EtherscanLink.scss │ ├── EtherscanLink.test.js │ ├── ExceedsGasLimit.jsx │ ├── ExceedsGasLimit.scss │ ├── ExceedsGasLimit.test.js │ ├── FlexBox.jsx │ ├── FlexBox.scss │ ├── InfoBox.jsx │ ├── InfoBox.scss │ ├── InfoBoxWithIco.jsx │ ├── InfoBoxWithIco.scss │ ├── Locked.jsx │ ├── Locked.scss │ ├── Locked.test.js │ ├── MaskedTokenAmountInput.jsx │ ├── NoConnection.jsx │ ├── NoConnection.scss │ ├── OasisAccordion.jsx │ ├── OasisAccordion.scss │ ├── OasisAccordion.test.js │ ├── OasisAccount.jsx │ ├── OasisAccount.scss │ ├── OasisAccount.test.js │ ├── OasisButton.jsx │ ├── OasisButton.scss │ ├── OasisBuyMaker.jsx │ ├── OasisBuyMaker.scss │ ├── OasisBuyMaker.test.js │ ├── OasisBuyOrders.jsx │ ├── OasisBuyOrders.scss │ ├── OasisBuyOrders.test.js │ ├── OasisCantCancelOffer.jsx │ ├── OasisCantCancelOffer.scss │ ├── OasisCantCancelOffer.test.js │ ├── OasisCard.jsx │ ├── OasisCard.scss │ ├── OasisCard.test.js │ ├── OasisChart.jsx │ ├── OasisChart.scss │ ├── OasisChart.test.js │ ├── OasisChartDepth.jsx │ ├── OasisChartDepth.test.js │ ├── OasisChartPrice.jsx │ ├── OasisChartPrice.test.js │ ├── OasisChartVolume.jsx │ ├── OasisChartVolume.test.js │ ├── OasisDontWrapAllEther.jsx │ ├── OasisDontWrapAllEther.scss │ ├── OasisDontWrapAllEther.test.js │ ├── OasisExpirationDate.jsx │ ├── OasisExpirationDate.scss │ ├── OasisExpirationDate.test.js │ ├── OasisIcon.jsx │ ├── OasisIcon.scss │ ├── OasisIcon.test.js │ ├── OasisInlineTokenBalance.jsx │ ├── OasisInlineTokenBalance.scss │ ├── OasisInlineTokenBalance.test.js │ ├── OasisInsufficientAmountOfToken.jsx │ ├── OasisInsufficientAmountOfToken.scss │ ├── OasisInsufficientAmountOfToken.test.js │ ├── OasisLinkLikeButton.jsx │ ├── OasisLinkLikeButton.scss │ ├── OasisLoadProgressSection.jsx │ ├── OasisLoadProgressSection.scss │ ├── OasisLoadProgressSection.test.js │ ├── OasisLoadingDataOverlay.jsx │ ├── OasisLoadingDataOverlay.scss │ ├── OasisLoadingDataOverlay.test.js │ ├── OasisLoadingIndicator.jsx │ ├── OasisLoadingIndicator.scss │ ├── OasisLoadingIndicator.test.js │ ├── OasisLogo.jsx │ ├── OasisLogo.scss │ ├── OasisLogo.test.js │ ├── OasisMarket.jsx │ ├── OasisMarket.scss │ ├── OasisMarket.test.js │ ├── OasisMarketHistory.jsx │ ├── OasisMarketHistory.scss │ ├── OasisMarketHistory.test.js │ ├── OasisMarketWidget.js │ ├── OasisMarketWidget.scss │ ├── OasisMarketWidgetTradingPairPriceTemplate.jsx │ ├── OasisMarketWidgetVolumeTemplate.jsx │ ├── OasisMessage.jsx │ ├── OasisMessage.scss │ ├── OasisMessage.test.js │ ├── OasisMyOrders.jsx │ ├── OasisMyOrders.scss │ ├── OasisMyOrders.test.js │ ├── OasisOfferCancelModal.jsx │ ├── OasisOfferCancelModal.scss │ ├── OasisOfferCancelModal.test.js │ ├── OasisOfferNotAvailable.jsx │ ├── OasisOfferNotAvailable.scss │ ├── OasisOfferNotAvailable.test.js │ ├── OasisOfferSummary.jsx │ ├── OasisOfferSummary.scss │ ├── OasisOfferSummary.test.js │ ├── OasisOfferTakeWarningBox.jsx │ ├── OasisOfferTakeWarningBox.scss │ ├── OasisOfferTakeWarningBox.test.js │ ├── OasisPleaseProvideEthereumAddress.jsx │ ├── OasisPleaseProvideEthereumAddress.scss │ ├── OasisPleaseProvideEthereumAddress.test.js │ ├── OasisSelect.jsx │ ├── OasisSelect.scss │ ├── OasisSellMaker.jsx │ ├── OasisSellMaker.scss │ ├── OasisSellMaker.test.js │ ├── OasisSellOrders.jsx │ ├── OasisSellOrders.scss │ ├── OasisSellOrders.test.js │ ├── OasisSoldReceivedAmounts.jsx │ ├── OasisSoldReceivedAmounts.scss │ ├── OasisSoldReceivedAmounts.test.js │ ├── OasisStatus.jsx │ ├── OasisStatus.scss │ ├── OasisStatus.test.js │ ├── OasisTable.jsx │ ├── OasisTable.scss │ ├── OasisTable.test.js │ ├── OasisTabs.jsx │ ├── OasisTabs.scss │ ├── OasisTabs.test.js │ ├── OasisTestingWarningMessage.jsx │ ├── OasisTestingWarningMessage.scss │ ├── OasisTestingWarningMessage.test.js │ ├── OasisTradeType.jsx │ ├── OasisTradeType.scss │ ├── OasisTransactionIsAwaitingSign.jsx │ ├── OasisTransactionIsAwaitingSign.scss │ ├── OasisTransactionIsAwaitingSign.test.js │ ├── OasisTransferTransfer.jsx │ ├── OasisTransferTransfer.scss │ ├── OasisTransferTransfer.test.js │ ├── OasisVolumeIsGreaterThanUserBalance.jsx │ ├── OasisVolumeIsGreaterThanUserBalance.scss │ ├── OasisVolumeIsGreaterThanUserBalance.test.js │ ├── OasisVolumeIsOverTheOfferMax.jsx │ ├── OasisVolumeIsOverTheOfferMax.scss │ ├── OasisVolumeIsOverTheOfferMax.test.js │ ├── OasisWrapUnwrapBalances.jsx │ ├── OasisWrapUnwrapBalances.scss │ ├── OasisWrapUnwrapBalances.test.js │ ├── OasisWrapUnwrapHistory.jsx │ ├── OasisWrapUnwrapHistory.scss │ ├── OasisWrapUnwrapHistory.test.js │ ├── OasisWrapUnwrapUnwrap.jsx │ ├── OasisWrapUnwrapUnwrap.scss │ ├── OasisWrapUnwrapUnwrap.test.js │ ├── OasisWrapUnwrapWrap.jsx │ ├── OasisWrapUnwrapWrap.scss │ ├── OasisWrapUnwrapWrap.test.js │ ├── OasisYourNodeIsSyncing.jsx │ ├── OasisYourNodeIsSyncing.scss │ ├── OasisYourNodeIsSyncing.test.js │ ├── OasisYourOrderExceedsMaxTotalForToken.jsx │ ├── OasisYourOrderExceedsMaxTotalForToken.scss │ ├── OasisYourOrderExceedsMaxTotalForToken.test.js │ ├── OasisYourTransactionFailed.jsx │ ├── OasisYourTransactionFailed.scss │ ├── OasisYourTransactionFailed.test.js │ ├── OfferTakeForm.jsx │ ├── OfferTakeForm.scss │ ├── OfferTakeForm.test.js │ ├── StatusPictogram.jsx │ ├── StatusPictogram.scss │ ├── StatusPictogram.test.js │ ├── TokenAmountInput.jsx │ ├── TokenAmountInput.scss │ ├── TokenAmountInput.test.js │ ├── TransactionStatus.jsx │ ├── TransactionStatus.scss │ ├── TransactionStatus.test.js │ ├── TransactionTimer.jsx │ ├── TransactionTimer.scss │ ├── TransactionTimer.xtest.js │ ├── UnwrapStatus.jsx │ ├── UnwrapStatus.scss │ ├── UnwrapStatus.test.js │ ├── WaitingForAccess.jsx │ ├── WaitingForAccess.scss │ ├── WrapStatus.jsx │ ├── WrapStatus.scss │ ├── WrapStatus.test.js │ └── __snapshots__ │ │ ├── EthereumAddressInput.test.js.snap │ │ ├── EtherscanLink.test.js.snap │ │ ├── ExceedsGasLimit.test.js.snap │ │ ├── Locked.test.js.snap │ │ ├── OasisAccordion.test.js.snap │ │ ├── OasisAccount.test.js.snap │ │ ├── OasisBuyMaker.test.js.snap │ │ ├── OasisBuyOrders.test.js.snap │ │ ├── OasisCantCancelOffer.test.js.snap │ │ ├── OasisCard.test.js.snap │ │ ├── OasisChart.test.js.snap │ │ ├── OasisChartDepth.test.js.snap │ │ ├── OasisChartPrice.test.js.snap │ │ ├── OasisChartVolume.test.js.snap │ │ ├── OasisDontWrapAllEther.test.js.snap │ │ ├── OasisExpirationDate.test.js.snap │ │ ├── OasisIcon.test.js.snap │ │ ├── OasisInlineTokenBalance.test.js.snap │ │ ├── OasisInsufficientAmountOfToken.test.js.snap │ │ ├── OasisLoadProgressSection.test.js.snap │ │ ├── OasisLoadingDataOverlay.test.js.snap │ │ ├── OasisLoadingIndicator.test.js.snap │ │ ├── OasisLogo.test.js.snap │ │ ├── OasisMarket.test.js.snap │ │ ├── OasisMarketHistory.test.js.snap │ │ ├── OasisMessage.test.js.snap │ │ ├── OasisMyOrders.test.js.snap │ │ ├── OasisOfferCancelModal.test.js.snap │ │ ├── OasisOfferNotAvailable.test.js.snap │ │ ├── OasisOfferSummary.test.js.snap │ │ ├── OasisOfferTakeWarningBox.test.js.snap │ │ ├── OasisPleaseProvideEthereumAddress.test.js.snap │ │ ├── OasisSellMaker.test.js.snap │ │ ├── OasisSellOrders.test.js.snap │ │ ├── OasisSoldReceivedAmounts.test.js.snap │ │ ├── OasisStatus.test.js.snap │ │ ├── OasisTable.test.js.snap │ │ ├── OasisTabs.test.js.snap │ │ ├── OasisTestingWarningMessage.test.js.snap │ │ ├── OasisTransactionIsAwaitingSign.test.js.snap │ │ ├── OasisTransferTransfer.test.js.snap │ │ ├── OasisVolumeIsGreaterThanUserBalance.test.js.snap │ │ ├── OasisVolumeIsOverTheOfferMax.test.js.snap │ │ ├── OasisWrapUnwrapBalances.test.js.snap │ │ ├── OasisWrapUnwrapHistory.test.js.snap │ │ ├── OasisWrapUnwrapUnwrap.test.js.snap │ │ ├── OasisWrapUnwrapWrap.test.js.snap │ │ ├── OasisYourNodeIsSyncing.test.js.snap │ │ ├── OasisYourOrderExceedsMaxTotalForToken.test.js.snap │ │ ├── OasisYourTransactionFailed.test.js.snap │ │ ├── OfferTakeForm.test.js.snap │ │ ├── StatusPictogram.test.js.snap │ │ ├── TokenAmountInput.test.js.snap │ │ ├── TransactionStatus.test.js.snap │ │ ├── UnwrapStatus.test.js.snap │ │ └── WrapStatus.test.js.snap ├── configs.json ├── constants.js ├── containers │ ├── EthereumAddressInputField.jsx │ ├── EthereumAddressInputField.scss │ ├── EthereumAddressInputField.test.js │ ├── EtherscanLink.jsx │ ├── OasisApp.jsx │ ├── OasisApp.scss │ ├── OasisAppLoadProgress.jsx │ ├── OasisAppLoadProgress.test.js │ ├── OasisEthBalanceWarningMessage.jsx │ ├── OasisEthBalanceWarningMessage.test.js │ ├── OasisEtherBalance.jsx │ ├── OasisEtherBalance.scss │ ├── OasisFooter.jsx │ ├── OasisFooter.scss │ ├── OasisFooter.test.js │ ├── OasisGasPrice.jsx │ ├── OasisGasPrice.scss │ ├── OasisGasPrice.test.js │ ├── OasisHeader.jsx │ ├── OasisHeader.scss │ ├── OasisHeader.test.js │ ├── OasisIsTokenTradingEnabledByUser.jsx │ ├── OasisIsTokenTradingEnabledByUser.test.js │ ├── OasisMainContent.jsx │ ├── OasisMainContent.xtest.js │ ├── OasisMainContentWrapper.scss │ ├── OasisMakeBuyOffer.jsx │ ├── OasisMakeBuyOffer.test.js │ ├── OasisMakeOffer.scss │ ├── OasisMakeOfferModal.jsx │ ├── OasisMakeOfferModal.scss │ ├── OasisMakeOfferModal.test.js │ ├── OasisMakeSellOffer.jsx │ ├── OasisMakeSellOffer.test.js │ ├── OasisMessagesSection.jsx │ ├── OasisMessagesSection.test.js │ ├── OasisMyOrdersContainer.jsx │ ├── OasisMyOrdersContainer.test.js │ ├── OasisNotTheBestOfferPriceWarning.jsx │ ├── OasisNotTheBestOfferPriceWarning.test.js │ ├── OasisOfferBelowDustLimit.jsx │ ├── OasisOfferBelowDustLimit.test.js │ ├── OasisOfferCancelModal.jsx │ ├── OasisOfferCancelModal.test.js │ ├── OasisOfferMakeForm.jsx │ ├── OasisOfferMakeForm.scss │ ├── OasisOfferMakeForm.test.js │ ├── OasisOfferSummary.jsx │ ├── OasisOfferSummary.test.js │ ├── OasisOrderExceedsGasLimitInfo.jsx │ ├── OasisOrderExceedsGasLimitInfo.test.js │ ├── OasisSignificantDigits.jsx │ ├── OasisSignificantDigits.scss │ ├── OasisSignificantDigits.test.js │ ├── OasisTabsContainer.jsx │ ├── OasisTabsContainer.test.js │ ├── OasisTakeOfferModal.jsx │ ├── OasisTakeOfferModal.test.js │ ├── OasisToQuotePrecision.jsx │ ├── OasisToQuotePrecision.test.js │ ├── OasisTokenBalance.jsx │ ├── OasisTokenBalance.scss │ ├── OasisTokenBalance.test.js │ ├── OasisTokenBalanceSummary.jsx │ ├── OasisTokenBalanceSummary.scss │ ├── OasisTokenSelect.jsx │ ├── OasisTokenSelect.test.js │ ├── OasisTokenTransfer.jsx │ ├── OasisTokenTransfer.scss │ ├── OasisTokenTransfer.test.js │ ├── OasisTokenTransferHistory.jsx │ ├── OasisTokenTransferHistory.scss │ ├── OasisTokenTransferHistory.xtest.js │ ├── OasisTokenUnwrapForm.jsx │ ├── OasisTokenUnwrapForm.scss │ ├── OasisTokenUnwrapForm.test.js │ ├── OasisTokenWrapForm.jsx │ ├── OasisTokenWrapForm.scss │ ├── OasisTokenWrapForm.test.js │ ├── OasisTooltip.jsx │ ├── OasisTooltip.scss │ ├── OasisTrade.jsx │ ├── OasisTrade.test.js │ ├── OasisTradeOrders.jsx │ ├── OasisTradeOrders.test.js │ ├── OasisTransactionStatus.jsx │ ├── OasisTransactionStatus.scss │ ├── OasisTransactionStatus.test.js │ ├── OasisTransactionStatusInfoBox.jsx │ ├── OasisTransferMainWrapper.jsx │ ├── OasisTransferMainWrapper.xtest.js │ ├── OasisWelcomeMessage.jsx │ ├── OasisWelcomeMessage.test.js │ ├── OasisWidgetFrame.js │ ├── OasisWidgetFrame.scss │ ├── OasisWrapUnwrap.jsx │ ├── OasisWrapUnwrap.xtest.js │ ├── OasisWrapUnwrapBalances.jsx │ ├── OasisWrapUnwrapBalances.test.js │ ├── OasisWrapUnwrapHistory.jsx │ ├── OasisWrapUnwrapHistory.xtest.js │ ├── OasisWrapUnwrapUnwrap.test.js │ ├── OasisWrapUnwrapUnwrapEther.jsx │ ├── OasisWrapUnwrapUnwrapTokenWrapper.jsx │ ├── OasisWrapUnwrapWrap.test.js │ ├── OasisWrapUnwrapWrapEther.jsx │ ├── OasisWrapUnwrapWrapTokenWrapper.jsx │ ├── OasisYourNodeIsSyncing.jsx │ ├── OasisYourNodeIsSyncing.test.js │ ├── SetTokenAllowanceTrust.jsx │ ├── SetTokenAllowanceTrust.scss │ ├── SetTokenAllowanceTrust.test.js │ ├── TokenAmountInputField.jsx │ ├── TokenAmountInputField.test.js │ ├── TokenTransferForm.jsx │ ├── TokenTransferForm.scss │ ├── TokenTransferForm.test.js │ ├── WrapUnwrapStatus.jsx │ ├── WrapUnwrapStatus.test.js │ └── __snapshots__ │ │ ├── EthereumAddressInputField.test.js.snap │ │ ├── OasisAppLoadProgress.test.js.snap │ │ ├── OasisEthBalanceWarningMessage.test.js.snap │ │ ├── OasisFooter.test.js.snap │ │ ├── OasisGasPrice.test.js.snap │ │ ├── OasisHeader.test.js.snap │ │ ├── OasisIsTokenTradingEnabledByUser.test.js.snap │ │ ├── OasisMakeBuyOffer.test.js.snap │ │ ├── OasisMakeOfferModal.test.js.snap │ │ ├── OasisMakeSellOffer.test.js.snap │ │ ├── OasisMessagesSection.test.js.snap │ │ ├── OasisMyOrdersContainer.test.js.snap │ │ ├── OasisNotTheBestOfferPriceWarning.test.js.snap │ │ ├── OasisOfferBelowDustLimit.test.js.snap │ │ ├── OasisOfferCancelModal.test.js.snap │ │ ├── OasisOfferMakeForm.test.js.snap │ │ ├── OasisOfferSummary.test.js.snap │ │ ├── OasisOrderExceedsGasLimitInfo.test.js.snap │ │ ├── OasisSignificantDigits.test.js.snap │ │ ├── OasisTabsContainer.test.js.snap │ │ ├── OasisTakeOfferModal.test.js.snap │ │ ├── OasisToQuotePrecision.test.js.snap │ │ ├── OasisTokenBalance.test.js.snap │ │ ├── OasisTokenSelect.test.js.snap │ │ ├── OasisTokenTransfer.test.js.snap │ │ ├── OasisTokenUnwrapForm.test.js.snap │ │ ├── OasisTokenWrapForm.test.js.snap │ │ ├── OasisTrade.test.js.snap │ │ ├── OasisTradeOrders.test.js.snap │ │ ├── OasisTransactionStatus.test.js.snap │ │ ├── OasisWelcomeMessage.test.js.snap │ │ ├── OasisWrapUnwrapBalances.test.js.snap │ │ ├── OasisWrapUnwrapUnwrap.test.js.snap │ │ ├── OasisWrapUnwrapWrap.test.js.snap │ │ ├── OasisYourNodeIsSyncing.test.js.snap │ │ ├── SetTokenAllowanceTrust.test.js.snap │ │ ├── TokenAmountInputField.test.js.snap │ │ ├── TokenTransferForm.test.js.snap │ │ └── WrapUnwrapStatus.test.js.snap ├── contracts │ └── abi │ │ ├── maker-otc │ │ ├── expiring-market.json │ │ ├── matching-market.json │ │ └── simple-market.json │ │ ├── otc-support-methods │ │ └── otc-support-methods.json │ │ ├── standard-token │ │ ├── ds-eth-token.json │ │ └── erc20.json │ │ └── token-wrapper │ │ ├── deposit-broker.json │ │ └── token-wrapper.json ├── fonts │ ├── Montserrat-Medium.woff │ ├── Montserrat-Medium.woff2 │ ├── Montserrat-SemiBold.woff │ └── Montserrat-SemiBold.woff2 ├── index.css ├── index.js ├── inputMasks.js ├── registerServiceWorker.js ├── settings.json ├── store │ ├── deferredThunk.js │ ├── index.js │ ├── reducers │ │ ├── __snapshots__ │ │ │ ├── balances.test.js.snap │ │ │ ├── offerMakes.test.js.snap │ │ │ ├── offerTakes.test.js.snap │ │ │ ├── offers.test.js.snap │ │ │ ├── transactions.test.js.snap │ │ │ └── wrapUnwrap.test.js.snap │ │ ├── accounts.js │ │ ├── balances.js │ │ ├── balances.test.js │ │ ├── index.js │ │ ├── limits.js │ │ ├── markets.js │ │ ├── network.js │ │ ├── network │ │ │ ├── CheckNetworkAction.js │ │ │ ├── checkIfOutOfSync.js │ │ │ ├── checkNetworkEpic.js │ │ │ ├── checkNetworkInitialEpic.js │ │ │ ├── onNetworkCheckEndEpic.js │ │ │ └── subscribeLatestBlockFilterEpic.js │ │ ├── offerMakes.js │ │ ├── offerMakes.test.js │ │ ├── offerTakes.js │ │ ├── offerTakes.test.js │ │ ├── offers.test.js │ │ ├── offers │ │ │ ├── getBestOfferIdsForActiveTradingPairEpic.js │ │ │ ├── getTradingPairOffersCount.js │ │ │ ├── index.js │ │ │ ├── loadOffers.js │ │ │ ├── reSyncOffers.js │ │ │ ├── setOfferEpic.js │ │ │ ├── subscribeCancelledOffersEpic.js │ │ │ ├── subscribeFilledOffersEpic.js │ │ │ ├── subscribeNewOffersFilledInEpic.js │ │ │ ├── syncOfferEpic.js │ │ │ └── syncOffersEpic.js │ │ ├── platform.js │ │ ├── session.js │ │ ├── tokenSelectors.js │ │ ├── tokens.js │ │ ├── trades.js │ │ ├── transactionWatchers.js │ │ ├── transactions.js │ │ ├── transactions.test.js │ │ ├── transferHistory.js │ │ ├── transfers.js │ │ ├── userTrades.js │ │ ├── weth.js │ │ ├── wgnt.js │ │ ├── wrapUnwrap.js │ │ ├── wrapUnwrap.test.js │ │ └── wrapUnwrapHistory.js │ ├── selectors │ │ ├── __snapshots__ │ │ │ ├── charts.test.js.snap │ │ │ └── offerMakes.test.js.snap │ │ ├── accounts.js │ │ ├── balances.js │ │ ├── charts.js │ │ ├── charts.test.js │ │ ├── index.js │ │ ├── isVolumeOrPriceEmptyOrZero.js │ │ ├── limits.js │ │ ├── markets.js │ │ ├── network.js │ │ ├── offerMakes.js │ │ ├── offerMakes.test.js │ │ ├── offerTakes.js │ │ ├── offers.js │ │ ├── platform.js │ │ ├── session.js │ │ ├── tokenSelectors.js │ │ ├── tokens.js │ │ ├── trades.js │ │ ├── transactions.js │ │ ├── transferHistory.js │ │ ├── transfers.js │ │ ├── userTrades.js │ │ ├── wrapUnwrap.js │ │ └── wrapUnwrapHistory.js │ └── thunk2Data.js ├── styles │ ├── modules │ │ ├── _breakpoints.scss │ │ ├── _constants.scss │ │ ├── _grid.scss │ │ ├── _modal.scss │ │ ├── _shapes.scss │ │ ├── _table.scss │ │ ├── _typography.scss │ │ └── _verticalForm.scss │ └── style.scss ├── utils │ ├── amounts │ │ └── balanceToString.js │ ├── blocks │ │ └── getDiffFromLatestBlock.js │ ├── contracts │ │ ├── createContractInstance.js │ │ ├── getContractInstance.js │ │ └── loadContract.js │ ├── conversion.js │ ├── conversion.test.js │ ├── createEtherscanTransactionLink.js │ ├── createPromiseActions.js │ ├── errorCodes.js │ ├── errorHandlers.js │ ├── forms │ │ └── offers.js │ ├── functions.js │ ├── generateTradingPairs.js │ ├── helpers.js │ ├── numbers │ │ ├── isNumeric.js │ │ └── isNumericAndGreaterThanZero.js │ ├── offers │ │ ├── findOffer.js │ │ ├── getOfferPrice.js │ │ ├── getOfferTradingPairAndType.js │ │ ├── getUsersSoldAndReceivedAmounts.js │ │ ├── myOffersDisplayFormat.js │ │ ├── offerMakeToFormName.js │ │ ├── offerMakeTypeToOfferListName.js │ │ ├── toHistoricalTrades.js │ │ ├── tokenToBeAllowedForOffer.js │ │ └── transactionTypeToFormName.js │ ├── onMissingConnection.js │ ├── openEtherscanTransactionLink.js │ ├── orders │ │ └── index.js │ ├── period.js │ ├── promisify.js │ ├── reselect.js │ ├── sak.js │ ├── session.js │ ├── solSha3.js │ ├── sort.js │ ├── store.js │ ├── subscriptions │ │ └── registerSubscription.js │ ├── testHelpers.js │ ├── time.js │ ├── tokenFormat.js │ ├── tokens │ │ ├── getOfferMakeBuyAndSellTokens.js │ │ ├── getOfferTakeBuyAndSellTokens.js │ │ ├── getTokenByAddress.js │ │ ├── getTokenPairFormat.js │ │ ├── getTokenPairPrice.js │ │ ├── getTokenPairTrades.js │ │ ├── getTokenPairVolume.js │ │ └── pair.js │ ├── trades │ │ └── logTakeToTrade.js │ ├── transactions │ │ ├── findTransaction.js │ │ ├── handleTransaction.js │ │ └── handleTransaction.test.js │ ├── ui │ │ └── responsive.js │ ├── validateTradingPair.js │ ├── validateTradingPair.test.js │ └── wrapUnwrapHistory │ │ └── createHistoryEntry.js └── version.ejs └── yarn.lock /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | checks: 3 | file-lines: 4 | config: 5 | threshold: 500 6 | method-lines: 7 | config: 8 | threshold: 50 9 | # similar-code: 10 | # config: 11 | # threshold: # language-specific defaults. an override will affect all languages. 12 | # identical-code: 13 | # config: 14 | # threshold: # language-specific defaults. an override will affect all languages. 15 | engines: 16 | duplication: 17 | enabled: true 18 | config: 19 | languages: 20 | javascript: 21 | mass_threshold: 120 -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-vars": "warn", 4 | "no-console": "off", 5 | "no-debugger": "warn" 6 | }, 7 | "env": { 8 | "browser": true, 9 | "node": true 10 | }, 11 | "globals": { 12 | "Promise": true 13 | }, 14 | "plugins": [ 15 | "react" 16 | ], 17 | "extends": ["eslint:recommended", "plugin:react/recommended"], 18 | "parserOptions": { 19 | "ecmaVersion": 8, 20 | "sourceType": "module", 21 | "ecmaFeatures": { 22 | "jsx": true, 23 | "modules": true, 24 | "experimentalObjectRestSpread": true 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | .idea/ 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | src/version.js -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Oasis DEX frontend 2 | 3 | 4 | [![Build Status](https://travis-ci.org/OasisDEX/oasis-react.svg?branch=dev)](https://travis-ci.org/OasisDEX/oasis-react) 5 | [![Maintainability](https://api.codeclimate.com/v1/badges/0f62877fb86fc1cf9eb3/maintainability)](https://codeclimate.com/github/OasisDEX/oasis-react/maintainability) 6 | [![Test Coverage](https://api.codeclimate.com/v1/badges/0f62877fb86fc1cf9eb3/test_coverage)](https://codeclimate.com/github/OasisDEX/oasis-react/test_coverag) 7 | 8 | ## Auto deployments 9 | 10 | 1. [oasisdex-dev.surge.sh](https://oasisdex-dev.surge.sh/) - from dev branch 11 | 2. [oasisdex-staging.surge.sh](https://oasisdex-staging.surge.sh/) - from staging branch -------------------------------------------------------------------------------- /branch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$TRAVIS_BRANCH" == "" ]; then 4 | git rev-parse --abbrev-ref HEAD 5 | else 6 | echo $TRAVIS_BRANCH 7 | fi -------------------------------------------------------------------------------- /config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/tutorial-webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /config/jest/fileTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | // This is a custom Jest transformer turning file imports into filenames. 6 | // http://facebook.github.io/jest/docs/tutorial-webpack.html 7 | 8 | module.exports = { 9 | process(src, filename) { 10 | return `module.exports = ${JSON.stringify(path.basename(filename))};`; 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /config/polyfills.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (typeof Promise === 'undefined') { 4 | // Rejection tracking prevents a common issue where React gets into an 5 | // inconsistent state due to an error, but it gets swallowed by a Promise, 6 | // and the user has no idea what causes React's erratic future behavior. 7 | require('promise/lib/rejection-tracking').enable(); 8 | window.Promise = require('promise/lib/es6-extensions.js'); 9 | } 10 | 11 | // fetch() polyfill for making API calls. 12 | require('whatwg-fetch'); 13 | 14 | // Object.assign() is commonly used with React. 15 | // It will use the native implementation if it's present and isn't buggy. 16 | Object.assign = require('object-assign'); 17 | 18 | global.requestAnimationFrame = function(callback) { 19 | setTimeout(callback, 0); 20 | }; -------------------------------------------------------------------------------- /config/versionFilePlugin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const WebpackVersionFilePlugin = require('webpack-version-file-plugin'); 4 | const execa = require('execa'); 5 | const path = require('path'); 6 | 7 | const env = process.env.NODE_ENV; 8 | const gitHash = execa.sync('git', ['rev-parse', '--short', 'HEAD']).stdout; 9 | const gitNumCommits = Number(execa.sync('git', ['rev-list', 'HEAD', '--count']).stdout); 10 | const gitDirty = execa.sync('git', ['status', '-s', '-uall']).stdout.length > 0; 11 | const branch = execa.sync(path.join(__dirname, '..', 'branch.sh')).stdout; 12 | 13 | const webpackVersionFilePlugin = new WebpackVersionFilePlugin({ 14 | packageFile: path.join(__dirname, '..', 'package.json'), 15 | template: path.join(__dirname, '..', 'src', 'version.ejs'), 16 | outputFile: path.join('src', 'version.js'), 17 | extras: { 18 | 'env': env, 19 | 'githash': gitHash, 20 | 'gitNumCommits': gitNumCommits, 21 | 'timestamp': Date.now(), 22 | 'dirty': gitDirty, 23 | 'branch': branch 24 | } 25 | }); 26 | 27 | module.exports = webpackVersionFilePlugin; -------------------------------------------------------------------------------- /public/OasisToS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/public/OasisToS.pdf -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "OasisDEX", 3 | "name": "OasisDEX", 4 | "start_url": "./200.html", 5 | "display": "standalone", 6 | "theme_color": "#000000", 7 | "background_color": "#ffffff" 8 | } 9 | -------------------------------------------------------------------------------- /scripts/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'test'; 5 | process.env.NODE_ENV = 'test'; 6 | process.env.PUBLIC_URL = ''; 7 | 8 | // Makes the script crash on unhandled rejections instead of silently 9 | // ignoring them. In the future, promise rejections that are not handled will 10 | // terminate the Node.js process with a non-zero exit code. 11 | process.on('unhandledRejection', err => { 12 | throw err; 13 | }); 14 | 15 | // Ensure environment variables are read. 16 | require('../config/env'); 17 | 18 | const jest = require('jest'); 19 | const argv = process.argv.slice(2); 20 | 21 | // Watch unless on CI or in coverage mode 22 | if (!process.env.CI && argv.indexOf('--coverage') < 0) { 23 | argv.push('--watch'); 24 | } 25 | 26 | jest.run(argv); -------------------------------------------------------------------------------- /src/assets/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /src/assets/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /src/assets/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /src/assets/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /src/assets/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /src/assets/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /src/assets/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /src/assets/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /src/assets/coinbase-icon-512px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/coinbase-icon-512px.png -------------------------------------------------------------------------------- /src/assets/coinbase-wallet-wordmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/coinbase-wallet-wordmark.png -------------------------------------------------------------------------------- /src/assets/ic_add_circle_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/ic_remove_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/loading.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/loadingLarge.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/logo-oasis-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/logo-oasis-hover.png -------------------------------------------------------------------------------- /src/assets/logo-oasis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/logo-oasis.png -------------------------------------------------------------------------------- /src/assets/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/mstile-144x144.png -------------------------------------------------------------------------------- /src/assets/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/mstile-150x150.png -------------------------------------------------------------------------------- /src/assets/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/mstile-310x150.png -------------------------------------------------------------------------------- /src/assets/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/mstile-310x310.png -------------------------------------------------------------------------------- /src/assets/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/assets/mstile-70x70.png -------------------------------------------------------------------------------- /src/assets/myallowance-disable.svg: -------------------------------------------------------------------------------- 1 | Created with Sketch. -------------------------------------------------------------------------------- /src/assets/myallowance-maximum.svg: -------------------------------------------------------------------------------- 1 | Created with Sketch. -------------------------------------------------------------------------------- /src/assets/myallowance-personal.svg: -------------------------------------------------------------------------------- 1 | Created with Sketch. -------------------------------------------------------------------------------- /src/assets/od-icons/icon-failed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/assets/od-icons/icon-info.svg: -------------------------------------------------------------------------------- 1 | 2 | Created with Sketch. 3 | 5 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /src/assets/od-icons/icon-loading.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /src/assets/od-icons/icon-syncing.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /src/assets/od-icons/icon-tick.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/od-icons/icon-warning.svg: -------------------------------------------------------------------------------- 1 | 2 | Created with Sketch. 3 | 5 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /src/assets/od-icons/icon_arrow_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/od-icons/icon_arrow_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 16 | 17 | 19 | image/svg+xml 20 | 22 | 23 | 24 | 25 | 26 | 28 | 31 | 35 | 36 | -------------------------------------------------------------------------------- /src/assets/od-icons/icon_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/od_mist.svg: -------------------------------------------------------------------------------- 1 | od_mist_2 -------------------------------------------------------------------------------- /src/assets/order-warning-red.svg: -------------------------------------------------------------------------------- 1 | Created with Sketch. -------------------------------------------------------------------------------- /src/assets/order-warning.svg: -------------------------------------------------------------------------------- 1 | Created with Sketch. -------------------------------------------------------------------------------- /src/assets/remove_button.svg: -------------------------------------------------------------------------------- 1 | Created with Sketch. -------------------------------------------------------------------------------- /src/bootstrap/cache.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/bootstrap/cache.js -------------------------------------------------------------------------------- /src/components/ClickWarp.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | @import "../styles/modules/constants"; 3 | 4 | .NoEthereumSection { 5 | max-width: 980px; 6 | margin: 0 auto; 7 | @media (max-width: $xxs) { 8 | max-width: 100%; 9 | } 10 | 11 | text-align: center; 12 | font-family: 'Montserrat', sans-serif; 13 | font-weight: 500; 14 | color: $blue-darkish; 15 | font-size: 24px; 16 | 17 | h2 { 18 | max-width: 100%; 19 | font-weight: 700; 20 | opacity: 0.8; 21 | color: #222228; 22 | } 23 | 24 | .ImgHeaderLogo { 25 | width: 264px; 26 | padding-bottom: 30px; 27 | } 28 | 29 | .ImgEthereumLogo { 30 | width: 61px; 31 | padding-top: 30px; 32 | margin-bottom: 40px; 33 | } 34 | 35 | .HorizontalLine { 36 | color: $lightgray; 37 | border: 0; 38 | border-top: solid 1px $lightgray; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/components/EthereumAddressInput.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | import { PropTypes } from "prop-types"; 3 | import CSSModules from "react-css-modules"; 4 | import styles from "./EthereumAddressInput.scss"; 5 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 6 | const propTypes = PropTypes && {}; 7 | const defaultProps = {}; 8 | 9 | const inputStyle = { textAlign: "right", paddingRight: "30px" }; 10 | 11 | class EthereumAddressInput extends PureComponent { 12 | render() { 13 | return ( 14 | 23 | ); 24 | } 25 | } 26 | 27 | EthereumAddressInput.displayName = "EthereumAddressInput"; 28 | EthereumAddressInput.propTypes = propTypes; 29 | EthereumAddressInput.defaultProps = defaultProps; 30 | export default CSSModules(EthereumAddressInput, styles); 31 | -------------------------------------------------------------------------------- /src/components/EthereumAddressInput.scss: -------------------------------------------------------------------------------- 1 | .EthereumAddressInput { 2 | input { 3 | padding-right: 20px !important; 4 | } 5 | } -------------------------------------------------------------------------------- /src/components/EthereumAddressInput.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import EthereumAddressInput from './EthereumAddressInput'; 6 | 7 | 8 | describe('(Component) EthereumAddressInput', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/EtherscanLink.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | @import "../styles/modules/typography"; 3 | 4 | .link { 5 | @include ellipsis(150px); 6 | @media (max-width: $xxs) { 7 | @include ellipsis(70px); 8 | } 9 | font-weight: 600; 10 | } 11 | -------------------------------------------------------------------------------- /src/components/EtherscanLink.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import EtherscanLink from './EtherscanLink'; 6 | 7 | 8 | describe('(Component) EtherscanLink', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/ExceedsGasLimit.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | const propTypes = PropTypes && { 6 | }; 7 | const defaultProps = {}; 8 | 9 | 10 | class ExceedsGasLimit extends PureComponent { 11 | render() { 12 | return ( 13 |
14 |
15 | Your order exceed gas limit of 4.3 Million. 16 |
17 |
18 | To get a working order use the Buy Max Button 19 |
20 |
21 | ); 22 | } 23 | } 24 | 25 | ExceedsGasLimit.displayName = 'ExceedsGasLimit'; 26 | ExceedsGasLimit.propTypes = propTypes; 27 | ExceedsGasLimit.defaultProps = defaultProps; 28 | export default ExceedsGasLimit; 29 | -------------------------------------------------------------------------------- /src/components/ExceedsGasLimit.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/ExceedsGasLimit.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import ExceedsGasLimit from './ExceedsGasLimit'; 6 | 7 | 8 | describe('(Component) ExceedsGasLimit', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/FlexBox.scss: -------------------------------------------------------------------------------- 1 | @import "./../styles/modules/breakpoints"; 2 | .box { 3 | display: flex; 4 | max-width: 100%; 5 | } 6 | 7 | .wrap { 8 | flex-wrap: wrap; 9 | } 10 | 11 | .wrapXXS { 12 | @media (max-width: $xxs) { 13 | flex-wrap: wrap; 14 | } 15 | } 16 | .inlineXXS { 17 | @media (max-width: $xxs) { 18 | display: inline-flex; 19 | } 20 | } 21 | 22 | .vertical { 23 | flex-direction: column; 24 | } 25 | 26 | .horizontal { 27 | flex-direction: row; 28 | } -------------------------------------------------------------------------------- /src/components/InfoBox.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | @import "../styles/modules/constants"; 3 | 4 | .box { 5 | border: 1px solid; 6 | border-radius: 8px; 7 | margin-top: 1.5em; 8 | margin-bottom: 1.5em; 9 | 10 | display: flex; 11 | } 12 | 13 | .sm { 14 | padding: 7px 16px; 15 | font-size: 13px; 16 | @media (max-width: $xxxs) { 17 | font-size: 11px !important; 18 | } 19 | 20 | } 21 | 22 | .md { 23 | padding: 16px; 24 | font-size: 13px; 25 | } 26 | 27 | .noBorder { 28 | border-width: 0; 29 | margin: 0; 30 | padding: 0; 31 | } 32 | 33 | .fullWidth { 34 | width: 100%; 35 | } 36 | 37 | 38 | .default { 39 | border-color: #E5E9EB; 40 | color: #939194; 41 | } 42 | 43 | // very pale, for non important info 44 | .muted { 45 | border-color: #E5E9EB; 46 | color: #d4d4d4; 47 | } 48 | 49 | .danger { 50 | border-color: $danger-text; 51 | color: $danger-text; 52 | } 53 | 54 | .success { 55 | border-color: $success-text; 56 | color: $success-text; 57 | } -------------------------------------------------------------------------------- /src/components/InfoBoxWithIco.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | @import "../styles/modules/typography"; 3 | 4 | .infoText { 5 | @include text(); 6 | margin-left: 5px; 7 | @media (max-width: $xxs) { 8 | @include text(10px); 9 | margin-left: 15px; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/components/Locked.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import Locked from './Locked'; 6 | 7 | 8 | describe('(Component) Locked', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisAccordion.scss: -------------------------------------------------------------------------------- 1 | .header { 2 | display: flex; 3 | } 4 | 5 | .content { 6 | border-top: 1px #E5E9EB solid; 7 | padding-top: 1em; 8 | margin-top: 1em; 9 | 10 | &.md { 11 | margin-left: -16px; 12 | margin-right: -16px; 13 | padding-left: 16px; 14 | padding-right: 16px; 15 | 16 | } 17 | } 18 | 19 | .accordion { 20 | width: 100%; 21 | } -------------------------------------------------------------------------------- /src/components/OasisAccordion.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisAccordion from './OasisAccordion'; 6 | 7 | 8 | describe('(Component) OasisAccordion', () => { 9 | it('should render', () => { 10 | const props = { 11 | heading: (
This this a heading!
), 12 | children:
content
13 | }; 14 | const wrapper = shallow( 15 | 16 | ); 17 | 18 | expect(wrapper).toMatchSnapshot(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /src/components/OasisAccount.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import {OasisAccount} from './OasisAccount'; 6 | 7 | describe('(Component) OasisAccount', () => { 8 | it('should render', () => { 9 | const props = { 10 | accounts: [] 11 | }; 12 | const wrapper = shallow( 13 | , 14 | ); 15 | 16 | expect(wrapper).toMatchSnapshot(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/components/OasisBuyMaker.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | import styles from './OasisBuyMaker.scss'; 6 | 7 | const propTypes = PropTypes && {}; 8 | const defaultProps = {}; 9 | 10 | class OasisBuyMaker extends PureComponent { 11 | render() { 12 | return ( 13 |
14 | OasisBuyMaker 15 |
16 | ); 17 | } 18 | } 19 | 20 | OasisBuyMaker.displayName = 'OasisBuyMaker'; 21 | OasisBuyMaker.propTypes = propTypes; 22 | OasisBuyMaker.defaultProps = defaultProps; 23 | export default OasisBuyMaker; 24 | -------------------------------------------------------------------------------- /src/components/OasisBuyMaker.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisBuyMaker.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisBuyMaker from './OasisBuyMaker'; 6 | 7 | describe('(Component) OasisBuyMaker', () => { 8 | it('should render', () => { 9 | const props = {}; 10 | const wrapper = shallow( 11 | , 12 | ); 13 | 14 | expect(wrapper).toMatchSnapshot(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/OasisBuyOrders.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | @import "../styles/modules/constants"; 3 | @import "../styles/modules/grid"; 4 | 5 | 6 | .table { 7 | 8 | td, th { 9 | text-align: right; 10 | } 11 | 12 | td { 13 | font-weight: 500; 14 | } 15 | 16 | th:first-child, 17 | td:first-child { 18 | flex-basis: 148px; 19 | text-align: right; 20 | @media (max-width: $xxs){ 21 | flex-basis: 80px; 22 | } 23 | @media (max-width: $xxxs){ 24 | flex-basis: 70px; 25 | } 26 | } 27 | 28 | td:first-child { 29 | color: $success-text; 30 | } 31 | 32 | th:nth-child(2), 33 | td:nth-child(2) { 34 | flex-basis: 88px; 35 | text-align: right; 36 | @media (max-width: $xxs){ 37 | flex-basis: 75px; 38 | } 39 | } 40 | 41 | th:nth-child(3), 42 | td:nth-child(3) { 43 | flex-basis: 88px; 44 | text-align: right; 45 | @media (max-width: $xxs){ 46 | flex-basis: 75px; 47 | } 48 | } 49 | 50 | th:last-child, 51 | td:last-child { 52 | @include reset; 53 | } 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/components/OasisBuyOrders.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisBuyOrders from './OasisBuyOrders'; 6 | import { TOKEN_MAKER, TOKEN_WRAPPED_ETH } from '../constants'; 7 | import { List } from 'immutable'; 8 | 9 | describe('(Component) OasisBuyOrders', () => { 10 | it('should render', () => { 11 | const props = { 12 | activeTradingPair: { baseToken: TOKEN_MAKER, quoteToken: TOKEN_WRAPPED_ETH }, 13 | onSetOfferTakeModalOpen: jest.fn, 14 | onSetActiveOfferTakeOfferId: jest.fn, 15 | onCheckOfferIsActive: jest.fn, 16 | onResetCompletedOfferCheck: jest.fn, 17 | loadedOffersList: List(), 18 | buyOffers: List() 19 | }; 20 | const wrapper = shallow( 21 | , 22 | ); 23 | 24 | expect(wrapper).toMatchSnapshot(); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /src/components/OasisCantCancelOffer.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | import { PropTypes } from "prop-types"; 3 | import InfoBox from "./InfoBox"; 4 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 5 | 6 | // import styles from './OasisCantCancelOffer.scss'; 7 | 8 | const propTypes = PropTypes && {}; 9 | const defaultProps = {}; 10 | 11 | class OasisCantCancelOffer extends PureComponent { 12 | render() { 13 | return ( 14 | 15 | This offer has been taken. You cannot cancel it anymore. 16 | 17 | ); 18 | } 19 | } 20 | 21 | OasisCantCancelOffer.displayName = "OasisCantCancelOffer"; 22 | OasisCantCancelOffer.propTypes = propTypes; 23 | OasisCantCancelOffer.defaultProps = defaultProps; 24 | export default OasisCantCancelOffer; 25 | -------------------------------------------------------------------------------- /src/components/OasisCantCancelOffer.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisCantCancelOffer.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisCantCancelOffer from './OasisCantCancelOffer'; 6 | 7 | 8 | describe('(Component) OasisCantCancelOffer', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisCard.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | import styles from './OasisCard.scss'; 6 | 7 | const propTypes = PropTypes && { 8 | children: PropTypes.node, 9 | heading: PropTypes.string.isRequired, 10 | }; 11 | const defaultProps = {}; 12 | 13 | class OasisCard extends PureComponent { 14 | render() { 15 | const { heading } = this.props; 16 | return ( 17 |
18 |

{heading}

19 |
20 | {this.props.children} 21 |
22 |
23 | ); 24 | } 25 | } 26 | 27 | OasisCard.displayName = 'OasisCard'; 28 | OasisCard.propTypes = propTypes; 29 | OasisCard.defaultProps = defaultProps; 30 | export default OasisCard; 31 | -------------------------------------------------------------------------------- /src/components/OasisCard.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | opacity: 0.89; 3 | background: #FFFFFF; 4 | border: 1px solid #EFF1F3; 5 | box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.13); 6 | border-radius: 4px; 7 | width: 442px; 8 | min-height: 305px; 9 | margin: 0px 17px 35px 17px; 10 | padding: 20px 0px 20px 30px; 11 | overflow: hidden; 12 | } 13 | 14 | .OasisCardContent { 15 | 16 | } -------------------------------------------------------------------------------- /src/components/OasisCard.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | 5 | import OasisCard from './OasisCard'; 6 | import { shallow } from 'enzyme'; 7 | 8 | describe('(Component) OasisCard', () => { 9 | it('should render', () => { 10 | const props = { 11 | heading: 'Example heading' 12 | }; 13 | const wrapper = shallow( 14 | , 15 | ); 16 | 17 | expect(wrapper).toMatchSnapshot(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /src/components/OasisChart.test.js: -------------------------------------------------------------------------------- 1 | /* global describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import { fromJS } from 'immutable'; 6 | 7 | import { 8 | OasisChart, 9 | mapStateToProps, 10 | mapDispatchToProps, 11 | } from './OasisChart'; 12 | 13 | describe('(Component) OasisChart', () => { 14 | const state = fromJS(global.storeMock); 15 | const initialProps = mapStateToProps(state); 16 | const initialActions = mapDispatchToProps(x => x); 17 | const props = { 18 | ...initialActions, 19 | ...initialProps, 20 | }; 21 | 22 | it('should render', () => { 23 | const wrapper = shallow( 24 | , 25 | ); 26 | 27 | expect(wrapper).toMatchSnapshot(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /src/components/OasisChartDepth.test.js: -------------------------------------------------------------------------------- 1 | /* global describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import { fromJS } from 'immutable'; 6 | 7 | import { 8 | OasisChartDepth, 9 | mapStateToProps, 10 | mapDispatchToProps, 11 | } from './OasisChartDepth'; 12 | 13 | describe('(Component) OasisChartDepth', () => { 14 | const state = fromJS(global.storeMock); 15 | const initialProps = mapStateToProps(state); 16 | const initialActions = mapDispatchToProps(x => x); 17 | const props = { 18 | ...initialActions, 19 | ...initialProps, 20 | tradingPair: { 21 | baseToken: 'empty1', 22 | quoteToken: 'empty2', 23 | }, 24 | }; 25 | 26 | it('should render', () => { 27 | const wrapper = shallow( 28 | , 29 | ); 30 | 31 | expect(wrapper).toMatchSnapshot(); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /src/components/OasisChartPrice.test.js: -------------------------------------------------------------------------------- 1 | /* global describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import { fromJS } from 'immutable'; 6 | 7 | import { 8 | OasisChartPrice, 9 | mapStateToProps, 10 | mapDispatchToProps, 11 | } from './OasisChartPrice'; 12 | 13 | describe('(Component) OasisChartPrice', () => { 14 | const state = fromJS(global.storeMock); 15 | const initialProps = mapStateToProps(state); 16 | const initialActions = mapDispatchToProps(x => x); 17 | const props = { 18 | ...initialActions, 19 | ...initialProps, 20 | tradingPair: { 21 | baseToken: 'empty1', 22 | quoteToken: 'empty2', 23 | }, 24 | }; 25 | 26 | it('should render', () => { 27 | const wrapper = shallow( 28 | , 29 | ); 30 | 31 | expect(wrapper).toMatchSnapshot(); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /src/components/OasisChartVolume.test.js: -------------------------------------------------------------------------------- 1 | /* global describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import { fromJS } from 'immutable'; 6 | import { mockDate } from '../utils/testHelpers'; 7 | 8 | import { 9 | OasisChartVolume, 10 | mapStateToProps, 11 | mapDispatchToProps, 12 | } from './OasisChartVolume'; 13 | 14 | describe('(Component) OasisChartVolume', () => { 15 | const state = fromJS(global.storeMock); 16 | const initialProps = mockDate('2018-05-10', () => mapStateToProps(state)); 17 | const initialActions = mapDispatchToProps(x => x); 18 | const props = { 19 | ...initialActions, 20 | ...initialProps, 21 | tradingPair: { 22 | baseToken: 'empty1', 23 | quoteToken: 'empty2', 24 | }, 25 | }; 26 | 27 | it('should render', () => { 28 | const wrapper = shallow( 29 | , 30 | ); 31 | expect(wrapper).toMatchSnapshot(); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /src/components/OasisDontWrapAllEther.scss: -------------------------------------------------------------------------------- 1 | @import "./../styles/modules/breakpoints"; 2 | 3 | .base { 4 | @media (max-width: $xxxs) { 5 | padding-right: 10px; 6 | } 7 | } -------------------------------------------------------------------------------- /src/components/OasisDontWrapAllEther.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisDontWrapAllEther from './OasisDontWrapAllEther'; 6 | 7 | 8 | describe('(Component) OasisDontWrapAllEther', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisExpirationDate.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/typography"; 2 | 3 | .ClosingTime { 4 | @include text(12px); 5 | 6 | color: #4F5362; 7 | 8 | letter-spacing: 1.3px; 9 | text-transform: uppercase; 10 | 11 | & .Date { 12 | display: flex; 13 | margin-top: 5px; 14 | align-items: center; 15 | @include text(13px); 16 | color: rgba(79, 83, 98, 0.8); 17 | 18 | &:before { 19 | content: ""; 20 | width: 13px; 21 | height: 13px; 22 | margin-right: 5px; 23 | background: url("../assets/clock.svg"); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/components/OasisExpirationDate.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import { OasisExpirationDate } from './OasisExpirationDate'; 6 | 7 | describe('(Component) OasisExpirationDate', () => { 8 | it('should render', () => { 9 | const props = { 10 | timestamp: 1536674743 11 | }; 12 | const wrapper = shallow( 13 | , 14 | ); 15 | 16 | expect(wrapper).toMatchSnapshot(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/components/OasisIcon.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | display: inline-block; 3 | } 4 | 5 | .clickable { 6 | &:hover { 7 | cursor: pointer; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/components/OasisIcon.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisIcon from './OasisIcon'; 6 | 7 | 8 | describe('(Component) OasisIcon', () => { 9 | it('should render', () => { 10 | const props = { 11 | icon: 'loading' 12 | }; 13 | const wrapper = shallow( 14 | 15 | ); 16 | 17 | expect(wrapper).toMatchSnapshot(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /src/components/OasisInlineTokenBalance.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisInlineTokenBalance.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisInlineTokenBalance from './OasisInlineTokenBalance'; 6 | 7 | 8 | describe('(Component) OasisInlineTokenBalance', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisInsufficientAmountOfToken.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | import { PropTypes } from "prop-types"; 3 | import { InfoBoxWithIco } from "./InfoBoxWithIco"; 4 | 5 | const propTypes = PropTypes && { 6 | tokenName: PropTypes.string.isRequired, 7 | noBorder: PropTypes.bool 8 | }; 9 | const defaultProps = {}; 10 | 11 | class OasisInsufficientAmountOfToken extends PureComponent { 12 | render() { 13 | const { noBorder, tokenName, ...props } = this.props; 14 | return ( 15 | 21 | 22 | You do not have enough {tokenName} tokens. 23 | 24 | 25 | ); 26 | } 27 | } 28 | 29 | OasisInsufficientAmountOfToken.displayName = "OasisInsufficientAmountOfToken"; 30 | OasisInsufficientAmountOfToken.propTypes = propTypes; 31 | OasisInsufficientAmountOfToken.defaultProps = defaultProps; 32 | export default OasisInsufficientAmountOfToken; 33 | -------------------------------------------------------------------------------- /src/components/OasisInsufficientAmountOfToken.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisInsufficientAmountOfToken.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisInsufficientAmountOfToken from './OasisInsufficientAmountOfToken'; 6 | import { TOKEN_WRAPPED_ETH } from '../constants'; 7 | 8 | 9 | describe('(Component) OasisInsufficientAmountOfToken', () => { 10 | it('should render', () => { 11 | const props = { 12 | tokenName: TOKEN_WRAPPED_ETH 13 | }; 14 | const wrapper = shallow( 15 | 16 | ); 17 | 18 | expect(wrapper).toMatchSnapshot(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /src/components/OasisLinkLikeButton.scss: -------------------------------------------------------------------------------- 1 | .btn { 2 | &, 3 | &:hover, 4 | &:active, 5 | &:focus { 6 | text-decoration: none; 7 | } 8 | 9 | &:visited { 10 | color: inherit; 11 | } 12 | } -------------------------------------------------------------------------------- /src/components/OasisLoadProgressSection.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | .LoadProgress { 3 | border: 1px solid #b1b1b3; 4 | color: #68686C; 5 | font-size: 11px; 6 | padding: 5px 0; 7 | float: right; 8 | font-weight: bold; 9 | border-radius: 7%; 10 | width: 130px; 11 | @media (max-width: $xs) { 12 | width: 100px; 13 | } 14 | 15 | text-align: center; 16 | letter-spacing: normal; 17 | position: relative; 18 | top: 1px; 19 | @media (max-width: $xxxs) { 20 | width: 60px; 21 | padding: 2px 0; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/components/OasisLoadProgressSection.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisLoadProgressSection from './OasisLoadProgressSection'; 6 | 7 | 8 | describe('(Component) OasisLoadProgressSection', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisLoadingDataOverlay.scss: -------------------------------------------------------------------------------- 1 | @import "./../styles/modules/breakpoints"; 2 | 3 | .base { 4 | z-index: 10; 5 | flex-wrap: wrap; 6 | pointer-events: none; 7 | background-color: rgba(256,256, 256, .7); 8 | position: absolute; 9 | top: 0; 10 | right: 0; 11 | bottom: 0; 12 | left: 0; 13 | display: flex; 14 | justify-content: center; 15 | align-items: center; 16 | div { 17 | padding-left: 10px; 18 | color: rgba(79, 83, 98, 0.8); 19 | text-align: center; 20 | font-family: "Montserrat", sans-serif; 21 | font-size: 18px; 22 | font-weight: 400; 23 | text-transform: uppercase; 24 | letter-spacing: 2px; 25 | @media (max-width: $xxs) { 26 | padding-left: 0; 27 | letter-spacing: 1px; 28 | font-size: 15px; 29 | } 30 | } 31 | } 32 | 33 | .loadingText { 34 | display: inline-block; 35 | margin-left: 20px; 36 | } -------------------------------------------------------------------------------- /src/components/OasisLoadingDataOverlay.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisLoadingDataOverlay from './OasisLoadingDataOverlay'; 6 | 7 | 8 | describe('(Component) OasisLoadingDataOverlay', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisLoadingIndicator.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from "react"; 2 | import { PropTypes } from "prop-types"; 3 | import OasisIcon from "./OasisIcon"; 4 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 5 | 6 | const propTypes = PropTypes && { 7 | size: PropTypes.string, 8 | marginLeft: PropTypes.string, 9 | marginRight: PropTypes.string 10 | }; 11 | const defaultProps = {}; 12 | 13 | class OasisLoadingIndicator extends PureComponent { 14 | render() { 15 | const { marginLeft = 0, marginRight = 0, size } = this.props; 16 | const style = { 17 | display: "inline-block", 18 | marginLeft, 19 | marginRight 20 | }; 21 | return ( 22 | 23 | 24 | 25 | ); 26 | } 27 | } 28 | 29 | OasisLoadingIndicator.displayName = "OasisLoadingIndicator"; 30 | OasisLoadingIndicator.propTypes = propTypes; 31 | OasisLoadingIndicator.defaultProps = defaultProps; 32 | export default OasisLoadingIndicator; 33 | -------------------------------------------------------------------------------- /src/components/OasisLoadingIndicator.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisLoadingIndicator.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisLoadingIndicator from './OasisLoadingIndicator'; 6 | 7 | 8 | describe('(Component) OasisLoadingIndicator', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisLogo.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | import styles from './OasisLogo.scss'; 6 | import CSSModules from 'react-css-modules'; 7 | 8 | const propTypes = PropTypes && {}; 9 | const defaultProps = {}; 10 | 11 | export class OasisLogo extends PureComponent { 12 | render() { 13 | return ( 14 | 15 |
16 | 17 | ); 18 | } 19 | } 20 | 21 | OasisLogo.displayName = 'OasisLogo'; 22 | OasisLogo.propTypes = propTypes; 23 | OasisLogo.defaultProps = defaultProps; 24 | export default CSSModules(OasisLogo, styles); 25 | -------------------------------------------------------------------------------- /src/components/OasisLogo.scss: -------------------------------------------------------------------------------- 1 | @import "./../styles/modules/breakpoints"; 2 | 3 | .OasisLogoWrapper { 4 | display: flex; 5 | align-items: center; 6 | width: 103px; 7 | height: 40px; 8 | } 9 | 10 | .OasisLogo { 11 | cursor: pointer; 12 | width: 100%; 13 | height: 37px; 14 | background: url("./../assets/logo-oasis.png") no-repeat; 15 | background-size: 100%; 16 | &:hover { 17 | background-image: url("./../assets/logo-oasis-hover.png"); 18 | } 19 | 20 | @media (max-width: $xxs) { 21 | background-size: 91%; 22 | } 23 | @media (max-width: $xxxs) { 24 | background-size: 80%; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/components/OasisLogo.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | 5 | import OasisLogo from './OasisLogo'; 6 | import { shallow } from 'enzyme'; 7 | 8 | describe('(Component) OasisLogo', () => { 9 | it('should render', () => { 10 | const props = {}; 11 | const wrapper = shallow( 12 | , 13 | ); 14 | 15 | expect(wrapper).toMatchSnapshot(); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /src/components/OasisMarket.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | 5 | import { OasisMarket } from './OasisMarket'; 6 | import { shallow } from 'enzyme'; 7 | 8 | describe('(Component) OasisMarket', () => { 9 | it('should render', () => { 10 | const props = {marketAddress: '0x1234', networkName: 'kovan'}; 11 | const wrapper = shallow( 12 | , 13 | ); 14 | 15 | expect(wrapper).toMatchSnapshot(); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /src/components/OasisMarketHistory.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import { fromJS } from 'immutable'; 6 | 7 | import OasisMarketHistory from './OasisMarketHistory'; 8 | import { TOKEN_MAKER, TOKEN_WRAPPED_ETH } from '../constants'; 9 | 10 | 11 | describe('(Component) OasisMarketHistory', () => { 12 | it('should render', () => { 13 | const props = { 14 | activeTradingPair: { 15 | baseToken: TOKEN_MAKER, 16 | quoteToken: TOKEN_WRAPPED_ETH 17 | }, 18 | trades: fromJS([]) 19 | }; 20 | const wrapper = shallow( 21 | , 22 | ); 23 | 24 | expect(wrapper).toMatchSnapshot(); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /src/components/OasisMarketWidgetTradingPairPriceTemplate.jsx: -------------------------------------------------------------------------------- 1 | import OasisSignificantDigitsWrapper from '../containers/OasisSignificantDigits'; 2 | import OasisLoadingIndicator from './OasisLoadingIndicator'; 3 | import React from 'react'; 4 | 5 | export const OasisMarketWidgetTradingPairPriceTemplate = row => { 6 | if (row && row.initialMarketHistoryLoaded) { 7 | return row.tradingPairPrice ? ( 8 | 13 | ) : ( 14 | "N/A" 15 | ); 16 | } else { 17 | return ( 18 | 19 | 20 | 21 | ); 22 | } 23 | }; -------------------------------------------------------------------------------- /src/components/OasisMarketWidgetVolumeTemplate.jsx: -------------------------------------------------------------------------------- 1 | import OasisSignificantDigitsWrapper from "../containers/OasisSignificantDigits"; 2 | import { ETH_UNIT_ETHER } from "../constants"; 3 | import OasisLoadingIndicator from "./OasisLoadingIndicator"; 4 | import React from "react"; 5 | 6 | export const OasisMarketWidgetVolumeTemplate = row => { 7 | if (row && row.initialMarketHistoryLoaded) { 8 | return row.volume ? ( 9 | 15 | ) : ( 16 | "N/A" 17 | ); 18 | } else { 19 | return ( 20 | 21 | 22 | 23 | ); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /src/components/OasisMessage.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | 5 | import { OasisMessage } from './OasisMessage'; 6 | import { shallow } from 'enzyme'; 7 | 8 | describe('(Component) OasisMessage', () => { 9 | it('should render', () => { 10 | const props = { 11 | heading: 'Hello world' 12 | }; 13 | const wrapper = shallow( 14 | 15 |
Message content
16 |
, 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisMyOrders.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisMyOrders from './OasisMyOrders'; 6 | import { fromJS } from 'immutable'; 7 | 8 | describe('(Component) OasisMyOrders', () => { 9 | it('should render', () => { 10 | const props = { 11 | activeTradingPair: { baseToken: "MKR", quoteToken: "W-ETH" }, 12 | sellOffers: fromJS([]), 13 | buyOffers: fromJS([]), 14 | onFetchAndSubscribeUserTradesHistory: jest.fn() 15 | }; 16 | const wrapper = shallow( 17 | , 18 | ); 19 | 20 | expect(wrapper).toMatchSnapshot(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /src/components/OasisOfferCancelModal.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/typography"; 2 | 3 | .heading { 4 | @include heading; 5 | margin-bottom: 1em; 6 | } 7 | 8 | 9 | .actions { 10 | display: flex; 11 | justify-content: space-between; 12 | } 13 | -------------------------------------------------------------------------------- /src/components/OasisOfferCancelModal.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisOfferCancelModal from './OasisOfferCancelModal'; 6 | 7 | 8 | describe('(Component) OasisOfferCancelModal', () => { 9 | it('should render', () => { 10 | const props = { 11 | canOfferBeCancelled: false 12 | }; 13 | const wrapper = shallow( 14 | 15 | ); 16 | 17 | expect(wrapper).toMatchSnapshot(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /src/components/OasisOfferNotAvailable.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | 4 | import InfoBoxWithIco from "./InfoBoxWithIco"; 5 | 6 | 7 | const propTypes = PropTypes && {}; 8 | const defaultProps = {}; 9 | 10 | 11 | class OasisOfferNotAvailable extends PureComponent { 12 | render() { 13 | return ( 14 | 15 | This order is not available anymore 16 | 17 | ); 18 | } 19 | } 20 | 21 | OasisOfferNotAvailable.displayName = 'OasisOfferNotAvailable'; 22 | OasisOfferNotAvailable.propTypes = propTypes; 23 | OasisOfferNotAvailable.defaultProps = defaultProps; 24 | export default OasisOfferNotAvailable; 25 | -------------------------------------------------------------------------------- /src/components/OasisOfferNotAvailable.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisOfferNotAvailable.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisOfferNotAvailable from './OasisOfferNotAvailable'; 6 | 7 | 8 | describe('(Component) OasisOfferNotAvailable', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisOfferSummary.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisOfferSummary from './OasisOfferSummary'; 6 | import { PropTypes } from 'prop-types'; 7 | import { TAKE_BUY_OFFER } from '../store/reducers/offerTakes'; 8 | import { TOKEN_MAKER, TOKEN_WRAPPED_ETH } from '../constants'; 9 | import { fromJS } from 'immutable'; 10 | 11 | 12 | describe('(Component) OasisOfferSummary', () => { 13 | it('should render', () => { 14 | const props = { 15 | offerType: TAKE_BUY_OFFER, 16 | sellToken: TOKEN_MAKER, 17 | buyToken: TOKEN_WRAPPED_ETH, 18 | amountSold: '1', 19 | amountReceived: '1', 20 | gasEstimateInfo: fromJS({}), 21 | isTokenTradingEnabled: true 22 | }; 23 | const wrapper = shallow( 24 | 25 | ); 26 | 27 | expect(wrapper).toMatchSnapshot(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /src/components/OasisOfferTakeWarningBox.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | import InfoBoxWithIco from "./InfoBoxWithIco"; 6 | 7 | const propTypes = PropTypes && { 8 | }; 9 | const defaultProps = {}; 10 | 11 | 12 | class OasisOfferTakeWarningBox extends PureComponent { 13 | render() { 14 | return ( 15 | 16 | If someone (partially) fills this order before you do, your offer may only be partially filled or even denied, 17 | in which case unused funds will be refunded to your balance and allowance. 18 | 19 | ); 20 | } 21 | } 22 | 23 | OasisOfferTakeWarningBox.displayName = 'OasisOfferTakeWarningBox'; 24 | OasisOfferTakeWarningBox.propTypes = propTypes; 25 | OasisOfferTakeWarningBox.defaultProps = defaultProps; 26 | export default OasisOfferTakeWarningBox; 27 | -------------------------------------------------------------------------------- /src/components/OasisOfferTakeWarningBox.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisOfferTakeWarningBox.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisOfferTakeWarningBox from './OasisOfferTakeWarningBox'; 6 | 7 | 8 | describe('(Component) OasisOfferTakeWarningBox', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisPleaseProvideEthereumAddress.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | // import styles from './OasisPleaseProvideEthereumAddress.scss'; 6 | import InfoBoxWithIco from './InfoBoxWithIco'; 7 | 8 | 9 | const propTypes = PropTypes && { 10 | noBorder: PropTypes.bool 11 | }; 12 | const defaultProps = { 13 | noBorder: true 14 | }; 15 | 16 | 17 | class OasisPleaseProvideEthereumAddress extends PureComponent { 18 | render() { 19 | const { noBorder } = this.props; 20 | return ( 21 | 22 | Please provide Ethereum address ! 23 | 24 | ); 25 | } 26 | } 27 | 28 | OasisPleaseProvideEthereumAddress.displayName = 'OasisPleaseProvideEthereumAddress'; 29 | OasisPleaseProvideEthereumAddress.propTypes = propTypes; 30 | OasisPleaseProvideEthereumAddress.defaultProps = defaultProps; 31 | export default OasisPleaseProvideEthereumAddress; 32 | -------------------------------------------------------------------------------- /src/components/OasisPleaseProvideEthereumAddress.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisPleaseProvideEthereumAddress.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisPleaseProvideEthereumAddress from './OasisPleaseProvideEthereumAddress'; 6 | 7 | 8 | describe('(Component) OasisPleaseProvideEthereumAddress', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisSellMaker.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | import styles from './OasisSellMaker.scss'; 6 | 7 | const propTypes = PropTypes && {}; 8 | const defaultProps = {}; 9 | 10 | class OasisSellMaker extends PureComponent { 11 | render() { 12 | return ( 13 |
14 | OasisSellMaker 15 |
16 | ); 17 | } 18 | } 19 | 20 | OasisSellMaker.displayName = 'OasisSellMaker'; 21 | OasisSellMaker.propTypes = propTypes; 22 | OasisSellMaker.defaultProps = defaultProps; 23 | export default OasisSellMaker; 24 | -------------------------------------------------------------------------------- /src/components/OasisSellMaker.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisSellMaker.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisSellMaker from './OasisSellMaker'; 6 | 7 | describe('(Component) OasisSellMaker', () => { 8 | it('should render', () => { 9 | const props = {}; 10 | const wrapper = shallow( 11 | , 12 | ); 13 | 14 | expect(wrapper).toMatchSnapshot(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/components/OasisSellOrders.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | @import "../styles/modules/constants"; 3 | @import "../styles/modules/grid"; 4 | 5 | 6 | .table { 7 | 8 | td, th { 9 | text-align: right; 10 | } 11 | 12 | td { 13 | font-weight: 500; 14 | } 15 | 16 | th:first-child, 17 | td:first-child { 18 | flex-basis: 148px; 19 | text-align: right; 20 | @media (max-width: $xxs){ 21 | flex-basis: 80px; 22 | } 23 | @media (max-width: $xxxs){ 24 | flex-basis: 70px; 25 | } 26 | } 27 | 28 | td:first-child { 29 | color: $danger-text; 30 | } 31 | 32 | th:nth-child(2), 33 | td:nth-child(2) { 34 | flex-basis: 88px; 35 | text-align: right; 36 | @media (max-width: $xxs){ 37 | flex-basis: 75px; 38 | } 39 | } 40 | 41 | th:nth-child(3), 42 | td:nth-child(3) { 43 | flex-basis: 88px; 44 | text-align: right; 45 | @media (max-width: $xxs){ 46 | flex-basis: 75px; 47 | } 48 | } 49 | 50 | th:last-child, 51 | td:last-child { 52 | @include reset; 53 | } 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/components/OasisSellOrders.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisSellOrders from './OasisSellOrders'; 6 | import { TOKEN_MAKER, TOKEN_WRAPPED_ETH } from '../constants'; 7 | import { fromJS } from 'immutable'; 8 | 9 | describe('(Component) OasisSellOrders', () => { 10 | it('should render', () => { 11 | const props = { 12 | activeTradingPair: { baseToken : TOKEN_MAKER, quoteToken: TOKEN_WRAPPED_ETH }, 13 | sellOffers: fromJS([]), 14 | onSetOfferTakeModalOpen: jest.fn, 15 | onSetActiveOfferTakeOfferId: jest.fn, 16 | onCheckOfferIsActive: jest.fn, 17 | onResetCompletedOfferCheck: jest.fn 18 | }; 19 | 20 | 21 | const wrapper = shallow( 22 | , 23 | ); 24 | 25 | expect(wrapper).toMatchSnapshot(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /src/components/OasisSoldReceivedAmounts.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisSoldReceivedAmounts from './OasisSoldReceivedAmounts'; 6 | import { PropTypes } from 'prop-types'; 7 | import { TOKEN_MAKER, TOKEN_WRAPPED_ETH } from '../constants'; 8 | 9 | 10 | describe('(Component) OasisSoldReceivedAmounts', () => { 11 | it('should render', () => { 12 | const props = { 13 | sellToken: TOKEN_WRAPPED_ETH, 14 | buyToken: TOKEN_MAKER, 15 | amountSold: '1', 16 | amountReceived: '1' 17 | }; 18 | const wrapper = shallow( 19 | 20 | ); 21 | 22 | expect(wrapper).toMatchSnapshot(); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /src/components/OasisStatus.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | 5 | import { OasisStatus } from './OasisStatus'; 6 | import { shallow } from 'enzyme'; 7 | import { ONLINE } from '../constants'; 8 | 9 | describe('(Component) OasisStatus', () => { 10 | it('should render', () => { 11 | const props = { 12 | status: ONLINE 13 | }; 14 | const wrapper = shallow( 15 | , 16 | ); 17 | 18 | expect(wrapper).toMatchSnapshot(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /src/components/OasisTabs.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | 5 | import OasisTabs from './OasisTabs'; 6 | import { shallow } from 'enzyme'; 7 | import { TOKEN_DAI, TOKEN_WRAPPED_ETH } from '../constants'; 8 | 9 | describe('(Component) OasisTabs', () => { 10 | it('should render', () => { 11 | const props = { 12 | defaultTradingPair: { 13 | baseToken: TOKEN_WRAPPED_ETH, 14 | quoteToken: TOKEN_DAI 15 | } 16 | }; 17 | const wrapper = shallow( 18 | , 19 | ); 20 | 21 | expect(wrapper).toMatchSnapshot(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/components/OasisTestingWarningMessage.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisTestingWarningMessage.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisTestingWarningMessage from './OasisTestingWarningMessage'; 6 | 7 | 8 | describe('(Component) OasisTestingWarningMessage', () => { 9 | it('should render', () => { 10 | const props = {}; 11 | const wrapper = shallow( 12 | 13 | ); 14 | 15 | expect(wrapper).toMatchSnapshot(); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /src/components/OasisTradeType.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/typography"; 2 | 3 | .buy { 4 | @include buyLabel; 5 | } 6 | 7 | .sell { 8 | @include sellLabel; 9 | } 10 | -------------------------------------------------------------------------------- /src/components/OasisTransactionIsAwaitingSign.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | import styles from './OasisTransactionIsAwaitingSign.scss'; 6 | import StatusPictogram from './StatusPictogram'; 7 | import { TX_STATUS_AWAITING_USER_ACCEPTANCE } from '../store/reducers/transactions'; 8 | 9 | 10 | const propTypes = PropTypes && { 11 | }; 12 | const defaultProps = {}; 13 | 14 | 15 | class OasisTransactionIsAwaitingSign extends PureComponent { 16 | render() { 17 | return ( 18 |
19 | Sign Trans. 20 |
21 | ); 22 | } 23 | } 24 | 25 | OasisTransactionIsAwaitingSign.displayName = 'OasisTransactionIsAwaitingSign'; 26 | OasisTransactionIsAwaitingSign.propTypes = propTypes; 27 | OasisTransactionIsAwaitingSign.defaultProps = defaultProps; 28 | export default OasisTransactionIsAwaitingSign; 29 | -------------------------------------------------------------------------------- /src/components/OasisTransactionIsAwaitingSign.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | display: inline-block; 3 | } 4 | -------------------------------------------------------------------------------- /src/components/OasisTransactionIsAwaitingSign.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisTransactionIsAwaitingSign from './OasisTransactionIsAwaitingSign'; 6 | 7 | 8 | describe('(Component) OasisTransactionIsAwaitingSign', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisTransferTransfer.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | import styles from './OasisTransferTransfer.scss'; 6 | 7 | const propTypes = PropTypes && {}; 8 | const defaultProps = {}; 9 | 10 | class OasisTransferTransfer extends PureComponent { 11 | render() { 12 | return ( 13 |
14 |
15 | ); 16 | } 17 | } 18 | 19 | OasisTransferTransfer.displayName = 'OasisTransferTransfer'; 20 | OasisTransferTransfer.propTypes = propTypes; 21 | OasisTransferTransfer.defaultProps = defaultProps; 22 | export default OasisTransferTransfer; 23 | -------------------------------------------------------------------------------- /src/components/OasisTransferTransfer.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisTransferTransfer.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisTransferTransfer from './OasisTransferTransfer'; 6 | 7 | describe('(Component) OasisTransferTransfer', () => { 8 | it('should render', () => { 9 | const props = { 10 | children: ( 11 | test 12 | ), 13 | }; 14 | const wrapper = shallow( 15 | , 16 | ); 17 | 18 | expect(wrapper).toMatchSnapshot(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /src/components/OasisVolumeIsGreaterThanUserBalance.jsx: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | // import ImmutablePropTypes from 'react-immutable-proptypes'; 4 | 5 | import styles from './OasisVolumeIsGreaterThanUserBalance.scss'; 6 | import CSSModules from 'react-css-modules/dist/index'; 7 | 8 | 9 | const propTypes = PropTypes && {}; 10 | const defaultProps = { 11 | offerMax: PropTypes.string.isRequired 12 | }; 13 | 14 | 15 | class OasisVolumeIsGreaterThanUserBalance extends PureComponent { 16 | render() { 17 | return ( 18 |
19 | Current volume is greater than offer maximum of {this.props.offerMax} 20 |
21 | ); 22 | } 23 | } 24 | 25 | OasisVolumeIsGreaterThanUserBalance.displayName = 'OasisVolumeIsGreaterThanUserBalance'; 26 | OasisVolumeIsGreaterThanUserBalance.propTypes = propTypes; 27 | OasisVolumeIsGreaterThanUserBalance.defaultProps = defaultProps; 28 | export default CSSModules(OasisVolumeIsGreaterThanUserBalance); 29 | -------------------------------------------------------------------------------- /src/components/OasisVolumeIsGreaterThanUserBalance.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | margin-top: 20px; padding: 10px; 3 | text-align: center; 4 | background-color: #000000; 5 | color: #fff; 6 | } 7 | -------------------------------------------------------------------------------- /src/components/OasisVolumeIsGreaterThanUserBalance.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisVolumeIsGreaterThanUserBalance from './OasisVolumeIsGreaterThanUserBalance'; 6 | 7 | 8 | describe('(Component) OasisVolumeIsGreaterThanUserBalance', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisVolumeIsOverTheOfferMax.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/OasisVolumeIsOverTheOfferMax.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from "react"; 4 | import { shallow } from "enzyme"; 5 | import OasisVolumeIsOverTheOfferMax from "./OasisVolumeIsOverTheOfferMax"; 6 | import { TOKEN_WRAPPED_GNT } from "../constants"; 7 | 8 | describe("(Component) OasisVolumeIsOverTheOfferMax", () => { 9 | it("should render", () => { 10 | const props = { 11 | offerMax: "1234", 12 | tokenName: TOKEN_WRAPPED_GNT 13 | }; 14 | const wrapper = shallow(); 15 | 16 | expect(wrapper).toMatchSnapshot(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/components/OasisWrapUnwrapBalances.scss: -------------------------------------------------------------------------------- 1 | @import "./../styles/modules/breakpoints"; 2 | 3 | .table { 4 | max-width: 100%; 5 | th:first-child, 6 | td:first-child { 7 | flex-basis: 78px; 8 | text-align: right; 9 | @media (max-width: $xxs) { 10 | flex-basis: 50px; 11 | } 12 | @media (max-width: $xxxs) { 13 | flex-basis: 15%; 14 | } 15 | } 16 | 17 | th:nth-child(2), 18 | td:nth-child(2) { 19 | flex-basis: 128px; 20 | text-align: right; 21 | @media (max-width: $xxs) { 22 | flex-basis: 95px; 23 | } 24 | @media (max-width: $xxxs) { 25 | flex-basis: 20%; 26 | } 27 | } 28 | 29 | th:nth-child(3), 30 | td:nth-child(3) { 31 | flex-basis: 128px; 32 | text-align: right; 33 | @media (max-width: $xxs) { 34 | flex-basis: 100px; 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/components/OasisWrapUnwrapBalances.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisWrapUnwrapBalances from './OasisWrapUnwrapBalances'; 6 | import { fromJS } from 'immutable'; 7 | 8 | describe('(Component) OasisWrapUnwrapBalances', () => { 9 | it('should render', () => { 10 | const props = { 11 | wrapUnwrapBalances : fromJS([]), 12 | resetActiveWrapForm: jest.fn, 13 | resetActiveUnwrapForm: jest.fn, 14 | }; 15 | const wrapper = shallow( 16 | , 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisWrapUnwrapHistory.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | @import "../styles/modules/typography"; 3 | 4 | .table { 5 | th:first-child, 6 | td:first-child { 7 | flex-basis: 78px; 8 | text-align: right; 9 | } 10 | 11 | td:first-child { 12 | @include muted; 13 | } 14 | 15 | th:nth-child(2), 16 | td:nth-child(2) { 17 | flex-basis: 78px; 18 | text-align: right; 19 | @media (max-width: $xxs) { 20 | flex-basis: 50px; 21 | } 22 | } 23 | 24 | th:nth-child(3), 25 | td:nth-child(3) { 26 | flex-basis: 78px; 27 | text-align: right; 28 | @media (max-width: $xxs) { 29 | flex-basis: 40px; 30 | } 31 | } 32 | 33 | th:nth-child(4), 34 | td:nth-child(4) { 35 | flex-basis: 78px; 36 | text-align: right; 37 | @media (max-width: $xxs) { 38 | flex-basis: 60px; 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/components/OasisWrapUnwrapHistory.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisWrapUnwrapHistory from './OasisWrapUnwrapHistory'; 6 | 7 | describe('(Component) OasisWrapUnwrapHistory', () => { 8 | it('should render', () => { 9 | const props = { 10 | children: ( 11 | test 12 | ), 13 | }; 14 | const wrapper = shallow( 15 | , 16 | ); 17 | 18 | expect(wrapper).toMatchSnapshot(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /src/components/OasisWrapUnwrapUnwrap.scss: -------------------------------------------------------------------------------- 1 | .frame { 2 | align-self: flex-start; 3 | } 4 | 5 | .balance { 6 | margin-top: 4.5em; 7 | } 8 | -------------------------------------------------------------------------------- /src/components/OasisWrapUnwrapUnwrap.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first,no-undef */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisWrapUnwrapUnwrap from './OasisWrapUnwrapUnwrap'; 6 | import { TOKEN_WRAPPED_ETH } from '../constants'; 7 | 8 | describe('(Component) OasisWrapUnwrapUnwrap', () => { 9 | it('should render', () => { 10 | const props = { 11 | activeWrappedToken: TOKEN_WRAPPED_ETH, 12 | onSubmit: jest.fn, 13 | transactionState: { txStatus: true }, 14 | hidden: true 15 | }; 16 | const wrapper = shallow( 17 | , 18 | ); 19 | 20 | expect(wrapper).toMatchSnapshot(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /src/components/OasisWrapUnwrapWrap.scss: -------------------------------------------------------------------------------- 1 | .frame { 2 | align-self: flex-start; 3 | } 4 | 5 | .balance { 6 | margin-top: 4.5em; 7 | } 8 | -------------------------------------------------------------------------------- /src/components/OasisWrapUnwrapWrap.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first,no-undef */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisWrapUnwrapWrap from './OasisWrapUnwrapWrap'; 6 | import BigNumber from 'bignumber.js'; 7 | 8 | describe('(Component) OasisWrapUnwrapWrap', () => { 9 | it('should render', () => { 10 | const props = { 11 | onSubmit: jest.fn, 12 | onFormChange: jest.fn, 13 | activeUnwrappedTokenBalance: new BigNumber(100), 14 | transactionState: { txStatus: true }, 15 | hidden: false 16 | }; 17 | const wrapper = shallow( 18 | , 19 | ); 20 | 21 | expect(wrapper).toMatchSnapshot(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/components/OasisYourNodeIsSyncing.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/typography"; 2 | @import "../styles/modules/constants"; 3 | 4 | //TODO: (georgi) Clean up this and NoConnection.scss 5 | 6 | .LockedAccountSection { 7 | text-align: center; 8 | color: $blue-darkish; 9 | 10 | & .OasisLogo { 11 | width: 240px; 12 | padding-bottom: 30px; 13 | } 14 | 15 | & .Separator { 16 | color: $lightgray; 17 | border: 0; 18 | border-top: solid 1px $lightgray; 19 | } 20 | 21 | & .Heading { 22 | @include text(24px, 700); 23 | opacity: 0.8; 24 | color: $blue-darkish; 25 | letter-spacing: 4px; 26 | } 27 | 28 | & .Message { 29 | @include text(25px); 30 | opacity: 0.5; 31 | width: 925px; 32 | display: inline-block; 33 | margin-top: 50px; 34 | margin-bottom: 70px; 35 | letter-spacing: 0.6px; 36 | } 37 | } 38 | 39 | .LogoContainer { 40 | height: 20px; 41 | } 42 | -------------------------------------------------------------------------------- /src/components/OasisYourNodeIsSyncing.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisYourNodeIsSyncing from './OasisYourNodeIsSyncing'; 6 | 7 | 8 | describe('(Component) OasisYourNodeIsSyncing', () => { 9 | it('should render', () => { 10 | const props = { 11 | latestBlock: {} 12 | }; 13 | const wrapper = shallow( 14 | 15 | ); 16 | 17 | expect(wrapper).toMatchSnapshot(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /src/components/OasisYourOrderExceedsMaxTotalForToken.scss: -------------------------------------------------------------------------------- 1 | .noBorder { 2 | line-height: 14px; 3 | display: inline-block; 4 | padding: 2px 4px 2px 3px; 5 | } -------------------------------------------------------------------------------- /src/components/OasisYourOrderExceedsMaxTotalForToken.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisYourOrderExceedsMaxTotalForToken from './OasisYourOrderExceedsMaxTotalForToken'; 6 | 7 | 8 | describe('(Component) OasisYourOrderExceedsMaxTotalForToken', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/OasisYourTransactionFailed.scss: -------------------------------------------------------------------------------- 1 | .infoText { 2 | margin-left: 16px; 3 | } -------------------------------------------------------------------------------- /src/components/OasisYourTransactionFailed.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import OasisYourTransactionFailed from './OasisYourTransactionFailed'; 6 | 7 | 8 | describe('(Component) OasisYourTransactionFailed', () => { 9 | it('should render', () => { 10 | const props = { 11 | txHash: '0x0' 12 | }; 13 | const wrapper = shallow( 14 | 15 | ); 16 | 17 | expect(wrapper).toMatchSnapshot(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /src/components/OfferTakeForm.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/typography"; 2 | 3 | .errorMessage { 4 | @include muted(); 5 | 6 | padding: 2px 13px; 7 | } 8 | 9 | [disabled] { 10 | } -------------------------------------------------------------------------------- /src/components/StatusPictogram.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | display: inline-block; 3 | } 4 | -------------------------------------------------------------------------------- /src/components/StatusPictogram.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import StatusPictogram from './StatusPictogram'; 6 | 7 | 8 | describe('(Component) StatusPictogram', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/TokenAmountInput.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/constants"; 2 | @import "../styles/modules/typography"; 3 | 4 | .inputGroup { 5 | display: flex; 6 | align-items: stretch; 7 | position: relative; 8 | min-height: 38px; 9 | } 10 | 11 | .input { 12 | text-align: right; 13 | width: 100%; 14 | } 15 | 16 | .errorMessage { 17 | position: absolute; 18 | right: 0; 19 | top: 41px; 20 | 21 | @include muted(); 22 | 23 | padding: 2px 13px; 24 | max-width: 100vw; 25 | width: max-content; 26 | } -------------------------------------------------------------------------------- /src/components/TokenAmountInput.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import TokenAmountInput from './TokenAmountInput'; 6 | import { TOKEN_MAKER } from '../constants'; 7 | 8 | 9 | describe('(Component) TokenAmountInput', () => { 10 | it('should render', () => { 11 | const props = { 12 | selectedToken: TOKEN_MAKER, meta: {} 13 | }; 14 | const wrapper = shallow( 15 | 16 | ); 17 | 18 | expect(wrapper).toMatchSnapshot(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /src/components/TransactionStatus.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | 3 | .base {} 4 | 5 | .imgRight { 6 | margin-left: 0.5em; 7 | } 8 | 9 | .imgLeft { 10 | margin-right: 0.5em; 11 | } 12 | 13 | .spaceBoth { 14 | margin-left: 0.3em; 15 | margin-right: 0.3em; 16 | } 17 | .transactionFailedHash { 18 | display: inline-block; 19 | max-width: 70px; 20 | overflow: hidden; 21 | text-overflow: ellipsis; 22 | @media (max-width: $xxs) { 23 | max-width: 35px; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/components/TransactionStatus.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import {TX_STATUS_AWAITING_CONFIRMATION} from '../store/reducers/transactions'; 6 | import TransactionStatus from './TransactionStatus'; 7 | import { Map } from 'immutable'; 8 | 9 | describe('(Component) TransactionStatus', () => { 10 | it('should render', () => { 11 | const props = { 12 | transaction: Map({txStatus: TX_STATUS_AWAITING_CONFIRMATION }), 13 | transactionReceipt: Map({ 14 | txStatus: TX_STATUS_AWAITING_CONFIRMATION 15 | }) 16 | }; 17 | const wrapper = shallow( 18 | 19 | ); 20 | expect(wrapper).toMatchSnapshot(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /src/components/TransactionTimer.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/TransactionTimer.xtest.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import TransactionTimer from './TransactionTimer'; 6 | 7 | 8 | describe('(Component) TransactionTimer', () => { 9 | it('should render', () => { 10 | const props = {}; 11 | const wrapper = shallow( 12 | 13 | ); 14 | 15 | expect(wrapper).toMatchSnapshot(); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /src/components/UnwrapStatus.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/UnwrapStatus.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import UnwrapStatus from './UnwrapStatus'; 6 | 7 | 8 | describe('(Component) UnwrapStatus', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/WaitingForAccess.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import CSSModules from "react-css-modules"; 3 | 4 | import styles from "./WaitingForAccess.scss"; 5 | import EthereumLogo from "./../assets/ethereum-logo.svg"; 6 | 7 | const WaitingForAccess = () => { 8 | return ( 9 |
10 | Ethereum 15 |

WAITING FOR ACCESS...

16 |
17 | ); 18 | }; 19 | 20 | WaitingForAccess.displayName = "WaitingForAccess"; 21 | 22 | export default CSSModules(WaitingForAccess, styles, { allowMultiple: true }); 23 | -------------------------------------------------------------------------------- /src/components/WaitingForAccess.scss: -------------------------------------------------------------------------------- 1 | @import "../styles/modules/breakpoints"; 2 | @import "../styles/modules/constants"; 3 | 4 | .NoEthereumSection { 5 | max-width: 980px; 6 | margin: 0 auto; 7 | @media (max-width: $xxs) { 8 | max-width: 100%; 9 | } 10 | 11 | text-align: center; 12 | font-family: 'Montserrat', sans-serif; 13 | font-weight: 500; 14 | color: $blue-darkish; 15 | font-size: 24px; 16 | 17 | h2 { 18 | max-width: 100%; 19 | font-weight: 700; 20 | opacity: 0.8; 21 | color: #222228; 22 | } 23 | 24 | .ImgHeaderLogo { 25 | width: 264px; 26 | padding-bottom: 30px; 27 | } 28 | 29 | .ImgEthereumLogo { 30 | width: 61px; 31 | padding-top: 30px; 32 | margin-bottom: 40px; 33 | } 34 | 35 | .HorizontalLine { 36 | color: $lightgray; 37 | border: 0; 38 | border-top: solid 1px $lightgray; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/components/WrapStatus.scss: -------------------------------------------------------------------------------- 1 | .base { 2 | } 3 | -------------------------------------------------------------------------------- /src/components/WrapStatus.test.js: -------------------------------------------------------------------------------- 1 | /* global shallow describe it expect */ 2 | /* eslint-disable import/first */ 3 | import React from 'react'; 4 | import { shallow } from 'enzyme'; 5 | import WrapStatus from './WrapStatus'; 6 | 7 | 8 | describe('(Component) WrapStatus', () => { 9 | it('should render', () => { 10 | const props = { 11 | children: ( 12 | test 13 | ) 14 | }; 15 | const wrapper = shallow( 16 | 17 | ); 18 | 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/__snapshots__/EthereumAddressInput.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`(Component) EthereumAddressInput should render 1`] = ` 4 | 15 | `; 16 | -------------------------------------------------------------------------------- /src/components/__snapshots__/EtherscanLink.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`(Component) EtherscanLink should render 1`] = `""`; 4 | -------------------------------------------------------------------------------- /src/components/__snapshots__/ExceedsGasLimit.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`(Component) ExceedsGasLimit should render 1`] = ` 4 |
5 |
6 | Your order exceed gas limit of 7 | 8 | 4.3 Million 9 | 10 | . 11 |
12 |
13 | To get a working order use the 14 | 15 | Buy Max Button 16 | 17 |
18 |
19 | `; 20 | -------------------------------------------------------------------------------- /src/components/__snapshots__/Locked.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`(Component) Locked should render 1`] = ` 4 |
5 |
6 |

7 | account locked 8 |

9 |

10 | You are trying to access OasisDEX without an unlocked account. 11 |
12 | Unlock your account on the 13 | . 14 |

15 |
16 | 17 |
18 | `; 19 | -------------------------------------------------------------------------------- /src/components/__snapshots__/OasisAccordion.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`(Component) OasisAccordion should render 1`] = ` 4 | 10 | 18 | 24 |
25 | This this a heading! 26 |
27 |
28 |
29 | `; 30 | -------------------------------------------------------------------------------- /src/components/__snapshots__/OasisAccount.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`(Component) OasisAccount should render 1`] = ` 4 |
7 | 10 | Account: 11 | 12 |
15 |