Skip to content

Commit

Permalink
remove bsv from frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
schnogz committed May 9, 2019
1 parent 30f6abf commit 16a1eb5
Show file tree
Hide file tree
Showing 83 changed files with 4 additions and 3,228 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@ export const getBchBalance = createDeepEqualSelector(
}
)

export const getBsvBalance = createDeepEqualSelector(
[
selectors.core.kvStore.bsv.getSpendableContext,
selectors.core.data.bsv.getAddresses
],
(context, addressesR) => {
const contextToBalances = (context, balances) =>
context.map(a => pathOr(0, [a, 'final_balance'], balances))
const balancesR = lift(contextToBalances)(Remote.of(context), addressesR)
return balancesR.map(reduce(add, 0))
}
)

export const getEthBalance = createDeepEqualSelector(
[selectors.core.kvStore.eth.getContext, selectors.core.data.eth.getAddresses],
(context, addressesR) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const mapStateToProps = (state, ownProps) => ({
const mapDispatchToProps = dispatch => ({
bchActions: bindActionCreators(actions.core.data.bch, dispatch),
btcActions: bindActionCreators(actions.core.data.btc, dispatch),
bsvActions: bindActionCreators(actions.core.data.bsv, dispatch),
ethActions: bindActionCreators(actions.core.data.eth, dispatch),
xlmActions: bindActionCreators(actions.core.data.xlm, dispatch)
})
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { map, prop, reject, values } from 'ramda'

import { selectors } from 'data'

// TODO: better way to exclude BSV via model
export const getCoins = (state, { type }) => {
const supportedCoins = selectors.core.walletOptions
.getSupportedCoins(state)
Expand All @@ -11,7 +10,7 @@ export const getCoins = (state, { type }) => {
return values(
map(
x => ({ text: x.displayName, value: x.coinCode }),
reject(c => c.coinCode === 'BSV' || !c.invited, supportedCoins)
reject(c => !c.invited, supportedCoins)
)
)
.filter(({ value }) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import SelectBoxBankAccountType from './SelectBoxBankAccountType'
import SelectBox from './SelectBox'
import SelectBoxBtcAddresses from './SelectBoxBtcAddresses'
import SelectBoxBchAddresses from './SelectBoxBchAddresses'
import SelectBoxBsvAddresses from './SelectBoxBsvAddresses'
import SelectBoxEthAddresses from './SelectBoxEthAddresses'
import SelectBoxXlmAddresses from './SelectBoxXlmAddresses'
import SelectBoxCoin from './SelectBoxCoin'
Expand Down Expand Up @@ -72,7 +71,6 @@ export {
SelectBox,
SelectBoxBtcAddresses,
SelectBoxBchAddresses,
SelectBoxBsvAddresses,
SelectBoxEthAddresses,
SelectBoxXlmAddresses,
SelectBoxCoin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import * as C from 'services/AlertService'
import { Exchange, utils } from 'blockchain-wallet-v4/src'

const { FORM: BTC_FORM } = model.components.sendBtc
const { FORM: BSV_FORM } = model.components.sendBsv
const { FORM: BCH_FORM } = model.components.sendBch
const { FORM: ETH_FORM } = model.components.sendEth
const { FORM: XLM_FORM } = model.components.sendXlm
Expand Down Expand Up @@ -116,33 +115,6 @@ class QRCodeCaptureContainer extends React.PureComponent {
}
}

handleScanBsvAddress (data) {
try {
const { address, options } = bip21.decode(data, 'bitcoincash')
const { amount, message } = options
this.props.formActions.change(BSV_FORM, 'to', address)
this.props.formActions.change(BSV_FORM, 'amount', amount)
this.props.formActions.change(BSV_FORM, 'description', message)
this.setState({ bchAddressToggled: false })
} catch (e) {
try {
if (utils.bch.isCashAddr(data)) {
this.props.formActions.change(BSV_FORM, 'to', data)
return
}
// try legacy addr
if (utils.btc.isValidBtcAddress(data, this.props.network)) {
this.props.formActions.change(BSV_FORM, 'to', data)
return
}
// throw error
throw Error('invalid_bch_addr')
} catch (e) {
this.props.alertActions.displayError(C.BCH_ADDRESS_INVALID)
}
}
}

handleScanEthAddress (data) {
if (utils.eth.isValidAddress(data)) {
this.props.formActions.change(ETH_FORM, 'to', this.createNewValue(data))
Expand Down Expand Up @@ -265,7 +237,6 @@ QRCodeCaptureContainer.defaultProps = {
'btcAddress',
'ethAddress',
'bchAddress',
'bsvAddress',
'xlmAddress',
'btcPriv',
'btcPrivOrAddress'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,6 @@ class Tooltips extends React.PureComponent {
defaultMessage='Add a note to remind yourself what this transaction relates to. This note will be private and only seen by you.'
/>
</Tooltip>
<Tooltip id='sendBsv.firststep.share_tooltip'>
<FormattedMessage
id='modals.sendBsv.firststep.share_tooltip'
defaultMessage='Add a note to remind yourself what this transaction relates to. This note will be private and only seen by you.'
/>
</Tooltip>
<Tooltip id='sendxlm.addr' maxWidth='initial' />
<Tooltip id='signmessage.label.tooltip'>
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@ exports[`ListItemContainer renders correctly 1`] = `
"setTxNotesBch": [Function],
}
}
bsvActions={
Object {
"createMetadataBsv": [Function],
"fetchMetadataBsv": [Function],
"fetchMetadataBsvFailure": [Function],
"fetchMetadataBsvLoading": [Function],
"fetchMetadataBsvSuccess": [Function],
"setAccountArchived": [Function],
"setHasSeen": [Function],
"setTxNotesBsv": [Function],
}
}
erc20List={Object {}}
ethActions={
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ class ListItemContainer extends React.PureComponent {
this.props.bchActions.setTxNotesBch(transaction.hash, value)
break
}
case coin === 'BSV': {
this.props.bsvActions.setTxNotesBsv(transaction.hash, value)
break
}
case coin === 'XLM': {
this.props.xlmActions.setTxNotesXlm(transaction.hash, value)
break
Expand Down Expand Up @@ -83,7 +79,6 @@ const mapStateToProps = state => ({
const mapDispatchToProps = dispatch => ({
analyticsActions: bindActionCreators(actions.analytics, dispatch),
bchActions: bindActionCreators(actions.core.kvStore.bch, dispatch),
bsvActions: bindActionCreators(actions.core.kvStore.bsv, dispatch),
ethActions: bindActionCreators(actions.core.kvStore.eth, dispatch),
logActions: bindActionCreators(actions.logs, dispatch),
preferencesActions: bindActionCreators(actions.preferences, dispatch),
Expand Down
2 changes: 0 additions & 2 deletions packages/blockchain-wallet-v4-frontend/src/data/auth/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export default ({ api, coreSagas }) => {
yield put(actions.goals.saveGoal('airdropClaim'))
yield put(actions.goals.saveGoal('kycDocResubmit'))
yield put(actions.goals.saveGoal('pax'))
yield put(actions.goals.saveGoal('bsv'))
}

const startSockets = function * () {
Expand Down Expand Up @@ -129,7 +128,6 @@ export default ({ api, coreSagas }) => {
askSecondPasswordEnhancer
)
yield call(coreSagas.kvStore.bch.fetchMetadataBch)
yield call(coreSagas.kvStore.bsv.fetchMetadataBsv)
yield call(coreSagas.kvStore.lockbox.fetchMetadataLockbox)
yield put(actions.router.push('/home'))
yield call(coreSagas.settings.fetchSettings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,6 @@ describe('authSagas', () => {
saga.next().call(coreSagas.kvStore.bch.fetchMetadataBch)
})

it('should fetch bsv metadata', () => {
saga.next().call(coreSagas.kvStore.bsv.fetchMetadataBsv)
})

it('should fetch lockbox metadata', () => {
saga.next().call(coreSagas.kvStore.lockbox.fetchMetadataLockbox)
})
Expand Down

0 comments on commit 16a1eb5

Please sign in to comment.