mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-21 12:49:11 +00:00
Merge pull request #46 from status-im/bug_fix/refresh-on-tx
Add flag to not refresh the page on certain request
This commit is contained in:
commit
c0fdbd96d7
@ -113,7 +113,7 @@ export const contractFile = {
|
||||
|
||||
export const CONTRACT_FUNCTION = createRequestTypes('CONTRACT_FUNCTION');
|
||||
export const contractFunction = {
|
||||
post: (contractName, method, inputs, gasPrice) => action(CONTRACT_FUNCTION[REQUEST], {contractName, method, inputs, gasPrice}),
|
||||
post: (contractName, method, inputs, gasPrice) => action(CONTRACT_FUNCTION[REQUEST], {contractName, method, inputs, gasPrice, noLoading: true}),
|
||||
success: (result, payload) => action(CONTRACT_FUNCTION[SUCCESS], {contractFunctions: [{...result, ...payload}]}),
|
||||
failure: (error) => action(CONTRACT_FUNCTION[FAILURE], {error})
|
||||
};
|
||||
|
@ -134,7 +134,7 @@ function errorEntities(state = {}, action) {
|
||||
}
|
||||
|
||||
function loading(_state = false, action) {
|
||||
return action.type.endsWith(REQUEST);
|
||||
return action.type.endsWith(REQUEST) && !action.noLoading;
|
||||
}
|
||||
|
||||
const rootReducer = combineReducers({
|
||||
|
@ -172,8 +172,8 @@ export function *initBlockHeader() {
|
||||
const channel = yield call(createChannel, socket);
|
||||
while (true) {
|
||||
yield take(channel);
|
||||
yield put({type: actions.BLOCKS[actions.REQUEST]});
|
||||
yield put({type: actions.TRANSACTIONS[actions.REQUEST]});
|
||||
yield put({type: actions.BLOCKS[actions.REQUEST], noLoading: true});
|
||||
yield put({type: actions.TRANSACTIONS[actions.REQUEST], noLoading: true});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user