Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit c488fc4

Browse files
authored
Merge pull request #1763 from blockchain/fix/explicit-check-before-link
fix(Link): check if user is linked before fetching pit accounts
2 parents 0d222db + 454d49c commit c488fc4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • packages/blockchain-wallet-v4-frontend/src/data/components/send

packages/blockchain-wallet-v4-frontend/src/data/components/send/sagas.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { put, call } from 'redux-saga/effects'
2-
import { actions } from 'data'
1+
import { call, put, select } from 'redux-saga/effects'
2+
import { actions, selectors } from 'data'
33
import * as A from './actions.js'
44

55
export default ({ api }) => {
@@ -8,6 +8,10 @@ export default ({ api }) => {
88
const fetchPaymentsAccountPit = function * (action) {
99
const { currency } = action.payload
1010
try {
11+
const isPitAccountLinked = (yield select(
12+
selectors.modules.profile.isPitAccountLinked
13+
)).getOrElse(false)
14+
if (!isPitAccountLinked) throw new Error('Wallet is not linked to PIT')
1115
yield put(A.fetchPaymentsAccountPitLoading(currency))
1216
const data = yield call(api.getPaymentsAccountPit, currency)
1317
yield put(A.fetchPaymentsAccountPitSuccess(currency, data))

0 commit comments

Comments
 (0)