├── .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 | [](https://travis-ci.org/OasisDEX/oasis-react)
5 | [](https://codeclimate.com/github/OasisDEX/oasis-react/maintainability)
6 | [](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 |
5 |
--------------------------------------------------------------------------------
/src/assets/ic_remove_24px.svg:
--------------------------------------------------------------------------------
1 |
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 |
--------------------------------------------------------------------------------
/src/assets/myallowance-maximum.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/myallowance-personal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/od-icons/icon-failed.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/assets/od-icons/icon-info.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/od-icons/icon-loading.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/od-icons/icon-syncing.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/od-icons/icon-tick.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/assets/od-icons/icon-warning.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/od-icons/icon_arrow_down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/od-icons/icon_arrow_right.svg:
--------------------------------------------------------------------------------
1 |
2 |
36 |
--------------------------------------------------------------------------------
/src/assets/od-icons/icon_idle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/od_mist.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/order-warning-red.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/order-warning.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/remove_button.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |

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 |
18 |
19 |
20 | `;
21 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisBuyMaker.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisBuyMaker should render 1`] = `
4 |
5 | OasisBuyMaker
6 |
7 | `;
8 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisCantCancelOffer.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisCantCancelOffer should render 1`] = `
4 |
9 | This offer has been taken. You cannot cancel it anymore.
10 |
11 | `;
12 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisCard.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisCard should render 1`] = `
4 |
5 |
6 | Example heading
7 |
8 |
9 |
10 | `;
11 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisChart.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisChart should render 1`] = `
4 |
14 |
17 |
20 |
23 |
24 | }
25 | isLoadingData={true}
26 | loadingDataText="loading trades"
27 | noContentPaddingXXS={true}
28 | spaceForContent={true}
29 | >
30 |
38 |
39 | `;
40 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisDontWrapAllEther.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisDontWrapAllEther should render 1`] = `
4 |
9 |
10 | Do not wrap all of your
11 |
12 | ETH
13 |
14 | !
15 |
16 |
17 | `;
18 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisExpirationDate.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisExpirationDate should render 1`] = `
4 |
7 |
8 | CLOSING TIME
9 |
10 |
13 | 11-9-2018
14 |
15 |
16 | `;
17 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisIcon.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisIcon should render 1`] = `
4 |
7 |

17 |
18 | `;
19 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisInlineTokenBalance.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisInlineTokenBalance should render 1`] = ``;
4 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisInsufficientAmountOfToken.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisInsufficientAmountOfToken should render 1`] = `
4 |
9 |
10 | You do not have enough
11 |
12 | W-ETH
13 |
14 | tokens.
15 |
16 |
17 | `;
18 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisLoadProgressSection.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisLoadProgressSection should render 1`] = `
4 |
11 |
16 |
17 | `;
18 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisLoadingDataOverlay.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisLoadingDataOverlay should render 1`] = `
4 |
18 | `;
19 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisLoadingIndicator.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisLoadingIndicator should render 1`] = `
4 |
13 |
18 |
19 | `;
20 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisLogo.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisLogo should render 1`] = `
4 |
9 |
12 |
13 | `;
14 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisMarket.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisMarket should render 1`] = `
4 |
7 |
10 | Market:
11 |
12 |
23 |
24 | `;
25 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisMessage.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisMessage should render 1`] = `
4 |
7 |
10 | Hello world
11 |
12 |
13 |
14 | Message content
15 |
16 |
17 |
18 | `;
19 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisOfferNotAvailable.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisOfferNotAvailable should render 1`] = `
4 |
9 | This order is
10 |
11 | not available anymore
12 |
13 |
14 | `;
15 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisOfferSummary.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisOfferSummary should render 1`] = `
4 |
5 |
11 |
17 |
18 |
25 |
30 |
38 | Loading market contracts...
39 |
40 |
41 |
42 |
43 |
44 |
45 | `;
46 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisOfferTakeWarningBox.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisOfferTakeWarningBox should render 1`] = `
4 |
8 | If someone (partially) fills this order before you do, your offer may only be partially filled or even denied, in which case unused funds will be refunded to your balance and allowance.
9 |
10 | `;
11 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisPleaseProvideEthereumAddress.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisPleaseProvideEthereumAddress should render 1`] = `
4 |
10 | Please provide
11 |
12 | Ethereum address
13 |
14 | !
15 |
16 | `;
17 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisSellMaker.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisSellMaker should render 1`] = `
4 |
5 | OasisSellMaker
6 |
7 | `;
8 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisSoldReceivedAmounts.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisSoldReceivedAmounts should render 1`] = `
4 |
5 |
14 |
18 |
19 |
28 |
32 |
33 |
34 | `;
35 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisStatus.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisStatus should render 1`] = `
4 |
10 | `;
11 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisTabs.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisTabs should render 1`] = `
4 |
5 |
6 | -
9 |
14 | Trade
15 |
16 |
17 | -
20 |
25 | Wrap / Unwrap
26 |
27 |
28 | -
31 |
36 | Transfer
37 |
38 |
39 |
40 |
41 | `;
42 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisTransactionIsAwaitingSign.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisTransactionIsAwaitingSign should render 1`] = `
4 |
5 | Sign Trans.
6 |
10 |
11 | `;
12 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisTransferTransfer.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisTransferTransfer should render 1`] = ``;
4 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisVolumeIsGreaterThanUserBalance.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisVolumeIsGreaterThanUserBalance should render 1`] = `
4 |
5 | Current volume is greater than offer maximum of
6 |
7 |
8 | `;
9 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisVolumeIsOverTheOfferMax.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisVolumeIsOverTheOfferMax should render 1`] = `
4 |
9 | Current volume is greater than offer maximum of
10 |
11 | 1,234.000
12 |
13 | W-GNT
14 |
15 |
16 | `;
17 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisWrapUnwrapBalances.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisWrapUnwrapBalances should render 1`] = `
4 |
8 |
32 |
33 | `;
34 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisWrapUnwrapUnwrap.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisWrapUnwrapUnwrap should render 1`] = `
4 |
10 |
14 |
18 |
19 |
27 |
30 |
31 | `;
32 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisWrapUnwrapWrap.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisWrapUnwrapWrap should render 1`] = `
4 |
10 |
14 |
17 |
18 |
27 |
30 |
31 | `;
32 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisYourOrderExceedsMaxTotalForToken.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisYourOrderExceedsMaxTotalForToken should render 1`] = `
4 |
9 |
12 | Your order total exceeds max order total set for this token
13 |
14 |
15 | `;
16 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/OasisYourTransactionFailed.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) OasisYourTransactionFailed should render 1`] = `
4 |
9 |
13 |
14 | Your transaction
15 |
16 |
20 | has failed
21 |
22 | `;
23 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/StatusPictogram.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) StatusPictogram should render 1`] = `
4 |
7 | `;
8 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/TokenAmountInput.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) TokenAmountInput should render 1`] = `
4 |
5 |
10 |
11 | `;
12 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/TransactionStatus.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) TransactionStatus should render 1`] = `
4 |
12 |
15 |
19 |
20 | `;
21 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/UnwrapStatus.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) UnwrapStatus should render 1`] = ``;
4 |
--------------------------------------------------------------------------------
/src/components/__snapshots__/WrapStatus.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Component) WrapStatus should render 1`] = ``;
4 |
--------------------------------------------------------------------------------
/src/containers/EthereumAddressInputField.scss:
--------------------------------------------------------------------------------
1 | @import "../styles/modules/grid";
2 |
3 | .EthereumAddressInputField {
4 | input {
5 | background-color: #ffffff !important;
6 | &::placeholder {
7 | //font-size: 16px;
8 | }
9 | //font-size: 0.83em !important;
10 | padding-left: 3px;
11 | &:focus {
12 | color: #68686c !important;
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/containers/OasisApp.scss:
--------------------------------------------------------------------------------
1 | @import "../styles/modules/breakpoints";
2 | @import "../styles/modules/grid";
3 |
4 | .container {
5 | @extend .container;
6 | }
7 |
8 | .FooterSeparator {
9 | margin-top: 50px;
10 | @media (max-width: $xxs) {
11 | margin-top: 0;
12 | }
13 | margin-bottom: 0;
14 | border-top: 1px solid #eee;
15 | }
16 |
17 | .appIsLoading {
18 | &, * {
19 | cursor: progress !important;
20 | }
21 | }
22 |
23 | .globalFormLockEnabled {
24 | &, *:not(input) {
25 | cursor: wait !important;
26 | }
27 | }
28 |
29 | .appIsLoaded {
30 | }
31 |
--------------------------------------------------------------------------------
/src/containers/OasisAppLoadProgress.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisAppLoadProgressWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisAppLoadProgress';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisAppLoadProgress', () => {
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('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 |
27 | it('will receive right actions', () => {
28 | expect(initialActions).toMatchSnapshot();
29 | });
30 |
31 | it('should render', () => {
32 | const wrapper = shallow(
33 |
34 | );
35 | expect(wrapper).toMatchSnapshot();
36 | });
37 |
38 | });
39 |
--------------------------------------------------------------------------------
/src/containers/OasisEtherBalance.scss:
--------------------------------------------------------------------------------
1 | @import "./OasisTokenBalance";
--------------------------------------------------------------------------------
/src/containers/OasisFooter.scss:
--------------------------------------------------------------------------------
1 | @import "../styles/modules/breakpoints";
2 | @import "../styles/modules/typography";
3 |
4 | .OasisFooter {
5 | margin-top: 16px;
6 | padding: 40px 80px;
7 | justify-content: space-evenly;
8 | @media(max-width: $xxs) {
9 | padding: 0;
10 | justify-content: space-around;
11 | }
12 | }
13 |
14 | .MistBrowser {
15 | justify-content: space-around;
16 | }
17 | .LinksSection {
18 | display: flex;
19 | flex-direction: column;
20 |
21 | & .Heading {
22 | margin: 16px 0;
23 |
24 | @include text(13px, 400);
25 | text-transform: uppercase;
26 | color: #4A4A4A;
27 | }
28 |
29 | & .Link {
30 | margin: 16px 0;
31 |
32 | @include text(12px, 700);
33 | color: #546979;
34 | cursor: pointer;
35 |
36 | @media(max-width: $xxs) {
37 | margin: 10px 0;
38 | }
39 |
40 | &:hover, &:active, &:focus {
41 | text-decoration: none;
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/src/containers/OasisFooter.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import Immutable from 'immutable';
5 |
6 | import {
7 | OasisFooterWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps,
10 | } from './OasisFooter';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisFooter', () => {
14 | const state = Immutable.fromJS({});
15 | const initialProps = mapStateToProps(state);
16 | const initialActions = mapDispatchToProps(x => x);
17 | const props = {
18 | ...initialActions,
19 | ...initialProps
20 | };
21 |
22 | it('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 | it('will receive right actions', () => {
27 | expect(initialActions).toMatchSnapshot();
28 | });
29 |
30 | it('should render', () => {
31 | const wrapper = shallow(
32 | ,
33 | );
34 | expect(wrapper).toMatchSnapshot();
35 | });
36 |
37 | });
38 |
--------------------------------------------------------------------------------
/src/containers/OasisGasPrice.scss:
--------------------------------------------------------------------------------
1 | @import "./../styles/modules/breakpoints";
2 |
3 | .base {
4 | align-items: baseline;
5 | }
6 |
7 | .detailsTradingFirstCol {
8 | flex-basis: 55%;
9 | flex-grow: 1;
10 | text-align: right;
11 | padding-right: 20px;
12 | @media (max-width: $xxs) {
13 | text-align: left;
14 | font-size: 10px;
15 | }
16 | }
17 |
18 | .detailsTradingSecCol {
19 | }
20 |
21 | .bolderText {
22 | font-weight: 500;
23 | }
24 |
25 | .estimateUSD {
26 | background-color: #f9f8f8;
27 | border-radius: 6px;
28 | border: 1px solid #efefef;
29 | color: #939194;
30 | display: inline-block;
31 | font-size: 12px;
32 | height: 22px;
33 | line-height: 1.5;
34 | padding: 0;
35 | text-align: center;
36 | vertical-align: middle;
37 | width: 92px;
38 | @media (max-width: $xxs) {
39 | font-size: 10px;
40 | height: 18px;
41 | line-height: 18px;
42 | vertical-align: middle;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/containers/OasisGasPrice.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisGasPriceWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisGasPrice';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisGasPrice', () => {
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('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 |
27 | it('will receive right actions', () => {
28 | expect(initialActions).toMatchSnapshot();
29 | });
30 |
31 | it('should render', () => {
32 | const wrapper = shallow(
33 |
34 | );
35 | expect(wrapper).toMatchSnapshot();
36 | });
37 |
38 | });
39 |
--------------------------------------------------------------------------------
/src/containers/OasisHeader.scss:
--------------------------------------------------------------------------------
1 | @import "../styles/modules/breakpoints";
2 | @import "../styles/modules/grid";
3 | .row {
4 | @extend .row;
5 | }
6 |
7 | .headerMainSection {
8 | margin-bottom: 30px;
9 | @media (max-width: $xxs) {
10 | margin-bottom: 0;
11 | }
12 | align-items: center;
13 | }
14 |
15 | .leftColumn {
16 | @media (max-width: $xs) {
17 | * {
18 | font-size: 9px !important;
19 | }
20 | margin-bottom: 15px;
21 | }
22 | @media (max-width: $xxxs) {
23 | * {
24 | font-size: 7px !important;
25 | }
26 | }
27 |
28 | @media (min-width: $xs) and (max-width: $lg) {
29 | margin-bottom: 20px;
30 | }
31 | .infoSection {
32 | @media (max-width: $xs) {
33 | position: relative;
34 | top: 5px;
35 | }
36 | @media (max-width: $xxxs) {
37 | position: relative;
38 | top: 4px;
39 | }
40 | }
41 | @media (min-width: $xs) and (max-width: $sm) {
42 | * {
43 | font-size: 12px !important;
44 | }
45 | }
46 |
47 |
48 | }
49 |
50 |
51 |
--------------------------------------------------------------------------------
/src/containers/OasisMainContentWrapper.scss:
--------------------------------------------------------------------------------
1 | .OasisMainContentWrapper {
2 | width: 940px;
3 | height: 100px;
4 | background :red;
5 | }
--------------------------------------------------------------------------------
/src/containers/OasisMakeOffer.scss:
--------------------------------------------------------------------------------
1 | @import "../styles/modules/breakpoints";
2 | @import "../styles/modules/typography";
3 |
4 | .available {
5 | font-family: Montserrat, sans-serif;
6 | font-weight: 500;
7 | margin-bottom: 16px;
8 | text-transform: uppercase;
9 | font-size: 15px;
10 | }
11 |
12 | .callToAction {
13 | float: right;
14 | //margin-top: 1.5em;
15 | min-width: 100px;
16 | @media (max-width: $xxxs) {
17 | min-width: 80px;
18 | }
19 | }
20 |
21 | .footer {
22 | display: flex;
23 | margin-top: 17px;
24 | align-items: center;
25 | }
26 |
27 | .helpBlock {
28 | flex-grow: 1;
29 | @include muted();
30 | @media (max-width: $xs) {
31 | margin-right: 10px;
32 | font-size: 12px;
33 | line-height: 15px;
34 | }
35 | }
--------------------------------------------------------------------------------
/src/containers/OasisMakeOfferModal.scss:
--------------------------------------------------------------------------------
1 | @import "../styles/modules/typography";
2 |
3 | .footer {
4 | display: flex;
5 | justify-content: space-between;
6 | }
--------------------------------------------------------------------------------
/src/containers/OasisMyOrdersContainer.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisMyOrdersContainerWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisMyOrdersContainer';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisMyOrdersContainer', () => {
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('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 |
27 | it('will receive right actions', () => {
28 | expect(initialActions).toMatchSnapshot();
29 | });
30 |
31 | it('should render', () => {
32 | const wrapper = shallow(
33 |
34 | );
35 | expect(wrapper).toMatchSnapshot();
36 | });
37 |
38 | });
39 |
--------------------------------------------------------------------------------
/src/containers/OasisOfferMakeForm.scss:
--------------------------------------------------------------------------------
1 | @import "../styles/modules/verticalForm";
2 | @import "../styles/modules/typography";
3 |
--------------------------------------------------------------------------------
/src/containers/OasisSignificantDigits.scss:
--------------------------------------------------------------------------------
1 | .paleSignificantDigit {
2 | opacity: 0.5;
3 | }
--------------------------------------------------------------------------------
/src/containers/OasisTabsContainer.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisTabsContainerWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisTabsContainer';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisTabsContainer', () => {
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('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 |
27 | it('will receive right actions', () => {
28 | expect(initialActions).toMatchSnapshot();
29 | });
30 |
31 | it('should render', () => {
32 | const wrapper = shallow(
33 |
34 | );
35 | expect(wrapper).toMatchSnapshot();
36 | });
37 |
38 | });
39 |
--------------------------------------------------------------------------------
/src/containers/OasisToQuotePrecision.jsx:
--------------------------------------------------------------------------------
1 | import React, { PureComponent } from 'react';
2 | import { PropTypes } from 'prop-types';
3 | // import ImmutablePropTypes from 'react-immutable-proptypes';
4 |
5 | import { connect } from 'react-redux';
6 | import { bindActionCreators } from 'redux';
7 |
8 | const propTypes = PropTypes && {
9 | actions: PropTypes.object.isRequired
10 | };
11 |
12 | export class OasisToQuotePrecisionWrapper extends PureComponent {
13 | render() {
14 | return (
15 |
16 | );
17 | }
18 | }
19 |
20 | export function mapStateToProps(state) {
21 | return {};
22 | }
23 | export function mapDispatchToProps(dispatch) {
24 | const actions = {};
25 | return { actions: bindActionCreators(actions, dispatch) };
26 | }
27 |
28 | OasisToQuotePrecisionWrapper.propTypes = propTypes;
29 | OasisToQuotePrecisionWrapper.displayName = 'OasisToQuotePrecision';
30 | export default connect(mapStateToProps, mapDispatchToProps)(OasisToQuotePrecisionWrapper);
31 |
--------------------------------------------------------------------------------
/src/containers/OasisToQuotePrecision.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import Immutable from 'immutable';
5 |
6 | import {
7 | OasisToQuotePrecisionWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisToQuotePrecision';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisToQuotePrecision', () => {
14 | const state = Immutable.fromJS({});
15 | const initialProps = mapStateToProps(state);
16 | const initialActions = mapDispatchToProps(x => x);
17 | const props = {
18 | ...initialActions,
19 | ...initialProps
20 | };
21 |
22 | it('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 |
27 | it('will receive right actions', () => {
28 | expect(initialActions).toMatchSnapshot();
29 | });
30 |
31 | it('should render', () => {
32 | const wrapper = shallow(
33 |
34 | );
35 | expect(wrapper).toMatchSnapshot();
36 | });
37 |
38 | });
39 |
--------------------------------------------------------------------------------
/src/containers/OasisTokenBalance.scss:
--------------------------------------------------------------------------------
1 | @import "../styles/modules/breakpoints";
2 | @import "../styles/modules/typography";
3 |
4 | .available {
5 | display: inline-block;
6 | float: right;
7 | @media (max-width: $xxs) {
8 | margin-top: 4px;
9 | }
10 | @media (max-width: $xxxs) {
11 | margin-top: 2px;
12 | }
13 | }
14 |
15 | .available-amount {
16 | @include mainInput;
17 | display: inline-block;
18 | @media (max-width: $xxs) {
19 | font-size: 16px;
20 | }
21 | @media (max-width: $xxs) {
22 | font-size: 14px;
23 | }
24 | @media (max-width: $xxxs) {
25 | font-size: 12px;
26 | }
27 | }
28 |
29 | .available-currency {
30 | @include currency;
31 | display: inline-block;
32 | }
33 |
34 | .loading {
35 | float: right;
36 | }
37 |
--------------------------------------------------------------------------------
/src/containers/OasisTokenBalanceSummary.scss:
--------------------------------------------------------------------------------
1 | @import "./../styles/modules/breakpoints";
2 |
3 | .summary {
4 | font-family: Montserrat, sans-serif;
5 | font-weight: 500;
6 | margin-bottom: 16px;
7 | text-transform: uppercase;
8 | font-size: 15px;
9 | color: #818181;
10 | @media (max-width: $xxs) {
11 | font-size: 14px;
12 | margin-bottom: 17px;
13 | }
14 | @media (max-width: $xxxs) {
15 | font-size: 12px;
16 | margin-bottom: 15px;
17 | }
18 | }
19 |
20 | .summaryLabel {
21 | position: relative;
22 | top: 4px;
23 | @media (max-width: $xxs) {
24 | font-size: 14px;
25 | }
26 | @media (max-width: $xxxs) {
27 | font-size: 12px;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/containers/OasisTokenSelect.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisTokenSelectWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisTokenSelect';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisTokenSelect', () => {
14 | const state = fromJS(global.storeMock);
15 | const initialProps = mapStateToProps(state, { name: 'exampleSelectName'});
16 | const initialActions = mapDispatchToProps(x => x);
17 | const props = {
18 | ...initialActions,
19 | ...initialProps
20 | };
21 |
22 | it('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 |
27 | it('will receive right actions', () => {
28 | expect(initialActions).toMatchSnapshot();
29 | });
30 |
31 | it('should render', () => {
32 | const wrapper = shallow(
33 |
34 | );
35 | expect(wrapper).toMatchSnapshot();
36 | });
37 |
38 | });
39 |
--------------------------------------------------------------------------------
/src/containers/OasisTokenTransfer.scss:
--------------------------------------------------------------------------------
1 | .frame {
2 | align-self: flex-start;
3 | }
4 |
5 |
6 | .tokenBalanceSummaryShorter {
7 | margin-top: 2em;
8 | margin-bottom: 10px;
9 | }
10 |
--------------------------------------------------------------------------------
/src/containers/OasisTokenTransfer.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisTokenTransferWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisTokenTransfer';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisTokenTransfer', () => {
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('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 |
27 | it('will receive right actions', () => {
28 | expect(initialActions).toMatchSnapshot();
29 | });
30 |
31 | it('should render', () => {
32 | const wrapper = shallow(
33 |
34 | );
35 | expect(wrapper).toMatchSnapshot();
36 | });
37 |
38 | });
39 |
--------------------------------------------------------------------------------
/src/containers/OasisTokenUnwrapForm.scss:
--------------------------------------------------------------------------------
1 |
2 | .footer {
3 | display: flex;
4 | align-items: center;
5 | justify-content: space-between;
6 | padding-top: 1em;
7 | padding-bottom: 2em;
8 | }
9 |
10 | .footerBtn {
11 | margin-left: auto;
12 | }
13 |
14 | .form {
15 | margin-bottom: 1em;
16 | }
17 |
--------------------------------------------------------------------------------
/src/containers/OasisTokenWrapForm.scss:
--------------------------------------------------------------------------------
1 |
2 | .footer {
3 | display: flex;
4 | align-items: center;
5 | justify-content: space-between;
6 | padding-top: 1em;
7 | padding-bottom: 2em;
8 | }
9 |
10 | .footerBtn {
11 | margin-left: auto;
12 | }
13 |
14 | .form {
15 | margin-bottom: 1em;
16 | }
17 |
--------------------------------------------------------------------------------
/src/containers/OasisTooltip.scss:
--------------------------------------------------------------------------------
1 | @import "./../styles/modules/breakpoints";
2 |
3 | .OasisTooltip {
4 | opacity: 0.5;
5 | }
--------------------------------------------------------------------------------
/src/containers/OasisTradeOrders.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisTradeOrdersWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps,
10 | } from './OasisTradeOrders';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisTradeOrders', () => {
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('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 | it('will receive right actions', () => {
27 | expect(initialActions).toMatchSnapshot();
28 | });
29 |
30 | it('should render', () => {
31 | const wrapper = shallow(
32 | ,
33 | );
34 | expect(wrapper).toMatchSnapshot();
35 | });
36 |
37 | });
38 |
--------------------------------------------------------------------------------
/src/containers/OasisTransactionStatus.scss:
--------------------------------------------------------------------------------
1 | @import "../styles/modules/breakpoints";
2 | @import "../styles/modules/typography";
3 |
4 | .base {
5 | @include text();
6 | @media (max-width: $xxxs){
7 | @include text(9px);
8 | }
9 | }
10 |
11 | .infoText {
12 | padding: 7px 0;
13 | color: #949396;
14 | :global(b), :global(strong) {
15 | color: #68676B;
16 | }
17 | }
18 |
19 | %status {
20 | display: flex;
21 | alignContent: space-between;
22 | }
23 |
24 | .status {
25 | @extend %status;
26 | }
27 |
28 | .statusDanger {
29 | @extend %status;
30 | color: $danger-text;
31 | }
32 |
--------------------------------------------------------------------------------
/src/containers/OasisTransactionStatusInfoBox.jsx:
--------------------------------------------------------------------------------
1 | import React, { PureComponent } from "react";
2 | import { PropTypes } from "prop-types";
3 |
4 | import textStyles from "../styles/modules/_typography.scss";
5 | import CSSModules from "react-css-modules";
6 | import OasisTransactionStatusWrapper from "./OasisTransactionStatus";
7 |
8 | const propTypes = PropTypes && {
9 | actions: PropTypes.object,
10 | txTimestamp: PropTypes.number,
11 | txType: PropTypes.string,
12 | localStatus: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
13 | customBlock: PropTypes.node
14 | };
15 |
16 | export class OasisTransactionStatusWrapperInfoBox extends PureComponent {
17 |
18 | render() {
19 | const { txStatus, ...props } = this.props;
20 | return txStatus ? (
21 |
22 | ) : null;
23 | }
24 | }
25 |
26 | OasisTransactionStatusWrapperInfoBox.propTypes = propTypes;
27 | OasisTransactionStatusWrapperInfoBox.displayName = "OasisTransactionStatusWrapperInfoBox";
28 | export default CSSModules(OasisTransactionStatusWrapperInfoBox, textStyles);
29 |
--------------------------------------------------------------------------------
/src/containers/OasisTransferMainWrapper.xtest.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisTransferMainWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps,
10 | } from './OasisTransferMainWrapper';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisTransferMainWrapper', () => {
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('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 | it('will receive right actions', () => {
27 | expect(initialActions).toMatchSnapshot();
28 | });
29 |
30 | it('should render', () => {
31 | const wrapper = shallow(
32 | ,
33 | );
34 | expect(wrapper).toMatchSnapshot();
35 | });
36 |
37 | });
38 |
--------------------------------------------------------------------------------
/src/containers/OasisWelcomeMessage.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 |
5 | import {
6 | OasisWelcomeMessageWrapper,
7 | mapStateToProps,
8 | mapDispatchToProps
9 | } from './OasisWelcomeMessage';
10 | import { shallow } from 'enzyme';
11 |
12 | describe('(Container) OasisWelcomeMessage', () => {
13 | const initialActions = mapDispatchToProps(x => x);
14 | const props = {
15 | ...initialActions,
16 | };
17 |
18 | it('will receive right actions', () => {
19 | expect(initialActions).toMatchSnapshot();
20 | });
21 |
22 | it('should render', () => {
23 | const wrapper = shallow(
24 |
25 | );
26 | expect(wrapper).toMatchSnapshot();
27 | });
28 |
29 | });
30 |
--------------------------------------------------------------------------------
/src/containers/OasisWrapUnwrap.xtest.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | import React from 'react';
3 | import { fromJS } from 'immutable';
4 |
5 | import {
6 | OasisWrapUnwrapWrapper,
7 | mapStateToProps,
8 | mapDispatchToProps,
9 | } from './OasisWrapUnwrap';
10 | import { shallow } from 'enzyme';
11 |
12 | describe('(Container) OasisWrapUnwrap', () => {
13 | const state = fromJS(global.storeMock);
14 | const initialProps = mapStateToProps(state);
15 | const initialActions = mapDispatchToProps(x => x);
16 | const props = {
17 | ...initialActions,
18 | ...initialProps
19 | };
20 |
21 | it('will receive right props', () => {
22 | expect(initialProps).toMatchSnapshot();
23 | });
24 |
25 | it('will receive right actions', () => {
26 | expect(initialActions).toMatchSnapshot();
27 | });
28 |
29 | it('should render', () => {
30 | const wrapper = shallow(
31 | ,
32 | );
33 | expect(wrapper).toMatchSnapshot();
34 | });
35 |
36 | });
37 |
--------------------------------------------------------------------------------
/src/containers/OasisWrapUnwrapBalances.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisWrapUnwrapBalancesWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisWrapUnwrapBalances';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisWrapUnwrapBalances', () => {
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('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 |
27 | it('will receive right actions', () => {
28 | expect(initialActions).toMatchSnapshot();
29 | });
30 |
31 | it('should render', () => {
32 | const wrapper = shallow(
33 |
34 | );
35 | expect(wrapper).toMatchSnapshot();
36 | });
37 |
38 | });
39 |
--------------------------------------------------------------------------------
/src/containers/OasisWrapUnwrapHistory.xtest.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first,no-undef */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisWrapUnwrapHistoryWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisWrapUnwrapHistory';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisWrapUnwrapHistory', () => {
14 |
15 | const state = fromJS(global.storeMock);
16 | const initialProps = mapStateToProps(state);
17 | const initialActions = mapDispatchToProps(x => x);
18 | const props = {
19 | ...initialActions,
20 | ...initialProps
21 | };
22 |
23 | it('will receive right props', () => {
24 | expect(initialProps).toMatchSnapshot();
25 | });
26 |
27 |
28 | it('will receive right actions', () => {
29 | expect(initialActions).toMatchSnapshot();
30 | });
31 |
32 | it('should render', () => {
33 | const wrapper = shallow(
34 |
35 | );
36 | expect(wrapper).toMatchSnapshot();
37 | });
38 |
39 | });
40 |
--------------------------------------------------------------------------------
/src/containers/OasisWrapUnwrapUnwrap.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisWrapUnwrapUnwrapEther,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisWrapUnwrapUnwrapEther';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisWrapUnwrapUnwrap', () => {
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 | hidden: false
21 | };
22 |
23 | it('will receive right props', () => {
24 | expect(initialProps).toMatchSnapshot();
25 | });
26 |
27 |
28 | it('will receive right actions', () => {
29 | expect(initialActions).toMatchSnapshot();
30 | });
31 |
32 | it('should render', () => {
33 | const wrapper = shallow(
34 |
35 | );
36 | expect(wrapper).toMatchSnapshot();
37 | });
38 |
39 | });
40 |
--------------------------------------------------------------------------------
/src/containers/OasisWrapUnwrapWrap.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisWrapUnwrapWrapEtherWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisWrapUnwrapWrapEther';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisWrapUnwrapWrap', () => {
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 | hidden: false
21 | };
22 |
23 | it('will receive right props', () => {
24 | expect(initialProps).toMatchSnapshot();
25 | });
26 |
27 |
28 | it('will receive right actions', () => {
29 | expect(initialActions).toMatchSnapshot();
30 | });
31 |
32 | it('should render', () => {
33 | const wrapper = shallow(
34 |
35 | );
36 | expect(wrapper).toMatchSnapshot();
37 | });
38 |
39 | });
40 |
--------------------------------------------------------------------------------
/src/containers/OasisYourNodeIsSyncing.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { fromJS } from 'immutable';
5 |
6 | import {
7 | OasisYourNodeIsSyncingWrapper,
8 | mapStateToProps,
9 | mapDispatchToProps
10 | } from './OasisYourNodeIsSyncing';
11 | import { shallow } from 'enzyme';
12 |
13 | describe('(Container) OasisYourNodeIsSyncing', () => {
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('will receive right props', () => {
23 | expect(initialProps).toMatchSnapshot();
24 | });
25 |
26 |
27 | it('will receive right actions', () => {
28 | expect(initialActions).toMatchSnapshot();
29 | });
30 |
31 | it('should render', () => {
32 | const wrapper = shallow(
33 |
34 | );
35 | expect(wrapper).toMatchSnapshot();
36 | });
37 |
38 | });
39 |
--------------------------------------------------------------------------------
/src/containers/SetTokenAllowanceTrust.scss:
--------------------------------------------------------------------------------
1 | @import "./../styles/modules/breakpoints";
2 |
3 | .accordionHeading {
4 | min-height: 34px;
5 | flex-grow: 1;
6 | }
7 |
8 | .accordingText {
9 | margin-left: 16px;
10 | }
11 |
12 | .smallAccordion {
13 | padding-top: 13px;
14 | padding-bottom: 13px;
15 | }
16 | .infoText {
17 | @media (max-width: $xxs) {
18 | max-width: 100px;
19 | }
20 | }
--------------------------------------------------------------------------------
/src/containers/TokenTransferForm.scss:
--------------------------------------------------------------------------------
1 | @import "./../styles/modules/breakpoints";
2 |
3 | .footer {
4 | display: flex;
5 | align-items: center;
6 | justify-content: space-between;
7 | padding-top: 1em;
8 | padding-bottom: 2em;
9 | }
10 |
11 | .transferTable {
12 | margin-bottom: 1em;
13 |
14 | th,
15 | .thHeader {
16 | width: 100px;
17 | }
18 |
19 | .thCurrency {
20 | width: 70px;
21 | }
22 | // this head is only to make sure the columns are the right wide
23 | thead {
24 | td {
25 | padding: 0;
26 | border: 0;
27 | }
28 | }
29 | }
30 |
31 | .tdWithErrorMessages {
32 | overflow: visible;
33 | position: relative;
34 | }
35 |
36 | .validationErrorsBox {
37 | display: flex;
38 | width: 100%;
39 | height: 34px;
40 | }
41 |
42 | .transferMaxButton {
43 | * {
44 | font-size: 10px !important;
45 | @media (max-width: $xxs) {
46 | font-size: 9px;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/EthereumAddressInputField.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) EthereumAddressInputField should render 1`] = `
4 |
5 |
11 |
12 | `;
13 |
14 | exports[`(Container) EthereumAddressInputField will receive right actions 1`] = `
15 | Object {
16 | "actions": Object {},
17 | }
18 | `;
19 |
20 | exports[`(Container) EthereumAddressInputField will receive right props 1`] = `Object {}`;
21 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisAppLoadProgress.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisAppLoadProgress should render 1`] = `
4 |
12 | `;
13 |
14 | exports[`(Container) OasisAppLoadProgress will receive right actions 1`] = `
15 | Object {
16 | "actions": Object {},
17 | }
18 | `;
19 |
20 | exports[`(Container) OasisAppLoadProgress will receive right props 1`] = `
21 | Object {
22 | "activeTradingPairOffersInitiallyLoaded": false,
23 | "initialMarketHistoryLoaded": true,
24 | "loadProgress": 66.66666666666666,
25 | "networkName": "kovan",
26 | "networkStatus": "NETWORK/ONLINE",
27 | "offersLoadProgress": "NaN",
28 | }
29 | `;
30 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisEthBalanceWarningMessage.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisEthBalanceWarningMessage should render 1`] = `""`;
4 |
5 | exports[`(Container) OasisEthBalanceWarningMessage will receive right actions 1`] = `
6 | Object {
7 | "actions": Object {},
8 | }
9 | `;
10 |
11 | exports[`(Container) OasisEthBalanceWarningMessage will receive right props 1`] = `
12 | Object {
13 | "isUserEthBalanceZero": false,
14 | }
15 | `;
16 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisGasPrice.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisGasPrice should render 1`] = `
4 |
7 | `;
8 |
9 | exports[`(Container) OasisGasPrice will receive right actions 1`] = `
10 | Object {
11 | "actions": Object {},
12 | }
13 | `;
14 |
15 | exports[`(Container) OasisGasPrice will receive right props 1`] = `
16 | Object {
17 | "latestBlockNumber": 6716998,
18 | "latestEthereumPrice": Immutable.Map {
19 | percent_change_7d: "-16.34",
20 | available_supply: "98614682.0",
21 | max_supply: null,
22 | total_supply: "98614682.0",
23 | name: "Ethereum",
24 | rank: "2",
25 | percent_change_1h: "-0.99",
26 | price_usd: "377.388",
27 | percent_change_24h: "-8.14",
28 | last_updated: "1522866553",
29 | market_cap_usd: "37215997787.0",
30 | symbol: "ETH",
31 | 24h_volume_usd: "1329870000.0",
32 | id: "ethereum",
33 | price_btc: "0.0557221",
34 | },
35 | }
36 | `;
37 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisIsTokenTradingEnabledByUser.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisIsTokenTradingEnabledByUser should render 1`] = `
4 |
12 |
15 | trading of
16 |
17 | MKR
18 |
19 |
20 |
21 |
24 | disabled
25 |
26 |
27 |
28 | `;
29 |
30 | exports[`(Container) OasisIsTokenTradingEnabledByUser will receive right actions 1`] = `
31 | Object {
32 | "actions": Object {
33 | "getAllowanceStatus": [Function],
34 | },
35 | }
36 | `;
37 |
38 | exports[`(Container) OasisIsTokenTradingEnabledByUser will receive right props 1`] = `
39 | Object {
40 | "isTokenTradingEnabledByUser": null,
41 | }
42 | `;
43 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisMessagesSection.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisMessagesSection should render 1`] = `
4 |
9 |
12 |
13 | `;
14 |
15 | exports[`(Container) OasisMessagesSection will receive right actions 1`] = `
16 | Object {
17 | "actions": Object {},
18 | }
19 | `;
20 |
21 | exports[`(Container) OasisMessagesSection will receive right props 1`] = `
22 | Object {
23 | "isSessionInitialized": undefined,
24 | "messages": Object {
25 | "MSGTYPE_INFO": Object {
26 | "dismissed": false,
27 | },
28 | "MSGTYPE_WARNING": Object {},
29 | },
30 | }
31 | `;
32 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisNotTheBestOfferPriceWarning.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisNotTheBestOfferPriceWarning should render 1`] = `
4 |
9 | WARNING: You have not chosen the best price available. Review the order book to find a better trade.
10 |
11 | `;
12 |
13 | exports[`(Container) OasisNotTheBestOfferPriceWarning will receive right actions 1`] = `
14 | Object {
15 | "actions": Object {},
16 | }
17 | `;
18 |
19 | exports[`(Container) OasisNotTheBestOfferPriceWarning will receive right props 1`] = `
20 | Object {
21 | "bestBuyOfferId": "377",
22 | "bestSellOfferId": "7",
23 | "isBestOffer": false,
24 | }
25 | `;
26 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisOfferBelowDustLimit.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisOfferBelowDustLimit should render 1`] = `""`;
4 |
5 | exports[`(Container) OasisOfferBelowDustLimit will receive right actions 1`] = `
6 | Object {
7 | "actions": Object {},
8 | }
9 | `;
10 |
11 | exports[`(Container) OasisOfferBelowDustLimit will receive right props 1`] = `
12 | Object {
13 | "isOfferBelowLimit": false,
14 | "tokenMinLimit": "0",
15 | }
16 | `;
17 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisOfferCancelModal.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisOfferCancelModal should render 1`] = `
4 |
5 |
11 |
12 | `;
13 |
14 | exports[`(Container) OasisOfferCancelModal will receive right actions 1`] = `
15 | Object {
16 | "actions": Object {
17 | "cancelOffer": [Function],
18 | "markOfferAsInactive": [Function],
19 | },
20 | }
21 | `;
22 |
23 | exports[`(Container) OasisOfferCancelModal will receive right props 1`] = `
24 | Object {
25 | "activeTradingPair": Object {
26 | "baseToken": "MKR",
27 | "quoteToken": "DAI",
28 | },
29 | "canOfferBeCancelled": false,
30 | "latestBlockNumber": 6716998,
31 | }
32 | `;
33 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisOfferSummary.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisOfferSummary should render 1`] = `
4 |
5 |
8 |
9 | `;
10 |
11 | exports[`(Container) OasisOfferSummary will receive right actions 1`] = `
12 | Object {
13 | "actions": Object {},
14 | }
15 | `;
16 |
17 | exports[`(Container) OasisOfferSummary will receive right props 1`] = `
18 | Object {
19 | "contractsLoaded": true,
20 | "gasEstimateInfo": Immutable.Map {
21 | isGasEstimatePending: undefined,
22 | transactionGasCostEstimate: undefined,
23 | transactionGasCostEstimateError: undefined,
24 | },
25 | "hasSufficientTokenAmount": false,
26 | "isTokenTradingEnabled": false,
27 | "isVolumeOrPriceEmptyOrZero": false,
28 | "offerBuyAndSellTokens": Immutable.Map {
29 | buyToken: "MKR",
30 | sellToken: "DAI",
31 | },
32 | "offerFormValues": Immutable.Map {
33 | volume: "1",
34 | price: "1",
35 | total: "1",
36 | },
37 | }
38 | `;
39 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisSignificantDigits.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisSignificantDigits should render 1`] = `
4 |
5 |
6 |
7 | `;
8 |
9 | exports[`(Container) OasisSignificantDigits will receive right actions 1`] = `
10 | Object {
11 | "actions": Object {},
12 | }
13 | `;
14 |
15 | exports[`(Container) OasisSignificantDigits will receive right props 1`] = `Object {}`;
16 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisTabsContainer.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisTabsContainer should render 1`] = `
4 |
5 |
19 |
20 | `;
21 |
22 | exports[`(Container) OasisTabsContainer will receive right actions 1`] = `
23 | Object {
24 | "actions": Object {},
25 | }
26 | `;
27 |
28 | exports[`(Container) OasisTabsContainer will receive right props 1`] = `
29 | Object {
30 | "activeTradingPair": Object {
31 | "baseToken": "MKR",
32 | "quoteToken": "DAI",
33 | },
34 | "defaultTradingPair": Immutable.Map {
35 | baseToken: "MKR",
36 | quoteToken: "W-ETH",
37 | },
38 | }
39 | `;
40 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisToQuotePrecision.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisToQuotePrecision should render 1`] = ``;
4 |
5 | exports[`(Container) OasisToQuotePrecision will receive right actions 1`] = `
6 | Object {
7 | "actions": Object {},
8 | }
9 | `;
10 |
11 | exports[`(Container) OasisToQuotePrecision will receive right props 1`] = `Object {}`;
12 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisTokenBalance.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisTokenBalance should render 1`] = `
4 |
5 |
6 | 0.00000
7 |
8 |
9 |
10 | `;
11 |
12 | exports[`(Container) OasisTokenBalance will receive right actions 1`] = `
13 | Object {
14 | "actions": Object {},
15 | }
16 | `;
17 |
18 | exports[`(Container) OasisTokenBalance will receive right props 1`] = `
19 | Object {
20 | "balance": "0",
21 | }
22 | `;
23 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisTransactionStatus.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisTransactionStatus should render 1`] = `
4 |
15 |
16 |
17 |
24 |
25 |
26 | `;
27 |
28 | exports[`(Container) OasisTransactionStatus will receive right actions 1`] = `
29 | Object {
30 | "actions": Object {},
31 | }
32 | `;
33 |
34 | exports[`(Container) OasisTransactionStatus will receive right props 1`] = `
35 | Object {
36 | "networkName": "kovan",
37 | "transaction": Immutable.Map {
38 | txStatus: undefined,
39 | },
40 | }
41 | `;
42 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisWrapUnwrapUnwrap.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisWrapUnwrapUnwrap should render 1`] = `
4 |
20 | `;
21 |
22 | exports[`(Container) OasisWrapUnwrapUnwrap will receive right actions 1`] = `
23 | Object {
24 | "actions": Object {
25 | "resetActiveUnwrapForm": [Function],
26 | "unwrapToken": [Function],
27 | },
28 | }
29 | `;
30 |
31 | exports[`(Container) OasisWrapUnwrapUnwrap will receive right props 1`] = `
32 | Object {
33 | "activeWrappedToken": "W-GNT",
34 | "activeWrappedTokenBalance": "0",
35 | "defaultAccount": "0x0000000000000000000000000000000000000000",
36 | }
37 | `;
38 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisWrapUnwrapWrap.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisWrapUnwrapWrap should render 1`] = `
4 |
21 | `;
22 |
23 | exports[`(Container) OasisWrapUnwrapWrap will receive right actions 1`] = `
24 | Object {
25 | "actions": Object {
26 | "resetActiveWrapForm": [Function],
27 | "wrapToken": [Function],
28 | },
29 | }
30 | `;
31 |
32 | exports[`(Container) OasisWrapUnwrapWrap will receive right props 1`] = `
33 | Object {
34 | "activeUnwrappedToken": "GNT",
35 | "activeUnwrappedTokenBalance": "0",
36 | "defaultAccount": "0x0000000000000000000000000000000000000000",
37 | }
38 | `;
39 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/OasisYourNodeIsSyncing.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) OasisYourNodeIsSyncing should render 1`] = `
4 |
11 | `;
12 |
13 | exports[`(Container) OasisYourNodeIsSyncing will receive right actions 1`] = `
14 | Object {
15 | "actions": Object {},
16 | }
17 | `;
18 |
19 | exports[`(Container) OasisYourNodeIsSyncing will receive right props 1`] = `
20 | Object {
21 | "latestBlock": Immutable.Map {
22 | },
23 | "networkId": "42",
24 | }
25 | `;
26 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/TokenAmountInputField.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) TokenAmountInputField should render 1`] = `
4 |
18 | `;
19 |
20 | exports[`(Container) TokenAmountInputField will receive right actions 1`] = `
21 | Object {
22 | "actions": Object {},
23 | }
24 | `;
25 |
26 | exports[`(Container) TokenAmountInputField will receive right props 1`] = `
27 | Object {
28 | "maxAmountLimit": "0",
29 | "selectedToken": "MKR",
30 | }
31 | `;
32 |
--------------------------------------------------------------------------------
/src/containers/__snapshots__/WrapUnwrapStatus.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`(Container) WrapUnwrapStatus should render 1`] = `""`;
4 |
5 | exports[`(Container) WrapUnwrapStatus will receive right actions 1`] = `
6 | Object {
7 | "actions": Object {},
8 | }
9 | `;
10 |
11 | exports[`(Container) WrapUnwrapStatus will receive right props 1`] = `
12 | Object {
13 | "activeTokenUnwrapStatus": null,
14 | "activeTokenWrapStatus": null,
15 | }
16 | `;
17 |
--------------------------------------------------------------------------------
/src/contracts/abi/token-wrapper/deposit-broker.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": [
3 | {
4 | "constant": false,
5 | "inputs": [],
6 | "name": "clear",
7 | "outputs": [],
8 | "payable": false,
9 | "type": "function"
10 | },
11 | {
12 | "inputs": [
13 | {
14 | "name": "token",
15 | "type": "address"
16 | }
17 | ],
18 | "payable": false,
19 | "type": "constructor"
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/src/fonts/Montserrat-Medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/fonts/Montserrat-Medium.woff
--------------------------------------------------------------------------------
/src/fonts/Montserrat-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/fonts/Montserrat-Medium.woff2
--------------------------------------------------------------------------------
/src/fonts/Montserrat-SemiBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/fonts/Montserrat-SemiBold.woff
--------------------------------------------------------------------------------
/src/fonts/Montserrat-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/fonts/Montserrat-SemiBold.woff2
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | /*@import url('http://fonts.googleapis.com/css?family=Montserrat:300,400,500,700|Open+Sans:400,600,700|Roboto:500,900');*/
--------------------------------------------------------------------------------
/src/inputMasks.js:
--------------------------------------------------------------------------------
1 | import { createNumberMask } from "redux-form-input-masks";
2 |
3 | export const amountMask = (options = {}) => createNumberMask({ ...options, decimalPlaces: 5, locale: 'en' });
--------------------------------------------------------------------------------
/src/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "nodeURL": "http://localhost:8545"
3 | }
4 |
--------------------------------------------------------------------------------
/src/store/deferredThunk.js:
--------------------------------------------------------------------------------
1 | export const deferredThunk = () => next => action => {
2 | if (action instanceof Array) {
3 | const [thunk, ...args] = action;
4 | return next(thunk(...args));
5 | } else {
6 | return next(action);
7 | }
8 | }
9 |
10 | export const defer = (...args) => args
--------------------------------------------------------------------------------
/src/store/reducers/network/CheckNetworkAction.js:
--------------------------------------------------------------------------------
1 | import { createPromiseActions } from "../../../utils/createPromiseActions";
2 |
3 | export const CheckNetworkAction = createPromiseActions("NETWORK/CHECK_NETWORK");
4 |
--------------------------------------------------------------------------------
/src/store/reducers/network/checkIfOutOfSync.js:
--------------------------------------------------------------------------------
1 | import {
2 | getLatestBlock,
3 | setLatestBlockNumber
4 | } from "./subscribeLatestBlockFilterEpic";
5 | import { syncNetwork } from "../network";
6 | import moment from "moment/moment";
7 |
8 | export const NODE_OUT_OF_SYNC_THRESHOLD_IN_SECONDS = 640;
9 |
10 | export const checkIfOutOfSyncEpic = () => dispatch =>
11 | dispatch(getLatestBlock()).then(({ value: lb }) => {
12 | const { timestamp, number } = lb;
13 | dispatch(setLatestBlockNumber(number));
14 | if (moment().diff(moment.unix(timestamp), "seconds") > NODE_OUT_OF_SYNC_THRESHOLD_IN_SECONDS) {
15 | dispatch(syncNetwork.pending(lb));
16 | } else {
17 | dispatch(syncNetwork.fulfilled(lb));
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/src/store/reducers/offers/subscribeNewOffersFilledInEpic.js:
--------------------------------------------------------------------------------
1 | import {getMarketContractInstance} from '../../../bootstrap/contracts';
2 | import {createAction} from 'redux-actions';
3 |
4 | /**
5 | * New offer is filled in
6 | * - sync offer
7 | *
8 | */
9 | const newOfferFilledIn = createAction('OFFERS/NEW_OFFER_FILLED_IN', offerId => offerId);
10 | export const subscribeNewOffersFilledInEpic = (fromBlock, filter = {}, {
11 | doGetMarketContractInstance = getMarketContractInstance,
12 | } = {}) => async dispatch => {
13 | doGetMarketContractInstance().LogMake(filter, { fromBlock, toBlock: 'latest' })
14 | .then((err, LogMakeEvent) => {
15 | const newOfferId = parseInt(LogMakeEvent.args.id, 16);
16 | dispatch(
17 | newOfferFilledIn(newOfferId),
18 | );
19 | // console.log({ LogMakeEvent })
20 | });
21 | };
--------------------------------------------------------------------------------
/src/store/reducers/transactionWatchers.js:
--------------------------------------------------------------------------------
1 | import { handleActions } from 'redux-actions';
2 | import Immutable from 'immutable';
3 |
4 |
5 | const initialState = Immutable.fromJS({
6 | watchers: [],
7 | });
8 |
9 |
10 | const actions = {
11 | };
12 |
13 | const reducer = handleActions({}, initialState);
14 |
15 | export default {
16 | actions,
17 | reducer,
18 | };
19 |
--------------------------------------------------------------------------------
/src/store/selectors/accounts.js:
--------------------------------------------------------------------------------
1 | import { createSelector } from 'reselect';
2 |
3 | const acc = s => s.get('accounts');
4 |
5 | const defaultAccount = createSelector(
6 | acc, (s) => s.get('defaultAccount')
7 | );
8 |
9 | const accounts = createSelector(
10 | acc, (s) => s.get('accounts')
11 | );
12 |
13 | export default {
14 | state: acc,
15 | defaultAccount,
16 | accounts
17 | }
--------------------------------------------------------------------------------
/src/store/selectors/isVolumeOrPriceEmptyOrZero.js:
--------------------------------------------------------------------------------
1 | import { TAKE_BUY_OFFER, TAKE_SELL_OFFER } from '../reducers/offerTakes';
2 | import { MAKE_BUY_OFFER, MAKE_SELL_OFFER } from '../../constants';
3 | import offerMakes from './offerMakes';
4 | import offerTakes from './offerTakes';
5 | import { createSelector } from "reselect";
6 | import {memoize} from 'lodash';
7 |
8 | const isVolumeOrPriceEmptyOrZero = createSelector(
9 | offerTakes.isVolumeEmptyOrZero,
10 | offerMakes.isVolumeOrPriceEmptyOrZero,
11 | (isVolumeEmptyOrZero, isVolumeOrPriceEmptyOrZero) => memoize(offerType => {
12 | switch (offerType) {
13 | case TAKE_SELL_OFFER:
14 | case TAKE_BUY_OFFER:
15 | return isVolumeEmptyOrZero;
16 | case MAKE_SELL_OFFER:
17 | case MAKE_BUY_OFFER:
18 | return isVolumeOrPriceEmptyOrZero(offerType);
19 | }
20 | })
21 | );
22 | export default isVolumeOrPriceEmptyOrZero;
23 |
--------------------------------------------------------------------------------
/src/store/selectors/markets.js:
--------------------------------------------------------------------------------
1 | import { createSelector } from 'reselect';
2 |
3 | const markets = state => state.get('markets');
4 |
5 | const marketCloseTime = createSelector(
6 | markets, (state) => parseInt(state.get('closeTime'))
7 | );
8 |
9 | const activeMarketAddress = createSelector(
10 | markets, (state) => state.get('activeMarketAddress')
11 | );
12 |
13 | const isBuyEnabled = createSelector(
14 | markets, s => s.get('isBuyEnabled')
15 | );
16 |
17 | const activeMarketOriginBlock = createSelector(
18 | markets, s => s.get('activeMarketOriginBlock')
19 | );
20 |
21 | export default {
22 | state: markets,
23 | marketCloseTime,
24 | activeMarketAddress,
25 | isBuyEnabled,
26 | activeMarketOriginBlock
27 | }
--------------------------------------------------------------------------------
/src/store/selectors/session.js:
--------------------------------------------------------------------------------
1 | import { createSelector } from 'reselect';
2 |
3 | const session = state => state.get('session');
4 |
5 | const messages = createSelector(
6 | session,
7 | state => {
8 | if(state.hasIn(['persist', 'messages'])) {
9 | return state.getIn(['persist', 'messages']).toJSON()
10 | }
11 | }
12 | );
13 |
14 | const sessionData = createSelector(
15 | session,
16 | state => state.getIn(['session']).toJSON()
17 | );
18 |
19 | const persistentData = createSelector(
20 | session,
21 | state => state.getIn(['persist']).toJSON()
22 | );
23 |
24 | const isSessionInitialized = createSelector(
25 | session,
26 | state => state.get('initialized')
27 | );
28 |
29 | export default {
30 | state: session,
31 | persistentData,
32 | sessionData,
33 | messages,
34 | isSessionInitialized
35 | };
--------------------------------------------------------------------------------
/src/store/selectors/tokenSelectors.js:
--------------------------------------------------------------------------------
1 | import { createSelector } from 'reselect';
2 | import reselect from '../../utils/reselect';
3 |
4 | const tokenSelectors = s => s.get('tokenSelectors');
5 |
6 | const selectedToken = createSelector(
7 | tokenSelectors,
8 | reselect.getProps,
9 | (s, selectorName) => s.get(selectorName)
10 | );
11 |
12 | export default {
13 | state: tokenSelectors,
14 | selectedToken
15 | }
--------------------------------------------------------------------------------
/src/store/selectors/transfers.js:
--------------------------------------------------------------------------------
1 | import { createSelector } from 'reselect';
2 | import { formValueSelector } from 'redux-form/immutable';
3 | import tokenSelectors from './tokenSelectors';
4 |
5 | const transfers = s => s.get('transfers');
6 |
7 | const getMakeTransferFormValues = createSelector(
8 | rootState => formValueSelector('tokenTransfer')(rootState, 'token' , 'tokenAmount', 'recipient'),
9 | formValues => formValues
10 | );
11 |
12 | const selectedToken = createSelector(
13 | rootState => tokenSelectors.selectedToken(rootState, 'tokenTransfer'),
14 | selectedToken => selectedToken
15 | );
16 |
17 | const transactionSubjectId = createSelector(
18 | transfers,
19 | s => s.get('txSubjectId')
20 | );
21 |
22 | export default {
23 | state: transfers,
24 | getMakeTransferFormValues,
25 | selectedToken,
26 | transactionSubjectId
27 | }
--------------------------------------------------------------------------------
/src/store/selectors/userTrades.js:
--------------------------------------------------------------------------------
1 | import { createSelector } from "reselect";
2 |
3 | const userTrades = state => state.get("userTrades");
4 |
5 | const initialMarketHistoryLoaded = createSelector(
6 | userTrades, state => state.get("initialMarketHistoryLoaded")
7 | );
8 |
9 | const marketHistory = createSelector(userTrades, state =>
10 | state.get("marketHistory")
11 | );
12 |
13 | const marketsData = createSelector(
14 | userTrades,
15 | initialMarketHistoryLoaded,
16 | marketHistory,
17 | (s, initialMarketHistoryLoaded, marketHistory) => {
18 | if (initialMarketHistoryLoaded) {
19 | return marketHistory;
20 | }
21 | }
22 | );
23 |
24 | const volumesLoaded = createSelector(userTrades, state =>
25 | state.get("volumesLoaded")
26 | );
27 |
28 | const loadindUserMarketHistory = createSelector(
29 | userTrades, s => s.get("loadingUserMarketHistory")
30 | );
31 |
32 | export default {
33 | state: userTrades,
34 | marketsData,
35 | initialMarketHistoryLoaded,
36 | volumesLoaded,
37 | loadindUserMarketHistory
38 | };
39 |
--------------------------------------------------------------------------------
/src/store/thunk2Data.js:
--------------------------------------------------------------------------------
1 | export default () => {
2 | let first = true;
3 | return store => next => action => {
4 |
5 | if(first) {
6 | first = false;
7 | return next(action);
8 | }
9 |
10 | if (action instanceof Array) {
11 | const [thunk, ...args] = action;
12 | return next({type: 'deferred-thunk', payload: {thunk, thunkName: thunk.name, args}});
13 | } else if (typeof action === 'function') {
14 | return next({type: 'thunk', payload: {thunk: action, thunkName: action.name}});
15 | } else {
16 | return next(action);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/styles/modules/_breakpoints.scss:
--------------------------------------------------------------------------------
1 | /* MEDIA QUERIES BREAKPOINTS */
2 | $xxxs: 359px;
3 | $xxs: 480px;
4 | $xs: 768px;
5 | $sm: 992px;
6 | $md: 1200px;
7 | $lg: 1024px;
8 |
--------------------------------------------------------------------------------
/src/styles/modules/_constants.scss:
--------------------------------------------------------------------------------
1 | $tabs-width: 496px;
2 |
3 | $tabs-background--on-hover: #E8E9ED;
4 | $lightgray: #DCDDE0;
5 | $gray: rgb(163, 165, 171);
6 | $blue-darkish: #222228;
7 | $gray-blueish: #4F5362;
8 |
9 | $success: #19B092;
10 | $success-text: #26A69A;
11 |
12 | $danger: #EF5350;
13 | $danger-text: #EF5350;
14 |
15 | $warn: #FD9696;
16 | $warn-text: #F18482;
17 |
18 | $table-border: #EFEFEF;
19 | $table-header-bg: #F8F7F5;
20 |
21 | $btn-border-default: #C9C9C9;
22 | $btn-text-default: #68686B;
23 |
24 | $table-padding-vertical: 5px;
25 | $table-padding-horizontal: 11px;
--------------------------------------------------------------------------------
/src/styles/modules/_grid.scss:
--------------------------------------------------------------------------------
1 | .container {
2 | max-width: 980px;
3 | }
4 |
5 | .row {
6 | justify-content: flex-end;
7 | }
8 |
9 | @mixin reset {
10 | width: 0;
11 | flex-basis: 0;
12 | padding: 0;
13 | margin: 0;
14 | flex-grow: 0;
15 | }
--------------------------------------------------------------------------------
/src/styles/modules/_shapes.scss:
--------------------------------------------------------------------------------
1 | @mixin circle($diameter) {
2 | display: inline-flex;
3 | width: $diameter;
4 | height: $diameter;
5 |
6 | line-height: 1;
7 |
8 | border: 1px solid transparent;
9 | border-radius: 50%;
10 |
11 | @include text(8px);
12 |
13 | justify-content: center;
14 | align-items: center;
15 | }
16 |
17 | .Cross {
18 | opacity: 0.2;
19 |
20 | &:hover {
21 | opacity: 0.3;
22 | }
23 |
24 | &:before, &:after {
25 | position: absolute;
26 | left: 15px;
27 | content: ' ';
28 | height: 100%;
29 | width: 2px;
30 | background-color: #333;
31 | }
32 |
33 | &:before {
34 | transform: rotate(45deg);
35 | }
36 |
37 | &:after {
38 | transform: rotate(-45deg);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/styles/modules/_table.scss:
--------------------------------------------------------------------------------
1 | @import "typography";
2 | @import "./verticalForm";
3 |
4 | .table {
5 | @include verticalFormTable;
6 | }
7 |
8 | .withInput {
9 | @include tdWithInput;
10 | }
11 |
12 | .currency {
13 | @include currency;
14 | }
15 |
16 | // input group in tables
17 | .inputGroup {
18 | display: flex;
19 | }
20 |
21 | // dummy div for onBlur and onFocus,
22 | // placed directly inside inputGroup, next to button, containing input
23 | // The structure should look like this:
24 | // td.withInput
25 | // div.inputGroup
26 | // button.inputBtn
27 | // div.inputGroupEventHandlerChild
28 | // input
29 | .inputGroupEventHandlerChild {
30 | display: flex;
31 | align-items: center;
32 | justify-content: center;
33 | width: 100%;
34 | }
35 |
36 | .inputBtn {
37 | @media (max-width: $xxs) {
38 | font-size: 7px;
39 | }
40 | margin: 5px;
41 | }
--------------------------------------------------------------------------------
/src/utils/amounts/balanceToString.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/utils/amounts/balanceToString.js
--------------------------------------------------------------------------------
/src/utils/blocks/getDiffFromLatestBlock.js:
--------------------------------------------------------------------------------
1 | import network from '../../store/selectors/network';
2 |
3 | const BLOCK_DIFF_TYPE_TIME = 'BLOCK_DIFF/TYPE_TIME';
4 | const BLOCK_DIFF_TYPE_BLOCK_COUNT = 'BLOCK_DIFF/TYPE_BLOCK_COUNT';
5 |
6 | const getDiffFromLatestBlock = (blockNumber, getState, diffType = BLOCK_DIFF_TYPE_BLOCK_COUNT) => {
7 | const latestBlockNumber = network.latestBlockNumber(getState());
8 | switch (diffType) {
9 | case BLOCK_DIFF_TYPE_BLOCK_COUNT:
10 | return latestBlockNumber - blockNumber;
11 | case BLOCK_DIFF_TYPE_TIME:
12 | alert('Not implemented yet');
13 | break;
14 | }
15 | };
16 |
17 | export default getDiffFromLatestBlock;
--------------------------------------------------------------------------------
/src/utils/contracts/createContractInstance.js:
--------------------------------------------------------------------------------
1 | import web3 from '../../bootstrap/web3';
2 |
3 | const createContractInstance = (contractAddress, contractAbi) => {
4 | return web3.eth.contract(contractAddress).atan(contractAbi);
5 | };
6 |
7 | export default createContractInstance;
--------------------------------------------------------------------------------
/src/utils/contracts/getContractInstance.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/utils/contracts/getContractInstance.js
--------------------------------------------------------------------------------
/src/utils/createEtherscanTransactionLink.js:
--------------------------------------------------------------------------------
1 | import { KOVAN } from "../constants";
2 |
3 | const createEtherscanTransactionLink = ({
4 | activeNetworkName,
5 | transactionHash
6 | }) => {
7 | switch (activeNetworkName) {
8 | case KOVAN:
9 | return `https://${activeNetworkName}.etherscan.io/tx/${transactionHash}`;
10 | default:
11 | return `https://etherscan.io/tx/${transactionHash}`;
12 | }
13 | };
14 |
15 | export const createEtherscanAddressLink = ({
16 | networkName,
17 | address,
18 | }) => {
19 | switch (networkName) {
20 | case KOVAN:
21 | return `https://${networkName}.etherscan.io/address/${address}`;
22 | default:
23 | return `https://etherscan.io/address/${address}`;
24 | }
25 | };
26 |
27 | export default createEtherscanTransactionLink;
28 |
--------------------------------------------------------------------------------
/src/utils/createPromiseActions.js:
--------------------------------------------------------------------------------
1 | import { createAction } from 'redux-actions';
2 | import * as storeHelpers from './store';
3 |
4 | export function createPromiseActions(actionName,
5 | { pending, fulfilled, rejected } = {}) {
6 | return {
7 | 'pending': createAction(
8 | storeHelpers.pending(actionName),
9 | pending ? pending : (v) => v,
10 | ),
11 | 'fulfilled': createAction(
12 | [storeHelpers.fulfilled(actionName)],
13 | fulfilled ? fulfilled : (v) => v,
14 | ),
15 | 'rejected': createAction(
16 | [storeHelpers.rejected(actionName)],
17 | rejected ? rejected : (v) => v,
18 | ),
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/src/utils/errorCodes.js:
--------------------------------------------------------------------------------
1 | export const ERRORS = {
2 | NO_CONNECTION: 'ERRORS/NO_CONNECTION',
3 | };
--------------------------------------------------------------------------------
/src/utils/errorHandlers.js:
--------------------------------------------------------------------------------
1 | import { ERRORS } from './errorCodes';
2 |
3 | import { onMissingConnection } from './onMissingConnection';
4 |
5 | const handlers = {
6 | [ERRORS.NO_CONNECTION]: onMissingConnection,
7 | };
8 |
9 | class ErrorHandler {
10 | handle(error) {
11 | console.log('ErrorHandler', error);
12 | const handler = handlers[error];
13 | if (!handler) {
14 | throw new Error('Platform error:', error);
15 | }
16 |
17 | handler(error);
18 | }
19 | }
20 |
21 | export const errorHandler = new ErrorHandler();
--------------------------------------------------------------------------------
/src/utils/generateTradingPairs.js:
--------------------------------------------------------------------------------
1 | import {
2 | TOKEN_DAI,
3 | TOKEN_DIGIX,
4 | TOKEN_MAKER,
5 | TOKEN_RHOC,
6 | TOKEN_WRAPPED_ETH,
7 | } from "../constants";
8 |
9 | export const generateTradingPairs = () => {
10 | return [
11 | {
12 | base: TOKEN_WRAPPED_ETH,
13 | quote: TOKEN_DAI,
14 | priority: 9,
15 | isDefault: true
16 | },
17 | {
18 | base: TOKEN_MAKER,
19 | quote: TOKEN_DAI,
20 | isDefault: true
21 | },
22 | {
23 | base: TOKEN_MAKER,
24 | quote: TOKEN_WRAPPED_ETH,
25 | isDefault: true
26 | },
27 | {
28 | base: TOKEN_DIGIX,
29 | quote: TOKEN_WRAPPED_ETH
30 | },
31 | {
32 | base: TOKEN_RHOC,
33 | quote: TOKEN_WRAPPED_ETH
34 | },
35 | ];
36 | };
37 |
--------------------------------------------------------------------------------
/src/utils/numbers/isNumeric.js:
--------------------------------------------------------------------------------
1 | const isNumeric = n => !isNaN(parseFloat(n)) && isFinite(n);
2 |
3 | export default isNumeric;
--------------------------------------------------------------------------------
/src/utils/numbers/isNumericAndGreaterThanZero.js:
--------------------------------------------------------------------------------
1 | import web3 from "../../bootstrap/web3";
2 |
3 | const isNumericAndGreaterThanZero = n =>
4 | n && !isNaN(parseFloat(n)) && isFinite(n) && web3.toBigNumber(n).gt(0);
5 |
6 | export default isNumericAndGreaterThanZero;
7 |
--------------------------------------------------------------------------------
/src/utils/offers/getOfferPrice.js:
--------------------------------------------------------------------------------
1 | import { MAKE_BUY_OFFER, MAKE_SELL_OFFER } from "../../constants";
2 | import web3 from "../../bootstrap/web3";
3 |
4 | export const getOfferPrice = (
5 | offer,
6 | offerMakeType
7 | ) => {
8 | switch (offerMakeType) {
9 | case MAKE_BUY_OFFER:
10 | return web3.toBigNumber(offer.bid_price);
11 | case MAKE_SELL_OFFER:
12 | return web3.toBigNumber(offer.ask_price);
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/src/utils/offers/offerMakeToFormName.js:
--------------------------------------------------------------------------------
1 | import { MAKE_BUY_OFFER, MAKE_SELL_OFFER,
2 | MAKE_SELL_OFFER_FORM_NAME, MAKE_BUY_OFFER_FORM_NAME} from '../../constants';
3 |
4 | const offerMakeToFormName = (offerMakeType) => {
5 | switch (offerMakeType) {
6 | case MAKE_SELL_OFFER: return MAKE_SELL_OFFER_FORM_NAME;
7 | case MAKE_BUY_OFFER: return MAKE_BUY_OFFER_FORM_NAME;
8 | default: throw new Error(`Wrong offerMakeType: ${offerMakeType}!`)
9 | }
10 | };
11 |
12 | const formNameToOfferMake = (formName) => {
13 | switch (formName) {
14 | case "makeBuyOffer": return MAKE_BUY_OFFER;
15 | case "makeSellOffer": return MAKE_SELL_OFFER;
16 | default: throw new Error(`Wrong formName: ${formName}!`)
17 | }
18 | };
19 |
20 | export {
21 | offerMakeToFormName,
22 | formNameToOfferMake
23 | };
--------------------------------------------------------------------------------
/src/utils/offers/offerMakeTypeToOfferListName.js:
--------------------------------------------------------------------------------
1 | import { MAKE_BUY_OFFER, MAKE_SELL_OFFER } from '../../constants'
2 |
3 | export const offerMakeTypeToOfferListName = (offerMakeType) => {
4 | switch (offerMakeType) {
5 | case MAKE_BUY_OFFER: return 'buyOffers';
6 | case MAKE_SELL_OFFER: return 'sellOffers'
7 | }
8 | };
--------------------------------------------------------------------------------
/src/utils/offers/tokenToBeAllowedForOffer.js:
--------------------------------------------------------------------------------
1 | import { MAKE_BUY_OFFER, MAKE_SELL_OFFER } from '../../constants';
2 | import { TAKE_BUY_OFFER, TAKE_SELL_OFFER } from '../../store/reducers/offerTakes';
3 |
4 | const tokenToBeAllowedForOffer = ({offerType, sellToken, buyToken }) => {
5 | // console.log({buyToken, sellToken, offerType})
6 | switch (offerType) {
7 | case MAKE_SELL_OFFER:
8 | case MAKE_BUY_OFFER:
9 | return buyToken;
10 | case TAKE_BUY_OFFER:
11 | case TAKE_SELL_OFFER:
12 | return sellToken;
13 | }
14 | };
15 |
16 | export default tokenToBeAllowedForOffer;
--------------------------------------------------------------------------------
/src/utils/offers/transactionTypeToFormName.js:
--------------------------------------------------------------------------------
1 | import { MAKE_BUY_OFFER, MAKE_SELL_OFFER } from '../../store/reducers/offerMakes';
2 | import { MAKE_SELL_OFFER_FORM_NAME } from '../../containers/OasisMakeSellOffer';
3 | import { MAKE_BUY_OFFER_FORM_NAME } from '../../containers/OasisMakeBuyOffer';
4 |
5 | const offerMakeToFormName = (offerMakeType) => {
6 | switch (offerMakeType) {
7 | case MAKE_SELL_OFFER: return MAKE_SELL_OFFER_FORM_NAME;
8 | case MAKE_BUY_OFFER: return MAKE_BUY_OFFER_FORM_NAME;
9 | default: throw new Error('no offerMakeType provided!')
10 | }
11 | };
12 |
13 | export default offerMakeToFormName;
--------------------------------------------------------------------------------
/src/utils/onMissingConnection.js:
--------------------------------------------------------------------------------
1 |
2 | export const onMissingConnection = () => {};
--------------------------------------------------------------------------------
/src/utils/openEtherscanTransactionLink.js:
--------------------------------------------------------------------------------
1 | import createEtherscanTransactionLink from './createEtherscanTransactionLink'
2 |
3 | function openEtherscanTransactionLink({...kwargs}) {
4 | window.open(
5 | createEtherscanTransactionLink(kwargs),
6 | "_blank",
7 | );
8 | window.focus();
9 | }
10 |
11 | export default openEtherscanTransactionLink;
12 |
--------------------------------------------------------------------------------
/src/utils/promisify.js:
--------------------------------------------------------------------------------
1 | export default function(func) {
2 | return (...args) =>
3 | new Promise((resolve, reject) => {
4 | const cb = (err, data) => err ? reject(err) : resolve(data);
5 | func.apply(this, [...args, cb]);
6 | });
7 | }
--------------------------------------------------------------------------------
/src/utils/reselect.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import { createStructuredSelector } from "reselect";
3 | import { formValueSelector } from "redux-form/immutable";
4 |
5 | const getProps = (...args) => args[1];
6 |
7 | function formFieldsSelector(formName, ...fields) {
8 | const form = formValueSelector(formName);
9 | return createStructuredSelector(_.fromPairs(fields.map(f => [[f], s => form(s, f)])));
10 | }
11 |
12 | export default {
13 | getProps,
14 | formFieldsSelector,
15 | }
16 |
--------------------------------------------------------------------------------
/src/utils/solSha3.js:
--------------------------------------------------------------------------------
1 | import web3 from "../bootstrap/web3";
2 |
3 | function pad(value, length) {
4 | return value.toString().length < length ? pad("0" + value, length) : value;
5 | }
6 |
7 | export const solSha3 = (...args) => {
8 | args = args.map(arg => {
9 | if (typeof arg === "string") {
10 | if (arg.substring(0, 2) === "0x") {
11 | return arg.slice(2);
12 | } else {
13 | return web3.toHex(arg).slice(2);
14 | }
15 | }
16 |
17 | if (typeof arg === "number") {
18 | return pad(arg.toString(16), 64, 0);
19 | } else {
20 | return "";
21 | }
22 | });
23 |
24 | args = args.join("");
25 |
26 | return web3.sha3(args, { encoding: "hex" });
27 | };
28 |
--------------------------------------------------------------------------------
/src/utils/sort.js:
--------------------------------------------------------------------------------
1 | import isArray from 'lodash/isArray';
2 | import orderBy from 'lodash/orderBy';
3 |
4 | export const ASCENDING = 'asc';
5 | export const DESCENDING = 'desc';
6 |
7 | const orderByTimestamp = (data, sortOrder = ASCENDING) => {
8 | if(isArray(data)) {
9 | return orderBy(data, (el) => parseInt(el.timestamp), sortOrder);
10 | } else {
11 | throw new Error('Please provide instance of array.');
12 | }
13 | };
14 |
15 | export {
16 | orderByTimestamp
17 | }
--------------------------------------------------------------------------------
/src/utils/store.js:
--------------------------------------------------------------------------------
1 | export function pending(actionName) {
2 | return `${actionName}_PENDING`;
3 | }
4 |
5 | export function fulfilled(actionName) {
6 | return `${actionName}_FULFILLED`;
7 | }
8 |
9 | export function rejected(actionName) {
10 | return `${actionName}_REJECTED`;
11 | }
12 |
--------------------------------------------------------------------------------
/src/utils/subscriptions/registerSubscription.js:
--------------------------------------------------------------------------------
1 | import platform from "../../store/selectors/platform";
2 | import platformReducer from "../../store/reducers/platform";
3 |
4 | export const registerSubscription = (
5 | subscriptionType,
6 | onRegister,
7 | { dispatch, getState },
8 | subscriptionsGroup
9 | ) => {
10 | if (
11 | !platform.isSubscriptionRegistered(getState(), {
12 | subscriptionsGroup,
13 | subscriptionType
14 | })
15 | ) {
16 | onRegister();
17 | dispatch(
18 | platformReducer.actions.registerSubscriptionByTypeAndGroup(
19 | subscriptionsGroup,
20 | subscriptionType
21 | )
22 | );
23 | return true;
24 | } else {
25 | console.error(`onErrorRegister => ${subscriptionsGroup} ${subscriptionType}`);
26 | return false;
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/src/utils/time.js:
--------------------------------------------------------------------------------
1 | export const TIMESTAMP_RESOLUTION_MS = 1;
2 | export const TIMESTAMP_RESOLUTION_SEC = 1000;
3 |
4 |
5 | const getTimestamp = (timestampRes = TIMESTAMP_RESOLUTION_MS) => {
6 | const currentTimestamp = Date.now();
7 | switch (timestampRes) {
8 | case TIMESTAMP_RESOLUTION_SEC: return Math.ceil(currentTimestamp / 1000);
9 | case TIMESTAMP_RESOLUTION_MS: return currentTimestamp;
10 | }
11 | };
12 |
13 | export {
14 | getTimestamp
15 | }
--------------------------------------------------------------------------------
/src/utils/tokenFormat.js:
--------------------------------------------------------------------------------
1 | import BigNumber from 'bignumber.js';
2 |
3 | export default function(n, dp = 5) {
4 | if (isNaN(+n)) return;
5 | const bn = new BigNumber(n);
6 | return bn.toFormat(dp);
7 | };
--------------------------------------------------------------------------------
/src/utils/tokens/getOfferMakeBuyAndSellTokens.js:
--------------------------------------------------------------------------------
1 | import { MAKE_BUY_OFFER, MAKE_SELL_OFFER } from '../../store/reducers/offerMakes';
2 |
3 | const getOfferMakeBuyAndSellTokens = (tradingPair, offerMakeType) => {
4 | switch (offerMakeType) {
5 | case MAKE_BUY_OFFER:
6 | return {
7 | buyToken: tradingPair['baseToken'],
8 | sellToken: tradingPair['quoteToken']
9 | };
10 | case MAKE_SELL_OFFER:
11 | return {
12 | buyToken: tradingPair['quoteToken'],
13 | sellToken: tradingPair['baseToken']
14 | };
15 | }
16 | };
17 |
18 | export default getOfferMakeBuyAndSellTokens;
--------------------------------------------------------------------------------
/src/utils/tokens/getOfferTakeBuyAndSellTokens.js:
--------------------------------------------------------------------------------
1 | import { TAKE_BUY_OFFER, TAKE_SELL_OFFER } from '../../store/reducers/offerTakes';
2 |
3 | const getOfferTakeBuyAndSellTokens = (tradingPair, offerTakeType) => {
4 | switch (offerTakeType) {
5 | case TAKE_BUY_OFFER:
6 | return {
7 | buyToken: tradingPair['quoteToken'],
8 | sellToken: tradingPair['baseToken']
9 | };
10 | case TAKE_SELL_OFFER:
11 | return {
12 | buyToken: tradingPair['baseToken'],
13 | sellToken: tradingPair['quoteToken']
14 | };
15 | }
16 | };
17 |
18 | export default getOfferTakeBuyAndSellTokens;
--------------------------------------------------------------------------------
/src/utils/tokens/getTokenByAddress.js:
--------------------------------------------------------------------------------
1 | import { getTokenContractsList } from '../../bootstrap/contracts';
2 |
3 | export default (tokenAddress) => {
4 | const tokens = Object.entries(getTokenContractsList());
5 | for (let i = 0; i < tokens.length; ++i) {
6 | const [tokenName, tokenContract] = tokens[i];
7 | if (tokenContract.address === tokenAddress) {
8 | return tokenName;
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/utils/tokens/getTokenPairFormat.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/utils/tokens/getTokenPairFormat.js
--------------------------------------------------------------------------------
/src/utils/tokens/getTokenPairPrice.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/utils/tokens/getTokenPairPrice.js
--------------------------------------------------------------------------------
/src/utils/tokens/getTokenPairTrades.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/utils/tokens/getTokenPairTrades.js
--------------------------------------------------------------------------------
/src/utils/tokens/getTokenPairVolume.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OasisDEX/oasis-react/d787feca1260140f9370126b6a360029c3094143/src/utils/tokens/getTokenPairVolume.js
--------------------------------------------------------------------------------
/src/utils/transactions/findTransaction.js:
--------------------------------------------------------------------------------
1 | import transactions from '../../store/selectors/transactions';
2 | import { TX__GROUP__LIMITS, TX__GROUP__OFFERS, TX__GROUP__TOKENS } from '../../store/reducers/transactions';
3 |
4 | const findTransaction = (txSubjectId, txGroup, state) => {
5 | switch (txGroup) {
6 | case TX__GROUP__OFFERS:
7 | return transactions.getOfferTransaction(state).find(txItem => txItem.txSubjectId == txSubjectId);
8 | case TX__GROUP__TOKENS:
9 | return transactions.getTokenTransaction(state).find(txItem => txItem.txSubjectId == txSubjectId);
10 | case TX__GROUP__LIMITS:
11 | return transactions.limitsTransactions(state).find(txItem => txItem.txSubjectId == txSubjectId);
12 | }
13 | };
14 |
15 | export default findTransaction();
--------------------------------------------------------------------------------
/src/utils/ui/responsive.js:
--------------------------------------------------------------------------------
1 | const XXS_BREAKPOINT_MAX = 440;
2 |
3 | const isXXS = () => window.innerWidth < XXS_BREAKPOINT_MAX;
4 |
5 | export {
6 | isXXS
7 | }
--------------------------------------------------------------------------------
/src/utils/validateTradingPair.js:
--------------------------------------------------------------------------------
1 | export const validateTradingPair = (
2 | baseToken, quoteToken, tradingPairsList
3 | ) => !(!baseToken || !quoteToken || !tradingPairsList.find(tp => tp.base === baseToken && tp.quote === quoteToken));
--------------------------------------------------------------------------------
/src/utils/validateTradingPair.test.js:
--------------------------------------------------------------------------------
1 | /* global shallow describe it expect */
2 | /* eslint-disable import/first */
3 | import React from 'react';
4 | import { validateTradingPair } from './validateTradingPair';
5 | import { generateTradingPairs } from './generateTradingPairs';
6 | import { BASE_TOKENS, QUOTE_TOKENS } from '../constants';
7 |
8 | describe('(Util) validateTradingPair', () => {
9 | it('if provided correct token pair it should return true', () => {
10 | expect(validateTradingPair('MKR', 'W-ETH', generateTradingPairs(BASE_TOKENS, QUOTE_TOKENS))).toBe(true)
11 | });
12 |
13 | it('if provided wrong token pair it should return false', () => {
14 | expect(validateTradingPair('SAI', 'W-ETH', generateTradingPairs(BASE_TOKENS, QUOTE_TOKENS))).toBe(false)
15 | });
16 | });
17 |
--------------------------------------------------------------------------------
/src/version.ejs:
--------------------------------------------------------------------------------
1 | export default {
2 | name: '<%= package.name %>',
3 | env: '<%= extras.env %>',
4 | buildDate: new Date(<%= extras.timestamp %>),
5 | version: '<%= package.version %>',
6 | numCommits: <%= extras.gitNumCommits %>,
7 | hash: '<%= extras.githash %>',
8 | branch: '<%= extras.branch %>',
9 | dirty: <%= extras.dirty %>
10 | }
--------------------------------------------------------------------------------