Skip to content

Commit

Permalink
fix - tests/lint fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-blockchain committed Jul 16, 2018
1 parent 1562256 commit b80c074
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jest.mock('react-intl-tel-input', () => jest.fn())

describe('PhoneNumberBox', () => {
it('renders correctly', () => {
const component = shallow(<PhoneNumberBox countryCode={Remote.of('US')} />)
const component = shallow(<PhoneNumberBox countryCode={Remote.of('US')} meta={{}} />)
const tree = toJson(component)
expect(tree).toMatchSnapshot()
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { pipe, map,find, propEq, prop } from 'ramda'
import { pipe, map, find, propEq, prop } from 'ramda'
import React from 'react'
import { shallow } from 'enzyme'
import SelectBoxRegion from './index.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Remote } from 'blockchain-wallet-v4/src'
import { assoc } from 'ramda'
import { STEPS, PERSONAL_STEPS, EMAIL_STEPS, SMS_STEPS } from './model'
import { STEPS } from './model'
import * as AT from './actionTypes'

const INITIAL_STATE = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('Contact details form', () => {
it('should not require postcode for countries without postcode', () => {

})
})
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { required, validEmail } from 'services/FormHelper'
import { spacing } from 'services/StyleService'
import media from 'services/ResponsiveService'
import { Text, Button } from 'blockchain-info-components'
import { Form, ColLeft, ColRight, InputWrapper, PartnerHeader, PartnerSubHeader,
import { ColLeft, ColRight, InputWrapper, PartnerHeader, PartnerSubHeader,
ButtonWrapper, ColRightInner, EmailHelper } from 'components/IdentityVerification'
import { TextBox } from 'components/Form'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { PERSONAL_FORM } from 'data/components/identityVerification/model'
import media from 'services/ResponsiveService'
import { spacing } from 'services/StyleService'
import { MediaContextConsumer } from 'providers/MatchMediaProvider'
import { Link, Icon, Button, Text, TextInput } from 'blockchain-info-components'
import { Link, Icon, Button, Text } from 'blockchain-info-components'
import { FormGroup, FormItem, TextBox, PhoneNumberBox } from 'components/Form'
import { Form, ColLeft, ColRight, InputWrapper, HeartbeatLoader, FieldMimic,
import { Form, ColLeft, ColRight, InputWrapper, HeartbeatLoader,
PartnerHeader, PartnerSubHeader, ColRightInner } from 'components/IdentityVerification'
import renderFaq from 'components/FaqDropdown'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ const faqQuestions = [
}
]

const selectBankFaqHelper = () => selectBankQuestions.map((el, i) => <Helper key={i} question={el.question} answer={el.answer} />)

const BankLink = (props) => {
const {
plaidUrl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ const faqQuestions = [
}
]

const faqHelper = () => renderFaq(faqQuestions)

class VerifyContainer extends Component {
constructor (props) {
super(props)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { OrderDetailsTable, OrderDetailsRow } from 'components/BuySell/OrderDeta
import { BorderBox, Row, PartnerHeader, PartnerSubHeader } from 'components/IdentityVerification'
import { StepTransition } from 'components/Utilities/Stepper'
import ReviewForm from './ReviewForm'
import { update } from 'ramda'

const ExchangeRateWrapper = styled.div`
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,23 @@ export const findMatch = (settings, options) => {

// settings, options, buySell, type ('Buy' || 'Sell') => 'partner' || false
export const canTrade = (settings, options, buySell, type) => {
return 'sfox'
// // if user has an account return 'partner'
// const account = hasAccount(buySell.value)
// if (account) return account

// // if location does not match any partner return false
// const match = findMatch(settings, options)
// if (!match) return false

// // check if user is invited to location match => 'partner'
// const { invited } = settings

// // v2 -> v3 upgrades do not have invited object
// if (!invited) return false

// switch (match) {
// case 'sfox': return (type ? invited['sfox' + type] : (invited.sfoxBuy || invited.sfoxSell)) && 'sfox'
// case 'coinify': return (type ? invited['coinify' + type] : (invited.coinifyBuy || invited.coinifySell)) && 'coinify'
// default: return false
// }
// if user has an account return 'partner'
const account = hasAccount(buySell.value)
if (account) return account

// if location does not match any partner return false
const match = findMatch(settings, options)
if (!match) return false

// check if user is invited to location match => 'partner'
const { invited } = settings

// v2 -> v3 upgrades do not have invited object
if (!invited) return false

switch (match) {
case 'sfox': return (type ? invited['sfox' + type] : (invited.sfoxBuy || invited.sfoxSell)) && 'sfox'
case 'coinify': return (type ? invited['coinify' + type] : (invited.coinifyBuy || invited.coinifySell)) && 'coinify'
default: return false
}
}

0 comments on commit b80c074

Please sign in to comment.