mirror of https://github.com/embarklabs/embark.git
add noLoading flag in action to not show loader
This commit is contained in:
parent
7fa186b636
commit
7a4f1180cf
|
@ -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})
|
||||
};
|
||||
|
|
|
@ -133,7 +133,7 @@ function errorEntities(state = {}, action) {
|
|||
}
|
||||
|
||||
function loading(_state = false, action) {
|
||||
return action.type.endsWith(REQUEST);
|
||||
return action.type.endsWith(REQUEST) && !action.noLoading;
|
||||
}
|
||||
|
||||
function compilingContract(state = false, action) {
|
||||
|
|
|
@ -186,8 +186,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…
Reference in New Issue