-
Notifications
You must be signed in to change notification settings - Fork 504
/
actions.js
29 lines (24 loc) · 2.96 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
import * as AT from './actionTypes'
// UNUSED ADDRESSES
export const deleteAddressLabel = (accountIndex, walletIndex, addressIndex) => ({ type: AT.DELETE_ADDRESS_LABEL, payload: { accountIndex, walletIndex, addressIndex } })
export const deleteAddressLabelError = (walletIndex, message) => ({ type: AT.DELETE_ADDRESS_LABEL_ERROR, payload: { walletIndex, message } })
export const deleteAddressLabelLoading = (walletIndex) => ({ type: AT.DELETE_ADDRESS_LABEL_LOADING, payload: { walletIndex } })
export const deleteAddressLabelSuccess = (walletIndex) => ({ type: AT.DELETE_ADDRESS_LABEL_SUCCESS, payload: { walletIndex } })
export const editAddressLabel = (accountIndex, walletIndex, addressIndex) => ({ type: AT.EDIT_ADDRESS_LABEL, payload: { accountIndex, walletIndex, addressIndex } })
export const editAddressLabelError = (walletIndex, message) => ({ type: AT.EDIT_ADDRESS_LABEL_ERROR, payload: { walletIndex, message } })
export const editAddressLabelLoading = (walletIndex) => ({ type: AT.EDIT_ADDRESS_LABEL_LOADING, payload: { walletIndex } })
export const editAddressLabelSuccess = (walletIndex) => ({ type: AT.EDIT_ADDRESS_LABEL_SUCCESS, payload: { walletIndex } })
export const generateNextReceiveAddress = (walletIndex) => ({ type: AT.GENERATE_NEXT_RECEIVE_ADDRESS, payload: { walletIndex } })
export const generateNextReceiveAddressError = (walletIndex, message) => ({ type: AT.GENERATE_NEXT_RECEIVE_ADDRESS_ERROR, payload: { walletIndex, message } })
export const generateNextReceiveAddressLoading = (walletIndex) => ({ type: AT.GENERATE_NEXT_RECEIVE_ADDRESS_LOADING, payload: { walletIndex } })
export const generateNextReceiveAddressSuccess = (walletIndex, newAddress) => ({ type: AT.GENERATE_NEXT_RECEIVE_ADDRESS_SUCCESS, payload: { walletIndex, newAddress } })
export const fetchUnusedAddresses = (walletIndex) => ({ type: AT.FETCH_UNUSED_ADDRESSES, payload: { walletIndex } })
export const fetchUnusedAddressesError = (walletIndex, message) => ({ type: AT.FETCH_UNUSED_ADDRESSES_ERROR, payload: { walletIndex, message } })
export const fetchUnusedAddressesLoading = (walletIndex) => ({ type: AT.FETCH_UNUSED_ADDRESSES_LOADING, payload: { walletIndex } })
export const fetchUnusedAddressesSuccess = (walletIndex, unusedAddresses) => ({ type: AT.FETCH_UNUSED_ADDRESSES_SUCCESS, payload: { walletIndex, unusedAddresses } })
// USED ADDRESSES
export const toggleUsedAddresses = (walletIndex, visible) => ({ type: AT.TOGGLE_USED_ADDRESSES, payload: { walletIndex, visible } })
export const fetchUsedAddresses = (walletIndex) => ({ type: AT.FETCH_USED_ADDRESSES, payload: { walletIndex } })
export const fetchUsedAddressesError = (walletIndex, message) => ({ type: AT.FETCH_USED_ADDRESSES_ERROR, payload: { walletIndex, message } })
export const fetchUsedAddressesLoading = (walletIndex) => ({ type: AT.FETCH_USED_ADDRESSES_LOADING, payload: { walletIndex } })
export const fetchUsedAddressesSuccess = (walletIndex, usedAddresses) => ({ type: AT.FETCH_USED_ADDRESSES_SUCCESS, payload: { walletIndex, usedAddresses } })