Skip to content

Commit

Permalink
feat(eth-interest): move sourcetype check one level higher
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB committed Jun 26, 2020
1 parent 6475dfe commit 92993cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
SBOrderType
} from 'core/types'
import DataError from 'components/DataError'
import InterestTransactions from './template.interest'
import Loading from './template.loading'
import React, { PureComponent } from 'react'
import SimpleBuyListItem from './template.simplebuy'
Expand All @@ -28,9 +27,7 @@ const TransactionsWrapper = styled.div`

class TransactionList extends PureComponent<Props> {
render () {
const { coin, coinTicker, currency, data, sourceType } = this.props

if (sourceType && sourceType === 'INTEREST') return <InterestTransactions />
const { coin, coinTicker, currency, data } = this.props

return data.cata({
Success: (transactions: Array<SBOrderType | ProcessedTxType>) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import LazyLoadContainer from 'components/LazyLoadContainer'
import media from 'services/ResponsiveService'
import React from 'react'
import styled from 'styled-components'

import InterestTransactions from './TransactionList/template.interest'
import TransactionFilters from './TransactionFilters'
import TransactionList from './TransactionList'
import WalletBalanceDropdown from './WalletBalanceDropdown'
Expand Down Expand Up @@ -138,6 +140,8 @@ class TransactionsContainer extends React.PureComponent<Props> {
<CoinIntroduction coin={coin} />
</SceneWrapper>
)
) : sourceType && sourceType === 'INTEREST' ? (
<InterestTransactions />
) : (
pages.map((value, index) => (
<TransactionList
Expand Down

0 comments on commit 92993cf

Please sign in to comment.