Skip to content

Commit

Permalink
fix(Watch Only): when refreshing/loading spendable/unspendable return…
Browse files Browse the repository at this point in the history
… state so user doesnt freak out at 0
  • Loading branch information
plondon committed Jun 1, 2018
1 parent 7470522 commit 7c52986
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/blockchain-wallet-v4/src/redux/data/bch/reducers.js
Expand Up @@ -90,7 +90,7 @@ const bchReducer = (state = INITIAL_STATE, action) => {
return assoc('transaction_history', Remote.Failure(payload), state)
}
case AT.FETCH_BCH_SPENDABLE_BALANCE_LOADING: {
return assoc('spendable_balance', Remote.Loading, state)
return state
}
case AT.FETCH_BCH_SPENDABLE_BALANCE_SUCCESS: {
const { wallet } = payload
Expand All @@ -101,7 +101,7 @@ const bchReducer = (state = INITIAL_STATE, action) => {
return assoc('spendable_balance', Remote.Failure(payload), state)
}
case AT.FETCH_BCH_UNSPENDABLE_BALANCE_LOADING: {
return assoc('unspendable_balance', Remote.Loading, state)
return state
}
case AT.FETCH_BCH_UNSPENDABLE_BALANCE_SUCCESS: {
const { wallet } = payload
Expand Down
Expand Up @@ -102,7 +102,7 @@ const bitcoinReducer = (state = INITIAL_STATE, action) => {
return assoc('transaction_history', Remote.Failure(payload), state)
}
case AT.FETCH_BITCOIN_SPENDABLE_BALANCE_LOADING: {
return assoc('spendable_balance', Remote.Loading, state)
return state
}
case AT.FETCH_BITCOIN_SPENDABLE_BALANCE_SUCCESS: {
const { wallet } = payload
Expand All @@ -113,7 +113,7 @@ const bitcoinReducer = (state = INITIAL_STATE, action) => {
return assoc('spendable_balance', Remote.Failure(payload), state)
}
case AT.FETCH_BITCOIN_UNSPENDABLE_BALANCE_LOADING: {
return assoc('unspendable_balance', Remote.Loading, state)
return state
}
case AT.FETCH_BITCOIN_UNSPENDABLE_BALANCE_SUCCESS: {
const { wallet } = payload
Expand Down

0 comments on commit 7c52986

Please sign in to comment.