|
|
|
@ -3,7 +3,7 @@ import { Action } from '@ngrx/store';
|
|
|
|
|
|
|
|
|
|
import { GetInfoCL } from '../shared/models/clModels';
|
|
|
|
|
|
|
|
|
|
import { RTLConfiguration, Settings, LightningNode } from '../shared/models/RTLconfig';
|
|
|
|
|
import { RTLConfiguration, Settings, LightningNode, GetInfoRoot, SelNodeChild } from '../shared/models/RTLconfig';
|
|
|
|
|
import { ErrorPayload } from '../shared/models/errorPayload';
|
|
|
|
|
import {
|
|
|
|
|
GetInfo, Peer, Balance, NetworkInfo, Fees, Channel, Invoice, ListInvoices, Payment, GraphNode, AddressType,
|
|
|
|
@ -11,14 +11,8 @@ import {
|
|
|
|
|
} from '../shared/models/lndModels';
|
|
|
|
|
|
|
|
|
|
export const RESET_ROOT_STORE = 'RESET_ROOT_STORE';
|
|
|
|
|
export const RESET_LND_STORE = 'RESET_LND_STORE';
|
|
|
|
|
export const RESET_CL_STORE = 'RESET_CL_STORE';
|
|
|
|
|
export const CLEAR_EFFECT_ERROR_ROOT = 'CLEAR_EFFECT_ERROR_ROOT';
|
|
|
|
|
export const EFFECT_ERROR_ROOT = 'EFFECT_ERROR_ROOT';
|
|
|
|
|
export const CLEAR_EFFECT_ERROR_LND = 'CLEAR_EFFECT_ERROR_LND';
|
|
|
|
|
export const EFFECT_ERROR_LND = 'EFFECT_ERROR_LND';
|
|
|
|
|
export const CLEAR_EFFECT_ERROR_CL = 'CLEAR_EFFECT_ERROR_CL';
|
|
|
|
|
export const EFFECT_ERROR_CL = 'EFFECT_ERROR_CL';
|
|
|
|
|
export const OPEN_SPINNER = 'OPEN_SPINNER';
|
|
|
|
|
export const CLOSE_SPINNER = 'CLOSE_SPINNER';
|
|
|
|
|
export const OPEN_ALERT = 'OPEN_ALERT';
|
|
|
|
@ -31,8 +25,14 @@ export const FETCH_RTL_CONFIG = 'FETCH_RTL_CONFIG';
|
|
|
|
|
export const SET_RTL_CONFIG = 'SET_RTL_CONFIG';
|
|
|
|
|
export const SAVE_SETTINGS = 'SAVE_SETTINGS';
|
|
|
|
|
export const SET_SELECTED_NODE = 'SET_SELECTED_NODE';
|
|
|
|
|
export const FETCH_LND_INFO = 'FETCH_LND_INFO';
|
|
|
|
|
export const SET_LND_INFO = 'SET_LND_INFO';
|
|
|
|
|
export const SET_NODE_DATA = 'SET_NODE_DATA';
|
|
|
|
|
export const SET_NODE_PENDING_CHANNELS_DATA = 'SET_NODE_PENDING_CHANNELS_DATA';
|
|
|
|
|
|
|
|
|
|
export const RESET_LND_STORE = 'RESET_LND_STORE';
|
|
|
|
|
export const CLEAR_EFFECT_ERROR_LND = 'CLEAR_EFFECT_ERROR_LND';
|
|
|
|
|
export const EFFECT_ERROR_LND = 'EFFECT_ERROR_LND';
|
|
|
|
|
export const FETCH_INFO = 'FETCH_INFO';
|
|
|
|
|
export const SET_INFO = 'SET_INFO';
|
|
|
|
|
export const FETCH_PEERS = 'FETCH_PEERS';
|
|
|
|
|
export const SET_PEERS = 'SET_PEERS';
|
|
|
|
|
export const SAVE_NEW_PEER = 'SAVE_NEW_PEER';
|
|
|
|
@ -99,6 +99,9 @@ export const FETCH_CL_INFO = 'FETCH_CL_INFO';
|
|
|
|
|
export const SET_CL_INFO = 'SET_CL_INFO';
|
|
|
|
|
export const FETCH_CL_FEES = 'FETCH_CL_FEES';
|
|
|
|
|
export const SET_CL_FEES = 'SET_CL_FEES';
|
|
|
|
|
export const RESET_CL_STORE = 'RESET_CL_STORE';
|
|
|
|
|
export const CLEAR_EFFECT_ERROR_CL = 'CLEAR_EFFECT_ERROR_CL';
|
|
|
|
|
export const EFFECT_ERROR_CL = 'EFFECT_ERROR_CL';
|
|
|
|
|
|
|
|
|
|
export class ClearEffectErrorRoot implements Action {
|
|
|
|
|
readonly type = CLEAR_EFFECT_ERROR_ROOT;
|
|
|
|
@ -165,10 +168,12 @@ export class ResetRootStore implements Action {
|
|
|
|
|
|
|
|
|
|
export class ResetLNDStore implements Action {
|
|
|
|
|
readonly type = RESET_LND_STORE;
|
|
|
|
|
constructor(public payload: SelNodeChild) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class ResetCLStore implements Action {
|
|
|
|
|
readonly type = RESET_CL_STORE;
|
|
|
|
|
constructor(public payload: SelNodeChild) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class FetchRTLConfig implements Action {
|
|
|
|
@ -190,12 +195,22 @@ export class SetSelelectedNode implements Action {
|
|
|
|
|
constructor(public payload: LightningNode) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class FetchLndInfo implements Action {
|
|
|
|
|
readonly type = FETCH_LND_INFO;
|
|
|
|
|
export class SetNodeData implements Action {
|
|
|
|
|
readonly type = SET_NODE_DATA;
|
|
|
|
|
constructor(public payload: GetInfoRoot) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class SetNodePendingChannelsData implements Action {
|
|
|
|
|
readonly type = SET_NODE_PENDING_CHANNELS_DATA;
|
|
|
|
|
constructor(public payload: number) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class FetchInfo implements Action {
|
|
|
|
|
readonly type = FETCH_INFO;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class SetLndInfo implements Action {
|
|
|
|
|
readonly type = SET_LND_INFO;
|
|
|
|
|
export class SetInfo implements Action {
|
|
|
|
|
readonly type = SET_INFO;
|
|
|
|
|
constructor(public payload: GetInfo) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -283,7 +298,7 @@ export class UpdateChannels implements Action {
|
|
|
|
|
|
|
|
|
|
export class SetPendingChannels implements Action {
|
|
|
|
|
readonly type = SET_PENDING_CHANNELS;
|
|
|
|
|
constructor(public payload: PendingChannels) {}
|
|
|
|
|
constructor(public payload: {channels: PendingChannels, pendingChannels: number}) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class SetClosedChannels implements Action {
|
|
|
|
@ -521,7 +536,7 @@ export type RTLActions =
|
|
|
|
|
OpenSpinner | CloseSpinner | FetchRTLConfig | SetRTLConfig | SaveSettings |
|
|
|
|
|
OpenAlert | CloseAlert | OpenConfirmation | CloseConfirmation |
|
|
|
|
|
ResetRootStore | ResetLNDStore | ResetCLStore |
|
|
|
|
|
SetSelelectedNode | FetchLndInfo | SetLndInfo |
|
|
|
|
|
SetSelelectedNode | SetNodeData | SetNodePendingChannelsData | FetchInfo | SetInfo |
|
|
|
|
|
FetchPeers | SetPeers | AddPeer | DetachPeer | SaveNewPeer | RemovePeer |
|
|
|
|
|
AddInvoice | SaveNewInvoice | GetForwardingHistory | SetForwardingHistory |
|
|
|
|
|
FetchFees | SetFees |
|
|
|
|
|