forked from hyperledger-labs/blockchain-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.js
73 lines (61 loc) · 1.35 KB
/
actions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* SPDX-License-Identifier: Apache-2.0
*/
import types from './types';
const getBlockListSearch = blockList => ({
type: types.BLOCK_LIST_SEARCH,
payload: blockList,
});
const getLoaded = loaded => ({
type: types.BLOCK_RANGE_LOADED,
payload: loaded
});
const getChaincodeList = chaincodeList => ({
type: types.CHAINCODE_LIST,
payload: chaincodeList,
});
const getChannels = channels => ({
type: types.CHANNELS,
payload: channels,
});
const getPeerList = peerList => ({
type: types.PEER_LIST,
payload: peerList,
});
const getBlockRangeSearch = resp => ({
type: types.BLOCK_RANGE_SEARCH,
payload: resp.data
});
const getTxnList = resp => ({
type: types.TXN_LIST,
payload: resp.data,
});
const getBlockSearch = resp => ({
type: types.BLOCK_SEARCH,
payload: resp.data,
});
const getTransaction = transaction => ({
type: types.TRANSACTION,
payload: transaction,
});
const getTransactionList = transactionList => ({
type: types.TRANSACTION_LIST,
payload: transactionList,
});
const getTransactionListSearch = transactionList => ({
type: types.TRANSACTION_LIST_SEARCH,
payload: transactionList,
});
export default {
getChaincodeList,
getChannels,
getPeerList,
getBlockRangeSearch,
getTxnList,
getBlockSearch,
getTransaction,
getTransactionList,
getBlockListSearch,
getLoaded,
getTransactionListSearch,
};