Skip to content

Commit

Permalink
fix(Refresh): some websocket fixes, and merge conflict fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed Jun 23, 2018
1 parent a1633bc commit cecab6a
Show file tree
Hide file tree
Showing 18 changed files with 5 additions and 303 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { takeEvery, takeLatest } from 'redux-saga/effects'
import { takeLatest } from 'redux-saga/effects'
import * as requestAT from './actionTypes'
import * as AT from '../../actionTypes'
import sagas from './sagas'

export default () => {
const requestBtcSagas = sagas()

return function * () {
yield takeLatest(requestAT.REQUEST_BTC_FIRST_STEP_SUBMIT_CLICKED, requestBtcSagas.firstStepSubmitClicked)
yield takeEvery(AT.core.webSocket.bitcoin.PAYMENT_RECEIVED, requestBtcSagas.btcPaymentReceived)
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import priceChart from './priceChart/sagaRegister'
import priceTicker from './priceTicker/sagaRegister'
import refresh from './refresh/sagaRegister'
import requestBtc from './requestBtc/sagaRegister'
import requestEth from './requestEth/sagaRegister'
import sendBch from './sendBch/sagaRegister'
import sendBtc from './sendBtc/sagaRegister'
import sendEth from './sendEth/sagaRegister'
Expand All @@ -32,7 +31,6 @@ export default ({ api, coreSagas }) => function * () {
yield fork(priceTicker({ coreSagas }))
yield fork(refresh())
yield fork(requestBtc())
yield fork(requestEth())
yield fork(sendBch({ api, coreSagas }))
yield fork(sendBtc({ api, coreSagas }))
yield fork(sendEth({ api, coreSagas }))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import priceChart from './priceChart/sagas'
import priceTicker from './priceTicker/sagas'
import refresh from './refresh/sagas'
import requestBtc from './requestBtc/sagas'
import requestEth from './requestEth/sagas'
import sendBch from './sendBch/sagas'
import sendBtc from './sendBtc/sagas'
import sendEth from './sendEth/sagas'
Expand All @@ -31,7 +30,6 @@ export default ({ api, coreSagas }) => ({
priceTicker: priceTicker({ coreSagas }),
refresh: refresh(),
requestBtc: requestBtc(),
requestEth: requestEth(),
sendBch: sendBch({ api, coreSagas }),
sendBtc: sendBtc({ api, coreSagas }),
sendEth: sendEth({ api, coreSagas }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export default ({ api, bchSocket }) => {
case 'utx':
// Find out if the transaction is sent/received to show a notification
const context = yield select(selectors.core.wallet.getContext)
const data = yield call(api.fetchBlockchainData, context, { n: 50, offset: 0 })
const data = yield call(api.fetchBchData, context, { n: 50, offset: 0 })
const transactions = data.txs || []
for (let i in transactions) {
const transaction = transactions[i]
if (equals(transaction.hash, message.x.hash)) {
if (transaction.result > 0) {
yield put(actions.alerts.displaySuccess(T.PAYMENT_RECEIVED_BTC))
yield put(actions.alerts.displaySuccess(T.PAYMENT_RECEIVED_BCH))
}
break
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as T from 'services/AlertService'
import { Wrapper } from 'blockchain-wallet-v4/src/types'
import { Socket } from 'blockchain-wallet-v4/src/network'

// TO REVIEW
export default ({ api, btcSocket }) => {
const send = btcSocket.send.bind(btcSocket)

Expand Down Expand Up @@ -52,7 +51,7 @@ export default ({ api, btcSocket }) => {
}
}
// Refresh data
yield put(actions.core.data.bch.fetchData())
yield put(actions.core.data.bitcoin.fetchData())
// If we are on the transaction page, fetch transactions related to the selected account
const pathname = yield select(selectors.router.getPathname)
if (equals(pathname, '/btc/transactions')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import * as actions from '../../../actions'
import * as actionTypes from '../../../actionTypes'
import * as selectors from '../../../selectors'
import * as T from 'services/AlertService'
import { equals, prop } from 'ramda'
import { equals } from 'ramda'
const ACCOUNT_SUB = 'account_sub'
const BLOCK_SUB = 'block_sub'

// TO REVIEW
export default ({ api, ethSocket }) => {
const send = ethSocket.send.bind(ethSocket)

Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions packages/blockchain-wallet-v4/src/redux/webSocket/bch/actions.js

This file was deleted.

55 changes: 0 additions & 55 deletions packages/blockchain-wallet-v4/src/redux/webSocket/bch/sagas.js

This file was deleted.

This file was deleted.

88 changes: 0 additions & 88 deletions packages/blockchain-wallet-v4/src/redux/webSocket/bitcoin/sagas.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit cecab6a

Please sign in to comment.