You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/angular/main.js

3206 lines
246 KiB
JavaScript

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{
/***/ "./src/$$_lazy_route_resource lazy recursive":
/*!**********************************************************!*\
!*** ./src/$$_lazy_route_resource lazy namespace object ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
function webpackEmptyAsyncContext(req) {
// Here Promise.resolve().then() is used instead of new Promise() to prevent
// uncaught exception popping up in devtools
return Promise.resolve().then(function() {
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
});
}
webpackEmptyAsyncContext.keys = function() { return []; };
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
module.exports = webpackEmptyAsyncContext;
webpackEmptyAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive";
/***/ }),
/***/ "./src/app/app.component.html":
/*!************************************!*\
!*** ./src/app/app.component.html ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\" id=\"rtl-container\" class=\"rtl-container\" [ngClass]=\"settings.theme\" [class.compact]=\"settings.menuType === 'Compact'\" [class.mini]=\"settings.menuType === 'Mini'\">\r\n <mat-sidenav-container>\r\n <mat-sidenav *ngIf=\"settings.menu === 'Vertical'\" [opened]=\"settings.flgSidenavOpened\" [mode]=\"(settings.flgSidenavPinned) ? 'side' : 'over'\"\r\n #sideNavigation class=\"sidenav mat-elevation-z6\">\r\n <rtl-side-navigation></rtl-side-navigation>\r\n </mat-sidenav>\r\n <mat-sidenav-content perfectScrollbar class=\"overflow-auto\">\r\n <mat-toolbar fxLayout=\"row\" fxLayoutAlign=\"space-between center\" color=\"primary\" class=\"padding-gap-x w-100\">\r\n <div fxLayoutAlign=\"center center\">\r\n <button *ngIf=\"settings.menu === 'Vertical'\" mat-icon-button (click)=\"sideNavToggle(sideNavigation)\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n </div>\r\n <div>\r\n <h2>Ride The Lightning <span class=\"font-60-percent\">(Alpha)</span></h2>\r\n </div>\r\n <div>\r\n <rtl-top-menu></rtl-top-menu>\r\n </div>\r\n </mat-toolbar>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" class=\"test-banner\">\r\n <h5>Warning: Untested Software. Not recommended for Mainnet!</h5>\r\n </div>\r\n <mat-toolbar color=\"primary\" *ngIf=\"settings.menu === 'Horizontal'\" class=\"padding-gap-x\">\r\n <div fxLayout=\"row\" fxFlex=\"100\" fxLayoutAlign=\"center center\" class=\"h-100\">\r\n <rtl-horizontal-navigation></rtl-horizontal-navigation>\r\n </div>\r\n </mat-toolbar>\r\n <div class=\"inner-sidenav-content\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" class=\"bg-primary settings-icon\" (click)=\"settingSidenav.toggle()\">\r\n <mat-icon class=\"animate-settings\">settings</mat-icon>\r\n </div>\r\n </mat-sidenav-content>\r\n <mat-sidenav #settingSidenav position=\"end\" class=\"settings mat-elevation-z6\" mode=\"side\">\r\n <rtl-settings-nav (done)=\"settingSidenav.toggle()\"></rtl-settings-nav>\r\n </mat-sidenav> \r\n </mat-sidenav-container>\r\n <div class=\"rtl-spinner\" *ngIf=\"undefined === settings.theme\">\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n <h4>Loading RTL...</h4>\r\n </div>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/app.component.scss":
/*!************************************!*\
!*** ./src/app/app.component.scss ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2FwcC5jb21wb25lbnQuc2NzcyJ9 */"
/***/ }),
/***/ "./src/app/app.component.ts":
/*!**********************************!*\
!*** ./src/app/app.component.ts ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var rtl_service_1 = __webpack_require__(/*! ./shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ./shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var AppComponent = /** @class */ (function () {
function AppComponent(rtlService, logger) {
this.rtlService = rtlService;
this.logger = logger;
this.unsubscribe = new rxjs_1.Subject();
this.rtlService.fetchUISettings();
this.settings = this.rtlService.getUISettings();
if (window.innerWidth <= 768) {
this.settings.menu = 'Vertical';
this.settings.flgSidenavOpened = false;
this.settings.flgSidenavPinned = false;
}
}
AppComponent.prototype.ngOnInit = function () {
var _this = this;
this.rtlService.UIsettingsUpdated
.pipe(operators_1.takeUntil(this.unsubscribe))
.subscribe(function (settings) {
_this.settings = settings;
if (window.innerWidth <= 768) {
_this.settings.menu = 'Vertical';
_this.settings.flgSidenavOpened = false;
_this.settings.flgSidenavPinned = false;
}
_this.logger.info(_this.settings);
});
};
AppComponent.prototype.ngAfterViewInit = function () {
if (!this.settings.flgSidenavPinned) {
this.sideNavigation.close();
}
if (window.innerWidth <= 768) {
this.sideNavigation.close();
}
};
AppComponent.prototype.onWindowResize = function () {
if (window.innerWidth <= 768) {
this.settings.menu = 'Vertical';
this.settings.flgSidenavOpened = false;
this.settings.flgSidenavPinned = false;
}
};
AppComponent.prototype.sideNavToggle = function () {
this.sideNavigation.toggle();
};
AppComponent.prototype.ngOnDestroy = function () {
this.unsubscribe.next();
this.unsubscribe.complete();
};
__decorate([
core_1.ViewChild('sideNavigation'),
__metadata("design:type", Object)
], AppComponent.prototype, "sideNavigation", void 0);
__decorate([
core_1.HostListener('window:resize'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], AppComponent.prototype, "onWindowResize", null);
AppComponent = __decorate([
core_1.Component({
selector: 'rtl-app',
template: __webpack_require__(/*! ./app.component.html */ "./src/app/app.component.html"),
styles: [__webpack_require__(/*! ./app.component.scss */ "./src/app/app.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService])
], AppComponent);
return AppComponent;
}());
exports.AppComponent = AppComponent;
/***/ }),
/***/ "./src/app/app.module.ts":
/*!*******************************!*\
!*** ./src/app/app.module.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var platform_browser_1 = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var animations_1 = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
var overlay_1 = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
var ngx_charts_1 = __webpack_require__(/*! @swimlane/ngx-charts */ "./node_modules/@swimlane/ngx-charts/release/esm.js");
var ngx_perfect_scrollbar_1 = __webpack_require__(/*! ngx-perfect-scrollbar */ "./node_modules/ngx-perfect-scrollbar/dist/ngx-perfect-scrollbar.es5.js");
var ngx_perfect_scrollbar_2 = __webpack_require__(/*! ngx-perfect-scrollbar */ "./node_modules/ngx-perfect-scrollbar/dist/ngx-perfect-scrollbar.es5.js");
var DEFAULT_PERFECT_SCROLLBAR_CONFIG = {
suppressScrollX: false
};
var angular2_qrcode_1 = __webpack_require__(/*! angular2-qrcode */ "./node_modules/angular2-qrcode/lib/angular2-qrcode.js");
var app_routing_1 = __webpack_require__(/*! ./app.routing */ "./src/app/app.routing.ts");
var shared_module_1 = __webpack_require__(/*! ./shared/shared.module */ "./src/app/shared/shared.module.ts");
var theme_overlay_1 = __webpack_require__(/*! ./shared/theme/overlay-container/theme-overlay */ "./src/app/shared/theme/overlay-container/theme-overlay.ts");
var app_component_1 = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts");
var home_component_1 = __webpack_require__(/*! ./pages/home/home.component */ "./src/app/pages/home/home.component.ts");
var peers_component_1 = __webpack_require__(/*! ./pages/peers/peers.component */ "./src/app/pages/peers/peers.component.ts");
var wallet_component_1 = __webpack_require__(/*! ./pages/wallet/wallet.component */ "./src/app/pages/wallet/wallet.component.ts");
var invoices_component_1 = __webpack_require__(/*! ./pages/invoices/invoices.component */ "./src/app/pages/invoices/invoices.component.ts");
var server_config_component_1 = __webpack_require__(/*! ./pages/server-config/server-config.component */ "./src/app/pages/server-config/server-config.component.ts");
var help_component_1 = __webpack_require__(/*! ./pages/help/help.component */ "./src/app/pages/help/help.component.ts");
var get_started_component_1 = __webpack_require__(/*! ./pages/get-started/get-started.component */ "./src/app/pages/get-started/get-started.component.ts");
var list_payments_component_1 = __webpack_require__(/*! ./pages/payments/list-payments/list-payments.component */ "./src/app/pages/payments/list-payments/list-payments.component.ts");
var send_payment_component_1 = __webpack_require__(/*! ./pages/payments/send-payment/send-payment.component */ "./src/app/pages/payments/send-payment/send-payment.component.ts");
var side_navigation_component_1 = __webpack_require__(/*! ./pages/navigation/side-navigation/side-navigation.component */ "./src/app/pages/navigation/side-navigation/side-navigation.component.ts");
var top_menu_component_1 = __webpack_require__(/*! ./pages/navigation/top-menu/top-menu.component */ "./src/app/pages/navigation/top-menu/top-menu.component.ts");
var rtl_service_1 = __webpack_require__(/*! ./shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ./shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var horizontal_navigation_component_1 = __webpack_require__(/*! ./pages/navigation/horizontal-navigation/horizontal-navigation.component */ "./src/app/pages/navigation/horizontal-navigation/horizontal-navigation.component.ts");
var channel_dashboard_component_1 = __webpack_require__(/*! ./pages/channels/channel-dashboard/channel-dashboard.component */ "./src/app/pages/channels/channel-dashboard/channel-dashboard.component.ts");
var channel_manage_component_1 = __webpack_require__(/*! ./pages/channels/channel-manage/channel-manage.component */ "./src/app/pages/channels/channel-manage/channel-manage.component.ts");
var AppModule = /** @class */ (function () {
function AppModule() {
}
AppModule = __decorate([
core_1.NgModule({
imports: [
platform_browser_1.BrowserModule,
animations_1.BrowserAnimationsModule,
forms_1.FormsModule,
forms_1.ReactiveFormsModule,
http_1.HttpClientModule,
ngx_perfect_scrollbar_1.PerfectScrollbarModule,
shared_module_1.SharedModule,
angular2_qrcode_1.QRCodeModule,
ngx_charts_1.NgxChartsModule,
app_routing_1.routing
],
declarations: [
app_component_1.AppComponent,
home_component_1.HomeComponent,
peers_component_1.PeersComponent,
wallet_component_1.WalletComponent,
invoices_component_1.InvoicesComponent,
server_config_component_1.ServerConfigComponent,
help_component_1.HelpComponent,
get_started_component_1.GetStartedComponent,
list_payments_component_1.ListPaymentsComponent,
send_payment_component_1.SendPaymentComponent,
side_navigation_component_1.SideNavigationComponent,
top_menu_component_1.TopMenuComponent,
horizontal_navigation_component_1.HorizontalNavigationComponent,
channel_dashboard_component_1.ChannelDashboardComponent,
channel_manage_component_1.ChannelManageComponent
],
providers: [
rtl_service_1.RTLService,
{ provide: logger_service_1.LoggerService, useClass: logger_service_1.ConsoleLoggerService },
{ provide: ngx_perfect_scrollbar_2.PERFECT_SCROLLBAR_CONFIG, useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG },
{ provide: overlay_1.OverlayContainer, useClass: theme_overlay_1.ThemeOverlay }
],
bootstrap: [app_component_1.AppComponent]
})
], AppModule);
return AppModule;
}());
exports.AppModule = AppModule;
/***/ }),
/***/ "./src/app/app.routing.ts":
/*!********************************!*\
!*** ./src/app/app.routing.ts ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var not_found_component_1 = __webpack_require__(/*! ./shared/components/not-found/not-found.component */ "./src/app/shared/components/not-found/not-found.component.ts");
var home_component_1 = __webpack_require__(/*! ./pages/home/home.component */ "./src/app/pages/home/home.component.ts");
var get_started_component_1 = __webpack_require__(/*! ./pages/get-started/get-started.component */ "./src/app/pages/get-started/get-started.component.ts");
var channel_dashboard_component_1 = __webpack_require__(/*! ./pages/channels/channel-dashboard/channel-dashboard.component */ "./src/app/pages/channels/channel-dashboard/channel-dashboard.component.ts");
var channel_manage_component_1 = __webpack_require__(/*! ./pages/channels/channel-manage/channel-manage.component */ "./src/app/pages/channels/channel-manage/channel-manage.component.ts");
var peers_component_1 = __webpack_require__(/*! ./pages/peers/peers.component */ "./src/app/pages/peers/peers.component.ts");
var wallet_component_1 = __webpack_require__(/*! ./pages/wallet/wallet.component */ "./src/app/pages/wallet/wallet.component.ts");
var list_payments_component_1 = __webpack_require__(/*! ./pages/payments/list-payments/list-payments.component */ "./src/app/pages/payments/list-payments/list-payments.component.ts");
var send_payment_component_1 = __webpack_require__(/*! ./pages/payments/send-payment/send-payment.component */ "./src/app/pages/payments/send-payment/send-payment.component.ts");
var server_config_component_1 = __webpack_require__(/*! ./pages/server-config/server-config.component */ "./src/app/pages/server-config/server-config.component.ts");
var help_component_1 = __webpack_require__(/*! ./pages/help/help.component */ "./src/app/pages/help/help.component.ts");
exports.routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'start', component: get_started_component_1.GetStartedComponent },
{ path: 'home', component: home_component_1.HomeComponent },
{ path: 'peers', component: peers_component_1.PeersComponent },
{ path: 'chnldashboard', component: channel_dashboard_component_1.ChannelDashboardComponent },
{ path: 'chnlmanage', component: channel_manage_component_1.ChannelManageComponent },
{ path: 'wallet', component: wallet_component_1.WalletComponent },
{ path: 'listpayments', component: list_payments_component_1.ListPaymentsComponent },
{ path: 'sendpayment', component: send_payment_component_1.SendPaymentComponent },
{ path: 'sconfig', component: server_config_component_1.ServerConfigComponent },
{ path: 'help', component: help_component_1.HelpComponent },
{ path: '**', component: not_found_component_1.NotFoundComponent }
];
exports.routing = router_1.RouterModule.forRoot(exports.routes, {});
/***/ }),
/***/ "./src/app/pages/channels/channel-dashboard/channel-dashboard.component.html":
/*!***********************************************************************************!*\
!*** ./src/app/pages/channels/channel-dashboard/channel-dashboard.component.html ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\">\n <div class=\"padding-gap\">\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>\n <h2>Channel Status</h2>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <div fxLayout=\"row\">\n <div fxFlex=\"33\" fxLayoutAlign=\"center center\" tabindex=\"1\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <h3 class=\"sub-title\">Active</h3>\n <mat-icon class=\"size-40 green\">check_circle</mat-icon>\n <p class=\"mat-button-text pt-2\">{{activeChannels}}</p>\n </div>\n </div>\n <div fxFlex=\"33\" fxLayoutAlign=\"center center\" tabindex=\"2\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <h3 class=\"sub-title\">Inactive</h3>\n <mat-icon class=\"size-40 red\">cancel</mat-icon>\n <p class=\"mat-button-text pt-2\">{{inactiveChannels}}</p>\n </div>\n </div>\n <div fxFlex=\"33\" fxLayoutAlign=\"center center\" tabindex=\"3\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <h3 class=\"sub-title\">Pending</h3>\n <mat-icon class=\"size-40 yellow\">error</mat-icon>\n <p class=\"mat-button-text pt-2\">{{pendingChannels}}</p>\n </div>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"padding-gap\">\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>\n <h2>Total Channel Balances</h2>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <div fxLayout=\"row\">\n <div fxFlex=\"50\" fxLayoutAlign=\"center center\" tabindex=\"4\">\n <ngx-charts-bar-vertical\n [view]=\"view\"\n [scheme]=\"colorScheme\"\n [results]=\"totalLocalBalance\"\n [yAxisLabel]=\"yAxisLabel\"\n [yScaleMax]=\"maxBalanceValue\"\n xAxis=\"true\"\n yAxis=\"true\"\n showYAxis=\"true\"\n showDataLabel=\"true\"\n tooltipDisabled=\"true\">\n </ngx-charts-bar-vertical>\n </div>\n <div fxFlex=\"50\" fxLayoutAlign=\"center center\" tabindex=\"5\">\n <ngx-charts-bar-vertical\n [view]=\"view\"\n [scheme]=\"colorScheme\"\n [results]=\"totalRemoteBalance\"\n [yAxisLabel]=\"yAxisLabel\"\n [yScaleMax]=\"maxBalanceValue\"\n xAxis=\"true\"\n yAxis=\"true\"\n showYAxis=\"true\"\n showDataLabel=\"true\"\n tooltipDisabled=\"true\">\n </ngx-charts-bar-vertical>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n</div>\n\n"
/***/ }),
/***/ "./src/app/pages/channels/channel-dashboard/channel-dashboard.component.scss":
/*!***********************************************************************************!*\
!*** ./src/app/pages/channels/channel-dashboard/channel-dashboard.component.scss ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".mat-column-capacity, .mat-column-local_balance, .mat-column-remote_balance, .mat-column-total_satoshis_sent, .mat-column-total_satoshis_received {\n flex: 0 0 9%;\n min-width: 90px; }\n\n.mat-column-active, .mat-column-commit_fee {\n flex: 0 0 6%;\n min-width: 60px; }\n\n.mat-column-close {\n flex: 0 0 5%;\n min-width: 40px; }\n\nmat-cell.mat-column-close {\n cursor: pointer; }\n\n.mat-column-chan_id {\n flex: 0 0 12%;\n min-width: 170px; }\n\n.mat-column-remote_pubkey {\n flex: 0 0 20%;\n min-width: 200px; }\n\n.size-40 {\n font-size: 40px;\n margin-left: -30%; }\n\n.mat-button-text {\n font-size: 24px;\n padding-bottom: 20px; }\n\n.flex-ellipsis {\n padding-right: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvY2hhbm5lbHMvY2hhbm5lbC1kYXNoYm9hcmQvQzpcXFdvcmtzcGFjZVxcUlRMRnVsbEFwcGxpY2F0aW9uL3NyY1xcYXBwXFxwYWdlc1xcY2hhbm5lbHNcXGNoYW5uZWwtZGFzaGJvYXJkXFxjaGFubmVsLWRhc2hib2FyZC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLGFBQVk7RUFDWixnQkFBZSxFQUNoQjs7QUFFRDtFQUNFLGFBQVk7RUFDWixnQkFBZSxFQUNoQjs7QUFFRDtFQUNFLGFBQVk7RUFDWixnQkFBZSxFQUNoQjs7QUFFRDtFQUNFLGdCQUFlLEVBQ2hCOztBQUVEO0VBQ0UsY0FBYTtFQUNiLGlCQUFnQixFQUNqQjs7QUFFRDtFQUNFLGNBQWE7RUFDYixpQkFBZ0IsRUFDakI7O0FBRUQ7RUFDRSxnQkFBZTtFQUNmLGtCQUFpQixFQUNsQjs7QUFFRDtFQUNFLGdCQUFlO0VBQ2YscUJBQW9CLEVBQ3JCOztBQUVEO0VBQ0UsaUJBQWdCO0VBQ2hCLG9CQUFtQjtFQUNuQixpQkFBZ0I7RUFDaEIsd0JBQXVCLEVBQ3hCIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvY2hhbm5lbHMvY2hhbm5lbC1kYXNoYm9hcmQvY2hhbm5lbC1kYXNoYm9hcmQuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubWF0LWNvbHVtbi1jYXBhY2l0eSwgLm1hdC1jb2x1bW4tbG9jYWxfYmFsYW5jZSwgLm1hdC1jb2x1bW4tcmVtb3RlX2JhbGFuY2UsIC5tYXQtY29sdW1uLXRvdGFsX3NhdG9zaGlzX3NlbnQsIC5tYXQtY29sdW1uLXRvdGFsX3NhdG9zaGlzX3JlY2VpdmVkIHtcclxuICAgIGZsZXg6IDAgMCA5JTtcclxuICAgIG1pbi13aWR0aDogOTBweDtcclxuICB9XHJcbiAgXHJcbiAgLm1hdC1jb2x1bW4tYWN0aXZlLCAubWF0LWNvbHVtbi1jb21taXRfZmVlIHtcclxuICAgIGZsZXg6IDAgMCA2JTtcclxuICAgIG1pbi13aWR0aDogNjBweDtcclxuICB9XHJcbiAgXHJcbiAgLm1hdC1jb2x1bW4tY2xvc2Uge1xyXG4gICAgZmxleDogMCAwIDUlO1xyXG4gICAgbWluLXdpZHRoOiA0MHB4O1xyXG4gIH1cclxuICBcclxuICBtYXQtY2VsbC5tYXQtY29sdW1uLWNsb3NlIHtcclxuICAgIGN1cnNvcjogcG9pbnRlcjtcclxuICB9XHJcbiAgXHJcbiAgLm1hdC1jb2x1bW4tY2hhbl9pZCB7XHJcbiAgICBmbGV4OiAwIDAgMTIlO1xyXG4gICAgbWluLXdpZHRoOiAxNzBweDtcclxuICB9XHJcbiAgXHJcbiAgLm1hdC1jb2x1bW4tcmVtb3RlX3B1YmtleSB7XHJcbiAgICBmbGV4OiAwIDAgMjAlO1xyXG4gICAgbWluLXdpZHRoOiAyMDBweDtcclxuICB9XHJcbiAgXHJcbiAgLnNpemUtNDAge1xyXG4gICAgZm9udC1zaXplOiA0MHB4O1xyXG4gICAgbWFyZ2luLWxlZnQ6IC0zMCU7XHJcbiAgfVxyXG4gIFxyXG4gIC5tYXQtYnV0dG9uLXRleHQge1xyXG4gICAgZm9udC1zaXplOiAyNHB4O1xyXG4gICAgcGFkZGluZy1ib3R0b206IDIwcHg7XHJcbiAgfVxyXG4gIFxyXG4gIC5mbGV4LWVsbGlwc2lzIHtcclxuICAgIHBhZGRpbmctcmlnaHQ6IDA7XHJcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xyXG4gICAgb3ZlcmZsb3c6IGhpZGRlbjtcclxuICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xyXG4gIH1cclxuIl19 */"
/***/ }),
/***/ "./src/app/pages/channels/channel-dashboard/channel-dashboard.component.ts":
/*!*********************************************************************************!*\
!*** ./src/app/pages/channels/channel-dashboard/channel-dashboard.component.ts ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var rtl_service_1 = __webpack_require__(/*! ../../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var ChannelDashboardComponent = /** @class */ (function () {
function ChannelDashboardComponent(rtlService, logger) {
this.rtlService = rtlService;
this.logger = logger;
this.position = 'below';
this.activeChannels = 0;
this.inactiveChannels = 0;
this.pendingChannels = 0;
this.peers = [];
this.information = {};
this.flgLoading = [true, true, true];
this.channelSub = [new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject()];
this.localBal = 0;
this.remoteBal = 0;
this.maxBalanceValue = 0;
this.totalLocalBalance = [{ name: 'Local Balance', value: 1 }];
this.totalRemoteBalance = [{ name: 'Remote Balance', value: 1 }];
this.view = [250, 400];
this.yAxisLabel = 'Balance';
this.colorScheme = { domain: ['#FFFFFF'] };
Object.assign(this, this.totalLocalBalance);
Object.assign(this, this.totalRemoteBalance);
}
ChannelDashboardComponent.prototype.ngOnInit = function () {
var _this = this;
if (undefined === this.information.currency_unit) {
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.flgLoading[0] = true;
this.rtlService.getInfo();
}
else {
this.flgLoading[0] = false;
}
}
else {
this.flgLoading[0] = false;
}
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.channelSub[0]))
.subscribe(function (data) {
_this.information = data;
_this.logger.info(_this.information);
});
this.activeChannels = 0;
this.inactiveChannels = 0;
this.rtlService.getChannels('all', '')
.pipe(operators_1.takeUntil(this.channelSub[1]))
.subscribe(function (data) {
_this.flgLoading[1] = false;
_this.localBal = 0;
_this.remoteBal = 0;
data.channels.filter(function (channel) {
if (undefined !== channel.local_balance) {
_this.localBal = +_this.localBal + +channel.local_balance;
}
if (undefined !== channel.remote_balance) {
_this.remoteBal = +_this.remoteBal + +channel.remote_balance;
}
if (channel.active === true) {
_this.activeChannels++;
}
else {
_this.inactiveChannels++;
}
});
if (undefined === _this.localBal || null == _this.localBal) {
_this.localBal = 0;
}
if (undefined === _this.remoteBal || null == _this.remoteBal) {
_this.remoteBal = 0;
}
_this.totalLocalBalance = [{ name: 'Local Balance', value: _this.localBal }];
_this.totalRemoteBalance = [{ name: 'Remote Balance', value: _this.remoteBal }];
_this.maxBalanceValue = (_this.localBal > _this.remoteBal) ? _this.localBal : _this.remoteBal;
});
this.rtlService.getChannels('pending', '')
.pipe(operators_1.takeUntil(this.channelSub[2]))
.subscribe(function (data) {
_this.flgLoading[2] = false;
_this.pendingChannels = 0;
_this.pendingChannels = (undefined === data.pending_open_channels) ? 0 : data.pending_open_channels.length;
_this.logger.info(_this.pendingChannels);
}, function (err) {
_this.logger.error(err);
_this.flgLoading[2] = 'error';
});
};
ChannelDashboardComponent.prototype.ngOnDestroy = function () {
this.channelSub.forEach(function (completeSub) {
completeSub.next();
completeSub.complete();
});
};
ChannelDashboardComponent = __decorate([
core_1.Component({
selector: 'rtl-channel-dashboard',
template: __webpack_require__(/*! ./channel-dashboard.component.html */ "./src/app/pages/channels/channel-dashboard/channel-dashboard.component.html"),
styles: [__webpack_require__(/*! ./channel-dashboard.component.scss */ "./src/app/pages/channels/channel-dashboard/channel-dashboard.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService])
], ChannelDashboardComponent);
return ChannelDashboardComponent;
}());
exports.ChannelDashboardComponent = ChannelDashboardComponent;
/***/ }),
/***/ "./src/app/pages/channels/channel-manage/channel-manage.component.html":
/*!*****************************************************************************!*\
!*** ./src/app/pages/channels/channel-manage/channel-manage.component.html ***!
\*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\">\n <div fxFlex=\"100\" class=\"padding-gap\">\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>\n <h2>Add Channel</h2>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <form fxLayout=\"row\" fxLayoutAlign=\"space-between\" (ngSubmit)=\"openChannelForm.form.valid && onOpenChannel(openChannelForm)\" #openChannelForm=\"ngForm\">\n <mat-form-field fxFlex=\"40\" fxLayoutAlign=\"center center\">\n <mat-select [(ngModel)]=\"selectedPeer\" placeholder=\"Alias\" name=\"peer_alias\" tabindex=\"4\" required name=\"selPeer\" #selPeer=\"ngModel\">\n <mat-option *ngFor=\"let peer of peers\" [value]=\"peer.pub_key\">\n {{peer.alias}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field fxFlex=\"35\" fxLayoutAlign=\"center center\">\n <input matInput [(ngModel)]=\"fundingAmount\" placeholder=\"Amount ({{information?.smaller_currency_unit}})\" type=\"number\" step=\"1000\" min=\"1\" tabindex=\"5\" required name=\"amount\" #amount=\"ngModel\">\n </mat-form-field>\n <button fxFlex=\"10\" fxLayoutAlign=\"center center\" mat-raised-button color=\"primary\" [disabled]=\"selectedPeer === '' || fundingAmount == null\" type=\"submit\" tabindex=\"6\">\n <p *ngIf=\"(selectedPeer === '' || fundingAmount == null) && (selPeer.touched || selPeer.dirty) && (amount.touched || amount.dirty); else openText\">Invalid Values</p>\n <ng-template #openText><p>Open</p></ng-template>\n </button>\n </form>\n </mat-card-content>\n </mat-card>\n </div>\n <div class=\"padding-gap\">\n <mat-card>\n <mat-card-content fxFlex=\"100\" fxLayout=\"column\">\n <div fxLayoutAlign=\"end start\">\n <mat-form-field>\n <mat-select placeholder=\"Status Filter\" name=\"status_filter\" tabindex=\"6\" (selectionChange)=\"applyFilter($event.value)\" [(value)]=\"selectedFilter\">\n <mat-option>All</mat-option>\n <mat-option *ngFor=\"let statusFilter of statusFilters\" [value]=\"statusFilter\">{{statusFilter}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <mat-progress-bar *ngIf=\"flgLoading[2]===true\" mode=\"indeterminate\"></mat-progress-bar>\n <mat-table #table perfectScrollbar [dataSource]=\"channels\" matSort [ngClass]=\"{'mat-elevation-z8 overflow-auto error-border': flgLoading[2]==='error','mat-elevation-z8 overflow-auto': true}\">\n <ng-container matColumnDef=\"close\">\n <mat-header-cell *matHeaderCellDef> Close </mat-header-cell>\n <mat-cell *matCellDef=\"let channel\"><mat-icon color=\"accent\" (click)=\"onChannelClose(channel)\">link_off</mat-icon></mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"active\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Status </mat-header-cell>\n <mat-cell *matCellDef=\"let channel\"> {{channel.active}} </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"chan_id\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> ID </mat-header-cell>\n <mat-cell *matCellDef=\"let channel\"> {{channel.chan_id}} </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"remote_pubkey\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Pub Key </mat-header-cell>\n <mat-cell *matCellDef=\"let channel\" matTooltip=\"{{channel.remote_pubkey}}\" [matTooltipPosition]=\"position\" matTooltipClass=\"wide-tooltip\">\n <div class=\"flex-ellipsis\">{{channel.remote_pubkey}}</div></mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"capacity\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> Capacity </mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let channel\"> {{channel.capacity | number}} </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"local_balance\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> Local Bal </mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let channel\"> {{channel.local_balance | number}} </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"remote_balance\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> Remote Bal </mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let channel\"> {{channel.remote_balance | number}} </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"total_satoshis_sent\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> {{information?.smaller_currency_unit}} Sent </mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let channel\"> {{channel.total_satoshis_sent | number}} </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"total_satoshis_received\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> {{information?.smaller_currency_unit}} Recv </mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let channel\"> {{channel.total_satoshis_received | number}} </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"commit_fee\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> Fee </mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let channel\"> {{channel.commit_fee | number}} </mat-cell>\n </ng-container>\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\" (click)=\"onChannelClick(row, $event)\"></mat-row>\n </mat-table>\n </mat-card-content>\n </mat-card>\n </div>\n </div>\n "
/***/ }),
/***/ "./src/app/pages/channels/channel-manage/channel-manage.component.scss":
/*!*****************************************************************************!*\
!*** ./src/app/pages/channels/channel-manage/channel-manage.component.scss ***!
\*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".mat-column-capacity, .mat-column-local_balance, .mat-column-remote_balance, .mat-column-total_satoshis_sent, .mat-column-total_satoshis_received {\n flex: 0 0 9%;\n min-width: 90px; }\n\n.mat-column-active, .mat-column-commit_fee {\n flex: 0 0 6%;\n min-width: 60px; }\n\n.mat-column-close {\n flex: 0 0 5%;\n min-width: 40px; }\n\nmat-cell.mat-column-close {\n cursor: pointer; }\n\n.mat-column-chan_id {\n flex: 0 0 12%;\n min-width: 170px; }\n\n.mat-column-remote_pubkey {\n flex: 0 0 20%;\n min-width: 200px; }\n\n.size-40 {\n font-size: 40px;\n margin-left: -30%; }\n\n.mat-button-text {\n font-size: 24px;\n padding-bottom: 20px; }\n\n.flex-ellipsis {\n padding-right: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvY2hhbm5lbHMvY2hhbm5lbC1tYW5hZ2UvQzpcXFdvcmtzcGFjZVxcUlRMRnVsbEFwcGxpY2F0aW9uL3NyY1xcYXBwXFxwYWdlc1xcY2hhbm5lbHNcXGNoYW5uZWwtbWFuYWdlXFxjaGFubmVsLW1hbmFnZS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLGFBQVk7RUFDWixnQkFBZSxFQUNoQjs7QUFFRDtFQUNFLGFBQVk7RUFDWixnQkFBZSxFQUNoQjs7QUFFRDtFQUNFLGFBQVk7RUFDWixnQkFBZSxFQUNoQjs7QUFFRDtFQUNFLGdCQUFlLEVBQ2hCOztBQUVEO0VBQ0UsY0FBYTtFQUNiLGlCQUFnQixFQUNqQjs7QUFFRDtFQUNFLGNBQWE7RUFDYixpQkFBZ0IsRUFDakI7O0FBRUQ7RUFDRSxnQkFBZTtFQUNmLGtCQUFpQixFQUNsQjs7QUFFRDtFQUNFLGdCQUFlO0VBRWYscUJBQW9CLEVBQ3JCOztBQUVEO0VBQ0UsaUJBQWdCO0VBQ2hCLG9CQUFtQjtFQUNuQixpQkFBZ0I7RUFDaEIsd0JBQXVCLEVBQ3hCIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvY2hhbm5lbHMvY2hhbm5lbC1tYW5hZ2UvY2hhbm5lbC1tYW5hZ2UuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubWF0LWNvbHVtbi1jYXBhY2l0eSwgLm1hdC1jb2x1bW4tbG9jYWxfYmFsYW5jZSwgLm1hdC1jb2x1bW4tcmVtb3RlX2JhbGFuY2UsIC5tYXQtY29sdW1uLXRvdGFsX3NhdG9zaGlzX3NlbnQsIC5tYXQtY29sdW1uLXRvdGFsX3NhdG9zaGlzX3JlY2VpdmVkIHtcclxuICAgIGZsZXg6IDAgMCA5JTtcclxuICAgIG1pbi13aWR0aDogOTBweDtcclxuICB9XHJcbiAgXHJcbiAgLm1hdC1jb2x1bW4tYWN0aXZlLCAubWF0LWNvbHVtbi1jb21taXRfZmVlIHtcclxuICAgIGZsZXg6IDAgMCA2JTtcclxuICAgIG1pbi13aWR0aDogNjBweDtcclxuICB9XHJcbiAgXHJcbiAgLm1hdC1jb2x1bW4tY2xvc2Uge1xyXG4gICAgZmxleDogMCAwIDUlO1xyXG4gICAgbWluLXdpZHRoOiA0MHB4O1xyXG4gIH1cclxuICBcclxuICBtYXQtY2VsbC5tYXQtY29sdW1uLWNsb3NlIHtcclxuICAgIGN1cnNvcjogcG9pbnRlcjtcclxuICB9XHJcbiAgXHJcbiAgLm1hdC1jb2x1bW4tY2hhbl9pZCB7XHJcbiAgICBmbGV4OiAwIDAgMTIlO1xyXG4gICAgbWluLXdpZHRoOiAxNzBweDtcclxuICB9XHJcbiAgXHJcbiAgLm1hdC1jb2x1bW4tcmVtb3RlX3B1YmtleSB7XHJcbiAgICBmbGV4OiAwIDAgMjAlO1xyXG4gICAgbWluLXdpZHRoOiAyMDBweDtcclxuICB9XHJcbiAgXHJcbiAgLnNpemUtNDAge1xyXG4gICAgZm9udC1zaXplOiA0MHB4O1xyXG4gICAgbWFyZ2luLWxlZnQ6IC0zMCU7XHJcbiAgfVxyXG4gIFxyXG4gIC5tYXQtYnV0dG9uLXRleHQge1xyXG4gICAgZm9udC1zaXplOiAyNHB4O1xyXG4gICAgLy8gcGFkZGluZy1sZWZ0OiAxNnB4O1xyXG4gICAgcGFkZGluZy1ib3R0b206IDIwcHg7XHJcbiAgfVxyXG4gIFxyXG4gIC5mbGV4LWVsbGlwc2lzIHtcclxuICAgIHBhZGRpbmctcmlnaHQ6IDA7XHJcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xyXG4gICAgb3ZlcmZsb3c6IGhpZGRlbjtcclxuICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xyXG4gIH1cclxuICAiXX0= */"
/***/ }),
/***/ "./src/app/pages/channels/channel-manage/channel-manage.component.ts":
/*!***************************************************************************!*\
!*** ./src/app/pages/channels/channel-manage/channel-manage.component.ts ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var rtl_service_1 = __webpack_require__(/*! ../../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var alert_message_component_1 = __webpack_require__(/*! ../../../shared/components/alert-message/alert-message.component */ "./src/app/shared/components/alert-message/alert-message.component.ts");
var confirmation_message_component_1 = __webpack_require__(/*! ../../../shared/components/confirmation-message/confirmation-message.component */ "./src/app/shared/components/confirmation-message/confirmation-message.component.ts");
var spinner_dialog_component_1 = __webpack_require__(/*! ../../../shared/components/spinner-dialog/spinner-dialog.component */ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.ts");
var ChannelManageComponent = /** @class */ (function () {
function ChannelManageComponent(rtlService, logger, dialog) {
this.rtlService = rtlService;
this.logger = logger;
this.dialog = dialog;
this.position = 'below';
this.selectedPeer = '';
this.displayedColumns = [
'close', 'active', 'chan_id', 'remote_pubkey', 'capacity', 'local_balance', 'remote_balance',
'total_satoshis_sent', 'total_satoshis_received', 'commit_fee'
];
this.peers = [];
this.information = {};
this.flgLoading = [true, true, true, true];
this.selectedFilter = '';
this.statusFilters = ['Active', 'Inactive'];
// public statusFilters = ['Active', 'Inactive', 'Pending'];
this.channelSub = [new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject()];
}
ChannelManageComponent.prototype.ngOnInit = function () {
var _this = this;
if (undefined === this.information.currency_unit) {
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.flgLoading[0] = true;
this.rtlService.getInfo();
}
else {
this.flgLoading[0] = false;
}
}
else {
this.flgLoading[0] = false;
}
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.channelSub[0]))
.subscribe(function (data) {
_this.information = data;
_this.logger.info(_this.information);
});
this.rtlService.getPeers()
.pipe(operators_1.takeUntil(this.channelSub[1]))
.subscribe(function (data) {
_this.flgLoading[0] = false;
_this.peers = data;
}, function (err) {
_this.logger.error(err);
_this.flgLoading[0] = 'error';
});
this.loadChannelsTable();
};
ChannelManageComponent.prototype.onOpenChannel = function (form) {
var _this = this;
var dialogRef = this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Opening Channel...' } });
// let SatsFundingAmount = this.rtlService.convertBTCToSats(this.fundingAmount);
this.rtlService.addChannel(this.selectedPeer, this.fundingAmount)
.subscribe(function (data) {
dialogRef.close();
_this.selectedPeer = '';
_this.fundingAmount = null;
form.resetForm();
_this.logger.info(data);
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'SUCCESS', message: 'Channel Added Successfully!' } });
}, function (err) {
dialogRef.close();
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'ERROR', message: err.error.error } });
_this.logger.error(err);
});
};
ChannelManageComponent.prototype.onChannelClose = function (channelToClose) {
var _this = this;
var confirmationMsg = 'Closing channel: ' + channelToClose.chan_id;
var confirmDialog = this.dialog.open(confirmation_message_component_1.ConfirmationMessageComponent, { width: '760px', data: {
type: 'CONFIRM',
message: confirmationMsg
}
});
confirmDialog.afterClosed().subscribe(function (confirmResponse) {
if (confirmResponse) {
var dialogRef_1 = _this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Closing Channel...' } });
_this.rtlService.closeChannel(channelToClose.channel_point, false)
.subscribe(function (resData) {
dialogRef_1.close();
_this.logger.info(resData);
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'SUCCESS', message: 'Channel Closed Successfully!' } });
_this.loadChannelsTable();
}, function (err) {
dialogRef_1.close();
if (err.error.error.grpc_code === 2
&& err.error.error.http_code === 500
&& err.error.error.message.indexOf('unable to gracefully close channel') >= 0) {
var confirmMsg = 'Unable to gracefully close channel while peer is offline.\nForce close the channel?';
var confirmDlg = _this.dialog.open(confirmation_message_component_1.ConfirmationMessageComponent, { width: '760px', data: {
type: 'ERROR',
message: confirmMsg
}
});
confirmDlg.afterClosed().subscribe(function (cnfrmRes) {
if (cnfrmRes) {
var dialogRefForce_1 = _this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Closing Channel Forcibly...' } });
_this.rtlService.closeChannel(channelToClose.channel_point, true)
.subscribe(function (resData) {
dialogRef_1.close();
_this.logger.info(resData);
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'SUCCESS', message: 'Channel Closed Forcibly!' } });
_this.loadChannelsTable();
}, function (errRes) {
dialogRefForce_1.close();
if (err.error.error.grpc_code === 2
&& err.error.error.http_code === 500
&& err.error.error.message.indexOf('unable to gracefully close channel') >= 0) {
err.error.error.message = 'Unable to close forcibly. Try again later.';
}
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'ERROR', message: err.error.error.message } });
_this.logger.error(err);
});
}
});
}
else {
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'ERROR', message: err.error.error.message } });
_this.logger.error(err);
}
});
}
});
};
ChannelManageComponent.prototype.applyFilter = function (selFilter) {
this.selectedFilter = selFilter;
this.channels.filter = selFilter;
};
ChannelManageComponent.prototype.onChannelClick = function (selRow, event) {
var flgCloseClicked = event.target.className.includes('mat-column-close') || event.target.className.includes('mat-icon');
if (flgCloseClicked) {
return;
}
var selChannel = this.channels.data.filter(function (channel) {
return channel.chan_id === selRow.chan_id;
});
this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '850px', data: { type: 'INFO', message: JSON.stringify(selChannel[0]), jsonMsg: true } });
};
ChannelManageComponent.prototype.loadChannelsTable = function () {
var _this = this;
this.rtlService.getChannels('all', '')
.pipe(operators_1.takeUntil(this.channelSub[2]))
.subscribe(function (data) {
_this.flgLoading[2] = false;
if (undefined === data.channels) {
data.channels = [];
}
data.channels.sort(function (a, b) {
return (a.active === b.active) ? 0 : ((a.active) ? -1 : 1);
});
data.channels.filter(function (channel) {
if (channel.active === true) {
channel.active = 'Active';
}
else {
channel.active = 'Inactive';
}
});
_this.channels = new material_1.MatTableDataSource(data.channels.slice());
_this.channels.sort = _this.sort;
_this.channels.filterPredicate = function (channel, selFilter) {
if (channel.active) {
return channel.active.startsWith(selFilter);
}
return false;
};
_this.logger.info(_this.channels);
}, function (err) {
_this.logger.error(err);
_this.flgLoading[2] = 'error';
});
};
ChannelManageComponent.prototype.ngOnDestroy = function () {
this.channelSub.forEach(function (completeSub) {
completeSub.next();
completeSub.complete();
});
};
__decorate([
core_1.ViewChild(material_1.MatSort),
__metadata("design:type", material_1.MatSort)
], ChannelManageComponent.prototype, "sort", void 0);
ChannelManageComponent = __decorate([
core_1.Component({
selector: 'rtl-channel-manage',
template: __webpack_require__(/*! ./channel-manage.component.html */ "./src/app/pages/channels/channel-manage/channel-manage.component.html"),
styles: [__webpack_require__(/*! ./channel-manage.component.scss */ "./src/app/pages/channels/channel-manage/channel-manage.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService, material_1.MatDialog])
], ChannelManageComponent);
return ChannelManageComponent;
}());
exports.ChannelManageComponent = ChannelManageComponent;
/***/ }),
/***/ "./src/app/pages/get-started/get-started.component.html":
/*!**************************************************************!*\
!*** ./src/app/pages/get-started/get-started.component.html ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\">\r\n <div class=\"padding-gap\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-subtitle>\r\n <h2>Get Started</h2>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <form fxLayout=\"row\" fxLayoutAlign=\"start\">\r\n <mat-form-field fxFlex=\"50\" fxLayoutAlign=\"start\">\r\n <input matInput type=\"password\" placeholder=\"Wallet Password\" name=\"walletPassword\" [(ngModel)]=\"walletPassword\" tabindex=\"1\" required>\r\n </mat-form-field>\r\n <button mat-raised-button fxFlex=\"15\" color=\"primary\" [disabled]=\"walletPassword == ''\" (click)=\"onOperateWallet('unlock')\" tabindex=\"2\">Unlock Wallet</button>\r\n </form> \r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/pages/get-started/get-started.component.scss":
/*!**************************************************************!*\
!*** ./src/app/pages/get-started/get-started.component.scss ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL2dldC1zdGFydGVkL2dldC1zdGFydGVkLmNvbXBvbmVudC5zY3NzIn0= */"
/***/ }),
/***/ "./src/app/pages/get-started/get-started.component.ts":
/*!************************************************************!*\
!*** ./src/app/pages/get-started/get-started.component.ts ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var rtl_service_1 = __webpack_require__(/*! ../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var alert_message_component_1 = __webpack_require__(/*! ../../shared/components/alert-message/alert-message.component */ "./src/app/shared/components/alert-message/alert-message.component.ts");
var spinner_dialog_component_1 = __webpack_require__(/*! ../../shared/components/spinner-dialog/spinner-dialog.component */ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.ts");
var GetStartedComponent = /** @class */ (function () {
function GetStartedComponent(rtlService, logger, router, dialog) {
this.rtlService = rtlService;
this.logger = logger;
this.router = router;
this.dialog = dialog;
this.walletPassword = '';
this.unsub = new rxjs_1.Subject();
}
GetStartedComponent.prototype.ngOnInit = function () {
this.walletPassword = '';
};
GetStartedComponent.prototype.onOperateWallet = function (operation) {
var _this = this;
var dialogRefUnlock = this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Unlocking...' } });
this.rtlService.operateWallet(operation, this.walletPassword)
.pipe(operators_1.takeUntil(this.unsub))
.subscribe(function (data) {
var dialogRefInit = _this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Initializing Node...' } });
dialogRefUnlock.close();
_this.logger.info('Successfully Unlocked!');
setTimeout(function () {
_this.walletPassword = '';
_this.logger.info('Successfully Initialized!');
_this.router.navigate(['/home']);
dialogRefInit.close();
}, 1000 * 90);
}, function (err) {
_this.walletPassword = '';
dialogRefUnlock.close();
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'ERROR', message: err.error.error } });
_this.logger.error(err.error.error);
});
};
GetStartedComponent.prototype.ngOnDestroy = function () {
this.unsub.next();
this.unsub.complete();
};
GetStartedComponent = __decorate([
core_1.Component({
selector: 'rtl-get-started',
template: __webpack_require__(/*! ./get-started.component.html */ "./src/app/pages/get-started/get-started.component.html"),
styles: [__webpack_require__(/*! ./get-started.component.scss */ "./src/app/pages/get-started/get-started.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService, router_1.Router, material_1.MatDialog])
], GetStartedComponent);
return GetStartedComponent;
}());
exports.GetStartedComponent = GetStartedComponent;
/***/ }),
/***/ "./src/app/pages/help/help.component.html":
/*!************************************************!*\
!*** ./src/app/pages/help/help.component.html ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\">\r\n <div class=\"padding-gap\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-subtitle>\r\n <h2>Help</h2>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n <mat-card-content *ngFor=\"let helpTopic of helpTopics\">\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>{{helpTopic.question}}</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <mat-panel-description>{{helpTopic.answer}}</mat-panel-description>\r\n </mat-expansion-panel>\r\n <div class=\"divider\"></div>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n</div>"
/***/ }),
/***/ "./src/app/pages/help/help.component.scss":
/*!************************************************!*\
!*** ./src/app/pages/help/help.component.scss ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".mat-card-content {\n margin-bottom: 4px; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvaGVscC9DOlxcV29ya3NwYWNlXFxSVExGdWxsQXBwbGljYXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxoZWxwXFxoZWxwLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsbUJBQWtCLEVBQ25CIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvaGVscC9oZWxwLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm1hdC1jYXJkLWNvbnRlbnQge1xyXG4gIG1hcmdpbi1ib3R0b206IDRweDtcclxufVxyXG4iXX0= */"
/***/ }),
/***/ "./src/app/pages/help/help.component.ts":
/*!**********************************************!*\
!*** ./src/app/pages/help/help.component.ts ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var HelpTopic = /** @class */ (function () {
function HelpTopic(ques, ans) {
this.question = ques;
this.answer = ans;
}
return HelpTopic;
}());
exports.HelpTopic = HelpTopic;
var HelpComponent = /** @class */ (function () {
function HelpComponent() {
this.helpTopics = [];
}
HelpComponent.prototype.ngOnInit = function () {
// this.helpTopics.push(new HelpTopic('Set LND home directory?',
// 'Pass the directroy information while getting the server up with --lndir "local-lnd-path".<br>Example: node rtl --lndir C:\lnd\dir\path'));
this.helpTopics.push(new HelpTopic('Change theme?', 'Click on rotating setting icon on the right side of the screen and choose from the given options.'));
};
HelpComponent = __decorate([
core_1.Component({
selector: 'rtl-help',
template: __webpack_require__(/*! ./help.component.html */ "./src/app/pages/help/help.component.html"),
styles: [__webpack_require__(/*! ./help.component.scss */ "./src/app/pages/help/help.component.scss")]
}),
__metadata("design:paramtypes", [])
], HelpComponent);
return HelpComponent;
}());
exports.HelpComponent = HelpComponent;
/***/ }),
/***/ "./src/app/pages/home/home.component.html":
/*!************************************************!*\
!*** ./src/app/pages/home/home.component.html ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\" fxLayout.gt-sm=\"row wrap\">\r\n <div fxFlex=\"20\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'custom-card error-border': flgLoading[2]==='error','custom-card': true}\">\r\n <mat-card-header class=\"bg-primary\" fxLayoutAlign=\"center end\">\r\n <mat-card-title class=\"m-0 pt-2\">\r\n <h3>Wallet Balance</h3>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content fxLayout=\"column\" fxLayoutAlign=\"center center\">\r\n <mat-card-content class=\"mt-1\">\r\n <mat-icon class=\"icon-large\">account_balance_wallet</mat-icon>\r\n </mat-card-content>\r\n <span *ngIf=\"information?.currency_unit; else withoutData\">\r\n <h3 *ngIf=\"settings?.satsToBTC; else smallerUnit1\">{{BTCtotalBalance | number}} {{information?.currency_unit}}</h3>\r\n <ng-template #smallerUnit1><h3>{{totalBalance | number}} {{information?.smaller_currency_unit}}</h3></ng-template>\r\n </span>\r\n </mat-card-content>\r\n <mat-progress-bar *ngIf=\"flgLoading[2]===true || flgLoading[0]===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n <mat-divider></mat-divider>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"20\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'custom-card error-border': flgLoading[0]==='error','custom-card': true}\">\r\n <mat-card-header class=\"bg-primary\" fxLayoutAlign=\"center center\">\r\n <mat-card-title class=\"m-0 pt-2\">\r\n <h3>Peers</h3>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content fxLayout=\"column\" fxLayoutAlign=\"center center\">\r\n <mat-card-content class=\"mt-1\">\r\n <mat-icon class=\"icon-large\">group</mat-icon>\r\n </mat-card-content>\r\n <h3 *ngIf=\"information.num_peers; else zeroPeers\">{{information?.num_peers | number}}</h3>\r\n <ng-template #zeroPeers>\r\n <h3>0</h3>\r\n </ng-template>\r\n </mat-card-content>\r\n <mat-progress-bar *ngIf=\"flgLoading[0]===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n <mat-divider></mat-divider>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"20\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'custom-card error-border': flgLoading[0]==='error','custom-card': true}\">\r\n <mat-card-header class=\"bg-primary\" fxLayoutAlign=\"center center\">\r\n <mat-card-title class=\"m-0 pt-2\">\r\n <h3>Active Channels</h3>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content fxLayout=\"column\" fxLayoutAlign=\"center center\">\r\n <mat-card-content class=\"mt-1\">\r\n <mat-icon class=\"icon-large\">settings_ethernet</mat-icon>\r\n </mat-card-content>\r\n <h3 *ngIf=\"information.num_active_channels; else zeroChannel\">{{information?.num_active_channels | number}}</h3>\r\n <ng-template #zeroChannel>\r\n <h3>0</h3>\r\n </ng-template>\r\n </mat-card-content>\r\n <mat-progress-bar *ngIf=\"flgLoading[0]===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n <mat-divider></mat-divider>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"20\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'custom-card error-border': flgLoading[3]==='error','custom-card': true}\">\r\n <mat-card-header class=\"bg-primary\" fxLayoutAlign=\"center center\">\r\n <mat-card-title class=\"m-0 pt-2\">\r\n <h3>Channel Balance</h3>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content fxLayout=\"column\" fxLayoutAlign=\"center center\">\r\n <mat-card-content class=\"mt-1\">\r\n <mat-icon class=\"icon-large\">linear_scale</mat-icon>\r\n </mat-card-content>\r\n <span *ngIf=\"information?.currency_unit; else withoutData\">\r\n <h3 *ngIf=\"settings?.satsToBTC; else smallerUnit2\">{{BTCchannelBalance | number}} {{information?.currency_unit}}</h3>\r\n <ng-template #smallerUnit2><h3>{{channelBalance | number}} {{information?.smaller_currency_unit}}</h3></ng-template>\r\n </span>\r\n </mat-card-content>\r\n <mat-progress-bar *ngIf=\"flgLoading[3]===true || flgLoading[0]===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n <mat-divider></mat-divider>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"20\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'custom-card error-border': flgLoading[0]==='error','custom-card': true}\">\r\n <mat-card-header class=\"bg-primary\" fxLayoutAlign=\"center center\">\r\n <mat-card-title class=\"m-0 pt-2\">\r\n <h3>Chain Sync Status</h3>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content fxLayout=\"column\" fxLayoutAlign=\"center center\">\r\n <mat-card-content class=\"mt-1\">\r\n <mat-icon class=\"icon-large\">sync</mat-icon>\r\n </mat-card-content>\r\n <mat-icon *ngIf=\"information?.synced_to_chain; else notSynced\" class=\"size-30 green sync-to-chain\">check_circle</mat-icon>\r\n <ng-template #notSynced>\r\n <mat-icon class=\"size-30 red\">cancel</mat-icon>\r\n </ng-template>\r\n </mat-card-content>\r\n <mat-progress-bar *ngIf=\"flgLoading[0]===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n <mat-divider></mat-divider>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"20\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'error-border': flgLoading[1]==='error'}\">\r\n <mat-card-header>\r\n <mat-card-subtitle>\r\n <h2>Fee Report</h2>\r\n <mat-progress-bar *ngIf=\"flgLoading[1]===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div fxLayout=\"column\" class=\"pb-1\">\r\n <mat-list fxFlex=\"100\" fxLayoutAlign=\"start start\">\r\n <mat-list-item fxFlex=\"65\" fxLayoutAlign=\"start start\">Daily ({{(settings?.satsToBTC) ? information?.currency_unit : information?.smaller_currency_unit}})</mat-list-item>\r\n <mat-list-item fxFlex=\"25\" fxLayoutAlign=\"end start\">{{(settings?.satsToBTC) ? fees?.btc_day_fee_sum : fees?.day_fee_sum}}</mat-list-item>\r\n <mat-divider></mat-divider>\r\n </mat-list>\r\n <mat-list fxFlex=\"100\" fxLayoutAlign=\"start start\">\r\n <mat-list-item fxFlex=\"65\" fxLayoutAlign=\"start start\">Weekly ({{(settings?.satsToBTC) ? information?.currency_unit : information?.smaller_currency_unit}})</mat-list-item>\r\n <mat-list-item fxFlex=\"25\" fxLayoutAlign=\"end start\">{{(settings?.satsToBTC) ? fees?.btc_week_fee_sum : fees?.week_fee_sum}}</mat-list-item>\r\n <mat-divider></mat-divider>\r\n </mat-list>\r\n <mat-list fxFlex=\"100\" fxLayoutAlign=\"start start\">\r\n <mat-list-item fxFlex=\"65\" fxLayoutAlign=\"start start\">Monthly ({{(settings?.satsToBTC) ? information?.currency_unit : information?.smaller_currency_unit}})</mat-list-item>\r\n <mat-list-item fxFlex=\"25\" fxLayoutAlign=\"end start\">{{(settings?.satsToBTC) ? fees?.btc_month_fee_sum : fees?.month_fee_sum}}</mat-list-item>\r\n <mat-divider></mat-divider>\r\n </mat-list>\r\n </div>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"80\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'error-border': flgLoading[4]==='error', 'network-info-mat-card': true}\">\r\n <mat-card-header>\r\n <mat-card-subtitle>\r\n <h2>Network Information</h2>\r\n <mat-progress-bar *ngIf=\"flgLoading[4]===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n <mat-card-content perfectScrollbar class=\"overflow-x-auto\">\r\n <div fxLayout=\"column\" fxLayout.gt-sm=\"row wrap\" class=\"network-info-div pb-1\">\r\n <div fxFlex=\"33\">\r\n <mat-list>\r\n <mat-divider></mat-divider>\r\n <mat-list-item>\r\n <div class=\"info-column\" *ngIf=\"settings?.satsToBTC; else smallerUnit6\">Network Capacity ({{information?.currency_unit}})</div>\r\n <ng-template #smallerUnit6><div class=\"info-column\">Network Capacity ({{information?.smaller_currency_unit}})</div></ng-template>\r\n <div class=\"info-value\" *ngIf=\"settings?.satsToBTC; else smallerData6\">{{networkInfo?.btc_total_network_capacity | number}}</div>\r\n <ng-template #smallerData6><div class=\"info-value\">{{networkInfo?.total_network_capacity | number}}</div></ng-template>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n <mat-list-item>\r\n <div class=\"info-column\">Number of Nodes</div>\r\n <div class=\"info-value\">{{networkInfo?.num_nodes | number}}</div>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n <mat-list-item>\r\n <div class=\"info-column\">Number of Channels</div>\r\n <div class=\"info-value\">{{networkInfo?.num_channels | number}}</div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div fxFlex=\"33\">\r\n <mat-list>\r\n <mat-list-item>\r\n <div class=\"info-column\">Graph Diameter</div>\r\n <div class=\"info-value\">{{networkInfo?.graph_diameter | number}}</div>\r\n </mat-list-item>\r\n <mat-list-item>\r\n <div class=\"info-column\">Max Out Degree</div>\r\n <div class=\"info-value\">{{networkInfo?.max_out_degree | number}}</div>\r\n </mat-list-item>\r\n <mat-list-item>\r\n <div class=\"info-column\">Avg Out Degree</div>\r\n <div class=\"info-value\">{{networkInfo?.avg_out_degree | number:'1.0-2'}}</div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div fxFlex=\"33\">\r\n <mat-list>\r\n <mat-list-item>\r\n <div class=\"info-column\" *ngIf=\"settings?.satsToBTC; else smallerUnit7\">Max Channel Size ({{information?.currency_unit}})</div>\r\n <ng-template #smallerUnit7><div class=\"info-column\">Max Channel Size ({{information?.smaller_currency_unit}})</div></ng-template>\r\n <div class=\"info-value\" *ngIf=\"settings?.satsToBTC; else smallerData7\">{{networkInfo?.btc_max_channel_size | number}}</div>\r\n <ng-template #smallerData7><div class=\"info-value\">{{networkInfo?.max_channel_size | number}}</div></ng-template>\r\n </mat-list-item>\r\n <mat-list-item>\r\n <div class=\"info-column\" *ngIf=\"settings?.satsToBTC; else smallerUnit8\">Avg Channel Size ({{information?.currency_unit}})</div>\r\n <ng-template #smallerUnit8><div class=\"info-column\">Avg Channel Size ({{information?.smaller_currency_unit}})</div></ng-template>\r\n <div class=\"info-value\" *ngIf=\"settings?.satsToBTC; else smallerData8\">{{networkInfo?.btc_avg_channel_size | number}}</div>\r\n <ng-template #smallerData8><div class=\"info-value\">{{networkInfo?.avg_channel_size | number:'1.0-2'}}</div></ng-template>\r\n </mat-list-item>\r\n <mat-list-item>\r\n <div class=\"info-column\" *ngIf=\"settings?.satsToBTC; else smallerUnit9\">Min Channel Size ({{information?.currency_unit}})</div>\r\n <ng-template #smallerUnit9><div class=\"info-column\">Min Channel Size ({{information?.smaller_currency_unit}})</div></ng-template>\r\n <div class=\"info-value\" *ngIf=\"settings?.satsToBTC; else smallerData9\">{{networkInfo?.btc_min_channel_size | number}}</div>\r\n <ng-template #smallerData9><div class=\"info-value\">{{networkInfo?.min_channel_size | number}}</div></ng-template>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n </div>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n</div>\r\n<ng-template #withoutData><h3>Sats</h3></ng-template>\r\n"
/***/ }),
/***/ "./src/app/pages/home/home.component.scss":
/*!************************************************!*\
!*** ./src/app/pages/home/home.component.scss ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".network-info-mat-card {\n position: relative; }\n\n.mat-column-bytes_sent, .mat-column-bytes_recv, .mat-column-sat_sent, .mat-column-sat_recv, .mat-column-inbound, .mat-column-ping_time {\n flex: 0 0 8%;\n min-width: 80px; }\n\n@media screen and (min-width: 375px) {\n .network-info-div {\n min-width: 300px; }\n .info-column {\n flex: 1 1 65%;\n box-sizing: border-box;\n max-width: 65%; }\n .info-value {\n flex: 1 1 35%;\n max-width: 35%;\n word-break: break-word;\n align-items: flex-end;\n align-content: flex-end;\n justify-content: flex-end; } }\n\n@media screen and (min-width: 600px) {\n .network-info-div {\n min-width: 600px; }\n .info-column {\n flex: 1 1 75%;\n box-sizing: border-box;\n max-width: 75%; }\n .info-value {\n flex: 1 1 25%;\n max-width: 25%;\n word-break: break-word;\n align-items: flex-end;\n align-content: flex-end; } }\n\n@media screen and (min-width: 1024px) {\n .network-info-div {\n min-width: 740px; }\n .info-column {\n flex: 1 1 50%;\n box-sizing: border-box;\n max-width: 50%; }\n .info-value {\n flex: 1 1 50%;\n max-width: 50%;\n word-break: break-word;\n align-items: flex-end;\n align-content: flex-end; } }\n\n@media screen and (min-width: 1360px) {\n .network-info-div {\n min-width: 810px; }\n .info-column {\n flex: 1 1 60%;\n max-width: 60%;\n box-sizing: border-box; }\n .info-value {\n flex: 1 1 40%;\n max-width: 40%;\n word-break: break-word;\n align-items: flex-end;\n align-content: flex-end; } }\n\n@media screen and (min-width: 1367px) {\n .network-info-div {\n min-width: 1100px; }\n .info-column {\n flex: 1 1 44%;\n box-sizing: border-box;\n max-width: 44%; }\n .info-value {\n flex: 1 1 55%;\n max-width: 55%;\n word-break: break-word;\n align-items: flex-end;\n align-content: flex-end; } }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvaG9tZS9DOlxcV29ya3NwYWNlXFxSVExGdWxsQXBwbGljYXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxob21lXFxob21lLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsbUJBQWtCLEVBQ25COztBQUVEO0VBQ0UsYUFBWTtFQUNaLGdCQUFlLEVBQ2hCOztBQUVEO0VBQ0U7SUFDRSxpQkFBZ0IsRUFDakI7RUFDRDtJQUNFLGNBQWE7SUFDYix1QkFBc0I7SUFDdEIsZUFBYyxFQUNmO0VBQ0Q7SUFDRSxjQUFhO0lBQ2IsZUFBYztJQUNkLHVCQUFzQjtJQUN0QixzQkFBcUI7SUFDckIsd0JBQXVCO0lBQ3ZCLDBCQUF5QixFQUMxQixFQUFBOztBQUdIO0VBQ0U7SUFDRSxpQkFBZ0IsRUFDakI7RUFDRDtJQUNFLGNBQWE7SUFDYix1QkFBc0I7SUFDdEIsZUFBYyxFQUNmO0VBQ0Q7SUFDRSxjQUFhO0lBQ2IsZUFBYztJQUNkLHVCQUFzQjtJQUN0QixzQkFBcUI7SUFDckIsd0JBQXVCLEVBQ3hCLEVBQUE7O0FBR0g7RUFDRTtJQUNFLGlCQUFnQixFQUNqQjtFQUNEO0lBQ0UsY0FBYTtJQUNiLHVCQUFzQjtJQUN0QixlQUFjLEVBQ2Y7RUFDRDtJQUNFLGNBQWE7SUFDYixlQUFjO0lBQ2QsdUJBQXNCO0lBQ3RCLHNCQUFxQjtJQUNyQix3QkFBdUIsRUFDeEIsRUFBQTs7QUFHSDtFQUNFO0lBQ0UsaUJBQWdCLEVBQ2pCO0VBQ0Q7SUFDRSxjQUFhO0lBQ2IsZUFBYztJQUNkLHVCQUFzQixFQUN2QjtFQUNEO0lBQ0UsY0FBYTtJQUNiLGVBQWM7SUFDZCx1QkFBc0I7SUFDdEIsc0JBQXFCO0lBQ3JCLHdCQUF1QixFQUN4QixFQUFBOztBQUdIO0VBQ0U7SUFDRSxrQkFBaUIsRUFDbEI7RUFDRDtJQUNFLGNBQWE7SUFDYix1QkFBc0I7SUFDdEIsZUFBYyxFQUNmO0VBQ0Q7SUFDRSxjQUFhO0lBQ2IsZUFBYztJQUNkLHVCQUFzQjtJQUN0QixzQkFBcUI7SUFDckIsd0JBQXVCLEVBQ3hCLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9ob21lL2hvbWUuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV0d29yay1pbmZvLW1hdC1jYXJkIHtcclxuICBwb3NpdGlvbjogcmVsYXRpdmU7IFxyXG59XHJcblxyXG4ubWF0LWNvbHVtbi1ieXRlc19zZW50LCAubWF0LWNvbHVtbi1ieXRlc19yZWN2LCAubWF0LWNvbHVtbi1zYXRfc2VudCwgLm1hdC1jb2x1bW4tc2F0X3JlY3YsIC5tYXQtY29sdW1uLWluYm91bmQsIC5tYXQtY29sdW1uLXBpbmdfdGltZSB7XHJcbiAgZmxleDogMCAwIDglO1xyXG4gIG1pbi13aWR0aDogODBweDtcclxufVxyXG5cclxuQG1lZGlhIHNjcmVlbiBhbmQgKG1pbi13aWR0aDogMzc1cHgpIHtcclxuICAubmV0d29yay1pbmZvLWRpdiB7XHJcbiAgICBtaW4td2lkdGg6IDMwMHB4O1xyXG4gIH1cclxuICAuaW5mby1jb2x1bW4ge1xyXG4gICAgZmxleDogMSAxIDY1JTtcclxuICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XHJcbiAgICBtYXgtd2lkdGg6IDY1JTtcclxuICB9XHJcbiAgLmluZm8tdmFsdWUge1xyXG4gICAgZmxleDogMSAxIDM1JTtcclxuICAgIG1heC13aWR0aDogMzUlO1xyXG4gICAgd29yZC1icmVhazogYnJlYWstd29yZDtcclxuICAgIGFsaWduLWl0ZW1zOiBmbGV4LWVuZDtcclxuICAgIGFsaWduLWNvbnRlbnQ6IGZsZXgtZW5kO1xyXG4gICAganVzdGlmeS1jb250ZW50OiBmbGV4LWVuZDtcclxuICB9XHJcbn1cclxuXHJcbkBtZWRpYSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDYwMHB4KSB7XHJcbiAgLm5ldHdvcmstaW5mby1kaXYge1xyXG4gICAgbWluLXdpZHRoOiA2MDBweDtcclxuICB9XHJcbiAgLmluZm8tY29sdW1uIHtcclxuICAgIGZsZXg6IDEgMSA3NSU7XHJcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xyXG4gICAgbWF4LXdpZHRoOiA3NSU7XHJcbiAgfVxyXG4gIC5pbmZvLXZhbHVlIHtcclxuICAgIGZsZXg6IDEgMSAyNSU7XHJcbiAgICBtYXgtd2lkdGg6IDI1JTtcclxuICAgIHdvcmQtYnJlYWs6IGJyZWFrLXdvcmQ7XHJcbiAgICBhbGlnbi1pdGVtczogZmxleC1lbmQ7XHJcbiAgICBhbGlnbi1jb250ZW50OiBmbGV4LWVuZDtcclxuICB9XHJcbn1cclxuXHJcbkBtZWRpYSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDEwMjRweCkge1xyXG4gIC5uZXR3b3JrLWluZm8tZGl2IHtcclxuICAgIG1pbi13aWR0aDogNzQwcHg7XHJcbiAgfVxyXG4gIC5pbmZvLWNvbHVtbiB7XHJcbiAgICBmbGV4OiAxIDEgNTAlO1xyXG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcclxuICAgIG1heC13aWR0aDogNTAlO1xyXG4gIH1cclxuICAuaW5mby12YWx1ZSB7XHJcbiAgICBmbGV4OiAxIDEgNTAlO1xyXG4gICAgbWF4LXdpZHRoOiA1MCU7XHJcbiAgICB3b3JkLWJyZWFrOiBicmVhay13b3JkO1xyXG4gICAgYWxpZ24taXRlbXM6IGZsZXgtZW5kO1xyXG4gICAgYWxpZ24tY29udGVudDogZmxleC1lbmQ7XHJcbiAgfVxyXG59XHJcblxyXG5AbWVkaWEgc2NyZWVuIGFuZCAobWluLXdpZHRoOiAxMzYwcHgpIHtcclxuICAubmV0d29yay1pbmZvLWRpdiB7XHJcbiAgICBtaW4td2lkdGg6IDgxMHB4O1xyXG4gIH1cclxuICAuaW5mby1jb2x1bW4ge1xyXG4gICAgZmxleDogMSAxIDYwJTtcclxuICAgIG1heC13aWR0aDogNjAlO1xyXG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcclxuICB9XHJcbiAgLmluZm8tdmFsdWUge1xyXG4gICAgZmxleDogMSAxIDQwJTtcclxuICAgIG1heC13aWR0aDogNDAlO1xyXG4gICAgd29yZC1icmVhazogYnJlYWstd29yZDtcclxuICAgIGFsaWduLWl0ZW1zOiBmbGV4LWVuZDtcclxuICAgIGFsaWduLWNvbnRlbnQ6IGZsZXgtZW5kO1xyXG4gIH1cclxufVxyXG5cclxuQG1lZGlhIHNjcmVlbiBhbmQgKG1pbi13aWR0aDogMTM2N3B4KSB7XHJcbiAgLm5ldHdvcmstaW5mby1kaXYge1xyXG4gICAgbWluLXdpZHRoOiAxMTAwcHg7XHJcbiAgfVxyXG4gIC5pbmZvLWNvbHVtbiB7XHJcbiAgICBmbGV4OiAxIDEgNDQlO1xyXG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcclxuICAgIG1heC13aWR0aDogNDQlO1xyXG4gIH1cclxuICAuaW5mby12YWx1ZSB7XHJcbiAgICBmbGV4OiAxIDEgNTUlO1xyXG4gICAgbWF4LXdpZHRoOiA1NSU7XHJcbiAgICB3b3JkLWJyZWFrOiBicmVhay13b3JkO1xyXG4gICAgYWxpZ24taXRlbXM6IGZsZXgtZW5kO1xyXG4gICAgYWxpZ24tY29udGVudDogZmxleC1lbmQ7XHJcbiAgfVxyXG59XHJcbiJdfQ== */"
/***/ }),
/***/ "./src/app/pages/home/home.component.ts":
/*!**********************************************!*\
!*** ./src/app/pages/home/home.component.ts ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var rtl_service_1 = __webpack_require__(/*! ../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var HomeComponent = /** @class */ (function () {
// 0: Info, 1: Fee, 2: Wallet, 3: Channel, 4: Network, 5: Settings
function HomeComponent(rtlService, logger, router) {
this.rtlService = rtlService;
this.logger = logger;
this.router = router;
this.information = {};
this.activeChannels = 0;
this.remainder = 0;
this.totalBalance = '';
this.channelBalance = '';
this.BTCtotalBalance = '';
this.BTCchannelBalance = '';
this.networkInfo = {};
this.flgLoading = [true, true, true, true, true]; // 0: Info, 1: Fee, 2: Wallet, 3: Channel, 4: Network
this.unsub = [new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject()];
}
HomeComponent.prototype.ngOnInit = function () {
var _this = this;
this.settings = __assign({}, this.rtlService.getUISettings());
if (undefined === this.information.currency_unit) {
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.flgLoading[0] = true;
this.rtlService.getInfo();
}
else {
this.flgLoading[0] = false;
}
}
else {
this.flgLoading[0] = false;
}
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.unsub[0]))
.subscribe(function (data) {
_this.flgLoading[0] = false;
if (data.error) {
_this.logger.info('Redirecting to Unlock');
_this.router.navigate(['/start']);
return;
}
_this.logger.info(data);
_this.information = data;
}, function (err) {
_this.logger.error(err);
_this.flgLoading[0] = 'error';
});
this.rtlService.getFees()
.pipe(operators_1.takeUntil(this.unsub[1]))
.subscribe(function (fees) {
_this.flgLoading[1] = false;
_this.fees = (undefined === fees) ? {} : fees;
_this.logger.info(_this.fees);
}, function (err) {
_this.logger.error(err);
_this.flgLoading[1] = 'error';
});
this.rtlService.getBalance('blockchain')
.pipe(operators_1.takeUntil(this.unsub[2]))
.subscribe(function (data) {
_this.flgLoading[2] = false;
_this.totalBalance = (undefined === data.total_balance) ? 0 : data.total_balance;
_this.BTCtotalBalance = (undefined === data.btc_total_balance) ? 0 : data.btc_total_balance;
_this.logger.info(_this.totalBalance);
}, function (err) {
_this.logger.error(err);
_this.flgLoading[2] = 'error';
});
this.rtlService.getBalance('channels')
.pipe(operators_1.takeUntil(this.unsub[3]))
.subscribe(function (data) {
_this.flgLoading[3] = false;
_this.channelBalance = (undefined === data.balance) ? 0 : data.balance;
_this.BTCchannelBalance = (undefined === data.btc_balance) ? 0 : data.btc_balance;
_this.logger.info(_this.channelBalance);
}, function (err) {
_this.logger.error(err);
_this.flgLoading[3] = 'error';
});
this.rtlService.getNetworkInfo()
.pipe(operators_1.takeUntil(this.unsub[4]))
.subscribe(function (data) {
_this.flgLoading[4] = false;
_this.networkInfo = (undefined === data) ? {} : data;
_this.logger.info(_this.networkInfo);
}, function (err) {
_this.logger.error(err);
_this.flgLoading[4] = 'error';
});
this.rtlService.UIsettingsUpdated
.pipe(operators_1.takeUntil(this.unsub[5]))
.subscribe(function (settings) {
_this.settings = settings;
});
};
HomeComponent.prototype.ngOnDestroy = function () {
this.unsub.forEach(function (completeSub) {
completeSub.next();
completeSub.complete();
});
};
HomeComponent = __decorate([
core_1.Component({
selector: 'rtl-home',
template: __webpack_require__(/*! ./home.component.html */ "./src/app/pages/home/home.component.html"),
styles: [__webpack_require__(/*! ./home.component.scss */ "./src/app/pages/home/home.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService, router_1.Router])
], HomeComponent);
return HomeComponent;
}());
exports.HomeComponent = HomeComponent;
/***/ }),
/***/ "./src/app/pages/invoices/invoices.component.html":
/*!********************************************************!*\
!*** ./src/app/pages/invoices/invoices.component.html ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\">\r\n <div class=\"padding-gap\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-subtitle>\r\n <h2>Invoices</h2>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n <mat-card-content>\r\n Work In Progress!\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n </div>"
/***/ }),
/***/ "./src/app/pages/invoices/invoices.component.scss":
/*!********************************************************!*\
!*** ./src/app/pages/invoices/invoices.component.scss ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL2ludm9pY2VzL2ludm9pY2VzLmNvbXBvbmVudC5zY3NzIn0= */"
/***/ }),
/***/ "./src/app/pages/invoices/invoices.component.ts":
/*!******************************************************!*\
!*** ./src/app/pages/invoices/invoices.component.ts ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var InvoicesComponent = /** @class */ (function () {
function InvoicesComponent() {
}
InvoicesComponent.prototype.ngOnInit = function () {
};
InvoicesComponent = __decorate([
core_1.Component({
selector: 'rtl-invoices',
template: __webpack_require__(/*! ./invoices.component.html */ "./src/app/pages/invoices/invoices.component.html"),
styles: [__webpack_require__(/*! ./invoices.component.scss */ "./src/app/pages/invoices/invoices.component.scss")]
}),
__metadata("design:paramtypes", [])
], InvoicesComponent);
return InvoicesComponent;
}());
exports.InvoicesComponent = InvoicesComponent;
/***/ }),
/***/ "./src/app/pages/navigation/horizontal-navigation/horizontal-navigation.component.html":
/*!*********************************************************************************************!*\
!*** ./src/app/pages/navigation/horizontal-navigation/horizontal-navigation.component.html ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div *ngFor=\"let menuNode of menuNodes\">\n <button mat-button *ngIf=\"undefined === menuNode.children\" class=\"horizontal-button\" routerLinkActive=\"h-active-link\" routerLink=\"{{menuNode.link}}\" matTooltip=\"{{menuNode.name}}\" matTooltipPosition=\"above\">\n <mat-icon class=\"mat-icon-36\">{{menuNode.icon}}</mat-icon>\n </button>\n <div *ngIf=\"undefined !== menuNode.children\" fxLayoutAlign=\"center center\">\n <button mat-button class=\"horizontal-button\" matTooltip=\"{{menuNode.name}}\" matTooltipPosition=\"above\">\n <mat-icon [matMenuTriggerFor]=\"childMenu\" class=\"mat-icon-36\">{{menuNode.icon}}</mat-icon>\n </button>\n <mat-menu #childMenu=\"matMenu\" xPosition=\"before\" overlapTrigger=\"false\" class=\"child-menu\">\n <div *ngFor=\"let childNode of menuNode.children\">\n <button mat-menu-item fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <button mat-button class=\"horizontal-button bg-primary p-0\" routerLinkActive=\"h-active-link\" routerLink=\"{{childNode.link}}\">\n <mat-icon matTooltip=\"{{childNode.name}}\" matTooltipPosition=\"after\" class=\"mat-icon-36\">{{childNode.icon}}</mat-icon>\n </button>\n </button>\n </div>\n </mat-menu>\n </div>\n </div>\n</div>\n"
/***/ }),
/***/ "./src/app/pages/navigation/horizontal-navigation/horizontal-navigation.component.scss":
/*!*********************************************************************************************!*\
!*** ./src/app/pages/navigation/horizontal-navigation/horizontal-navigation.component.scss ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".mat-menu-panel.child-menu {\n min-width: 88px;\n width: 88px;\n border-radius: 0;\n margin-left: 30%;\n margin-top: 6%; }\n .mat-menu-panel.child-menu .mat-menu-content .mat-menu-item {\n padding: 0;\n margin-top: -3px; }\n .mat-menu-panel.child-menu .mat-menu-content .mat-menu-item .mat-icon {\n margin-right: 0; }\n .mat-menu-panel.child-menu .mat-menu-content .mat-menu-item button {\n border-radius: 0; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvbmF2aWdhdGlvbi9ob3Jpem9udGFsLW5hdmlnYXRpb24vQzpcXFdvcmtzcGFjZVxcUlRMRnVsbEFwcGxpY2F0aW9uL3NyY1xcYXBwXFxwYWdlc1xcbmF2aWdhdGlvblxcaG9yaXpvbnRhbC1uYXZpZ2F0aW9uXFxob3Jpem9udGFsLW5hdmlnYXRpb24uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDQyxnQkFBZTtFQUNmLFlBQVU7RUFDVixpQkFBZ0I7RUFDaEIsaUJBQWdCO0VBQ2hCLGVBQWMsRUFhZDtFQWxCRDtJQVFHLFdBQVU7SUFDVixpQkFBZ0IsRUFPaEI7RUFoQkg7TUFXSSxnQkFBZSxFQUNmO0VBWko7TUFjSSxpQkFBZ0IsRUFDaEIiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9uYXZpZ2F0aW9uL2hvcml6b250YWwtbmF2aWdhdGlvbi9ob3Jpem9udGFsLW5hdmlnYXRpb24uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubWF0LW1lbnUtcGFuZWwuY2hpbGQtbWVudSB7XHJcblx0bWluLXdpZHRoOiA4OHB4O1xyXG5cdHdpZHRoOjg4cHg7XHJcblx0Ym9yZGVyLXJhZGl1czogMDtcclxuXHRtYXJnaW4tbGVmdDogMzAlO1xyXG5cdG1hcmdpbi10b3A6IDYlO1xyXG5cdC5tYXQtbWVudS1jb250ZW50IHtcclxuXHRcdC5tYXQtbWVudS1pdGVtIHtcclxuXHRcdFx0cGFkZGluZzogMDtcclxuXHRcdFx0bWFyZ2luLXRvcDogLTNweDtcclxuXHRcdFx0Lm1hdC1pY29uIHtcclxuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6IDA7XHJcblx0XHRcdH1cclxuXHRcdFx0YnV0dG9uIHtcclxuXHRcdFx0XHRib3JkZXItcmFkaXVzOiAwO1xyXG5cdFx0XHR9XHJcblx0XHR9XHJcblx0fVxyXG59XHJcbiJdfQ== */"
/***/ }),
/***/ "./src/app/pages/navigation/horizontal-navigation/horizontal-navigation.component.ts":
/*!*******************************************************************************************!*\
!*** ./src/app/pages/navigation/horizontal-navigation/horizontal-navigation.component.ts ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var logger_service_1 = __webpack_require__(/*! ../../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var navMenu_1 = __webpack_require__(/*! ../../../shared/models/navMenu */ "./src/app/shared/models/navMenu.ts");
var HorizontalNavigationComponent = /** @class */ (function () {
function HorizontalNavigationComponent(logger) {
this.logger = logger;
this.menuNodes = [];
this.menuNodes = navMenu_1.MENU_DATA.children;
}
HorizontalNavigationComponent.prototype.ngOnInit = function () {
};
HorizontalNavigationComponent = __decorate([
core_1.Component({
selector: 'rtl-horizontal-navigation',
template: __webpack_require__(/*! ./horizontal-navigation.component.html */ "./src/app/pages/navigation/horizontal-navigation/horizontal-navigation.component.html"),
styles: [__webpack_require__(/*! ./horizontal-navigation.component.scss */ "./src/app/pages/navigation/horizontal-navigation/horizontal-navigation.component.scss")],
encapsulation: core_1.ViewEncapsulation.None
}),
__metadata("design:paramtypes", [logger_service_1.LoggerService])
], HorizontalNavigationComponent);
return HorizontalNavigationComponent;
}());
exports.HorizontalNavigationComponent = HorizontalNavigationComponent;
/***/ }),
/***/ "./src/app/pages/navigation/side-navigation/side-navigation.component.html":
/*!*********************************************************************************!*\
!*** ./src/app/pages/navigation/side-navigation/side-navigation.component.html ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<mat-toolbar color=\"primary\" [fxLayoutAlign] = \"settings.menuType === 'Mini' ? 'center center' : 'space-between center'\">\n <a *ngIf=\"settings.menuType === 'Mini'\" routerLink=\"/home\" class=\"logo padding-gap-x mat-elevation-z6\">R</a>\n <a *ngIf=\"settings.menuType !== 'Mini'\" routerLink=\"/home\" class=\"logo\">RTL</a>\n <svg *ngIf=\"settings.menuType !== 'Mini'\" style=\"width:24px;height:24px;cursor:pointer;\" viewBox=\"0 0 24 24\"\n (click)=\"settings.flgSidenavPinned = !settings.flgSidenavPinned\">\n <path fill=\"currentColor\" *ngIf=\"!settings.flgSidenavPinned\" d=\"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z\" />\n <path fill=\"currentColor\" *ngIf=\"settings.flgSidenavPinned\" d=\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\" />\n </svg>\n</mat-toolbar>\n<div fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"lnd-info pl-2\" *ngIf=\"settings.menuType !== 'Mini'\">\n <div fxLayout=\"column\">\n <p class=\"name\">Alias: <mat-spinner [diameter]=\"20\" *ngIf=\"flgLoading\" class=\"inline-spinner\"></mat-spinner>{{information?.alias}}</p>\n <p *ngIf=\"information?.testnet; else mainnet\">Chain: <mat-spinner [diameter]=\"20\" *ngIf=\"flgLoading\" class=\"inline-spinner\"></mat-spinner>{{(undefined === information?.chains) ? '' : (information?.chains[0] | titlecase)}}<span *ngIf=\"undefined !== information.testnet\"> [Testnet]</span></p>\n <ng-template #mainnet><p>Chain: <mat-spinner [diameter]=\"20\" *ngIf=\"flgLoading\" class=\"inline-spinner\"></mat-spinner>{{(undefined === information?.chains) ? '' : (information?.chains[0] | titlecase)}}<span *ngIf=\"!flgLoading && undefined === information.testnet\"> [Mainnet]</span></p></ng-template>\n <p class=\"name\">LND Version: <mat-spinner [diameter]=\"20\" *ngIf=\"flgLoading\" class=\"inline-spinner\"></mat-spinner>{{information?.version}}</p>\n </div>\n</div>\n\n<mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" *ngIf=\"settings.menuType !== 'Compact'\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding [matTreeNodePaddingIndent]=\"settings.menuType === 'Mini' ? 28 : 40\" routerLinkActive=\"active-link\" routerLink=\"{{node.link}}\">\n <mat-icon class=\"mr-1\" matTooltip=\"{{node.name}}\" matTooltipPosition=\"right\" [matTooltipDisabled]=\"settings.menuType !== 'Mini'\">{{node.icon}}</mat-icon><span *ngIf=\"settings.menuType !== 'Mini'\">{{node.name}}</span>\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding>\n <div fxLayout=\"row\" fxFlex=\"100\" fxLayoutAlign=\"start center\" matTreeNodeToggle>\n <div fxFlex=\"89\" fxLayoutAlign=\"start center\">\n <mat-icon class=\"mr-1\" matTooltip=\"{{node.name}}\" matTooltipPosition=\"right\" [matTooltipDisabled]=\"settings.menuType !== 'Mini'\">{{node.icon}}</mat-icon><span *ngIf=\"settings.menuType !== 'Mini'\">{{node.name}}</span>\n </div>\n <button fxFlex=\"11\" fxLayoutAlign=\"end center\" mat-icon-button [attr.aria-label]=\"'toggle ' + node.name\" fxLayoutAlign=\"end center\">\n <mat-icon class=\"mat-icon-rtl-mirror\"> {{treeControl.isExpanded(node) ? 'arrow_drop_up' : 'arrow_drop_down'}}</mat-icon>\n </button>\n </div>\n </mat-tree-node>\n</mat-tree>\n\n<mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" *ngIf=\"settings.menuType === 'Compact'\">\n <mat-tree-node fxLayout=\"column\" fxLayoutAlign=\"center center\" *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding matTreeNodePaddingIndent=\"60\" routerLinkActive=\"active-link\" routerLink=\"{{node.link}}\">\n <mat-icon class=\"mat-icon-36\">{{node.icon}}</mat-icon>\n <span>{{node.name}}</span>\n </mat-tree-node>\n\n <mat-tree-node fxLayout=\"row\" *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding>\n <div class=\"ml-8\" fxLayout=\"column\" fxLayoutAlign=\"center center\" matTreeNodeToggle>\n <mat-icon class=\"mat-icon-36\">{{node.icon}}</mat-icon>\n <span>{{node.name}}</span>\n </div>\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" matTreeNodeToggle>\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.name\">\n <mat-icon class=\"mat-icon-rtl-mirror\"> {{treeControl.isExpanded(node) ? 'arrow_drop_up' : 'arrow_drop_down'}}</mat-icon>\n </button>\n </div>\n </mat-tree-node>\n</mat-tree>\n "
/***/ }),
/***/ "./src/app/pages/navigation/side-navigation/side-navigation.component.scss":
/*!*********************************************************************************!*\
!*** ./src/app/pages/navigation/side-navigation/side-navigation.component.scss ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL25hdmlnYXRpb24vc2lkZS1uYXZpZ2F0aW9uL3NpZGUtbmF2aWdhdGlvbi5jb21wb25lbnQuc2NzcyJ9 */"
/***/ }),
/***/ "./src/app/pages/navigation/side-navigation/side-navigation.component.ts":
/*!*******************************************************************************!*\
!*** ./src/app/pages/navigation/side-navigation/side-navigation.component.ts ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var tree_1 = __webpack_require__(/*! @angular/cdk/tree */ "./node_modules/@angular/cdk/esm5/tree.es5.js");
var tree_2 = __webpack_require__(/*! @angular/material/tree */ "./node_modules/@angular/material/esm5/tree.es5.js");
var rtl_service_1 = __webpack_require__(/*! ../../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var navMenu_1 = __webpack_require__(/*! ../../../shared/models/navMenu */ "./src/app/shared/models/navMenu.ts");
var SideNavigationComponent = /** @class */ (function () {
function SideNavigationComponent(rtlService, logger) {
this.rtlService = rtlService;
this.logger = logger;
this.information = {};
this.flgLoading = true;
this.unsubscribe = [new rxjs_1.Subject(), new rxjs_1.Subject()];
this.settings = this.rtlService.getUISettings();
this.treeFlattener = new tree_2.MatTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
this.treeControl = new tree_1.FlatTreeControl(this.getLevel, this.isExpandable);
this.dataSource = new tree_2.MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
this.dataSource.data = navMenu_1.MENU_DATA.children;
}
SideNavigationComponent.prototype.ngOnInit = function () {
var _this = this;
this.information = this.rtlService.readInformation();
if (undefined !== this.information.currency_unit) {
this.flgLoading = false;
}
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.unsubscribe[0]))
.subscribe(function (data) {
_this.flgLoading = false;
_this.information = data;
_this.logger.info('Server Information Updated');
_this.logger.info(_this.information);
});
this.rtlService.UIsettingsUpdated
.pipe(operators_1.takeUntil(this.unsubscribe[1]))
.subscribe(function (settings) {
_this.settings = settings;
_this.logger.info(_this.settings);
});
};
SideNavigationComponent.prototype.transformer = function (node, level) { return new navMenu_1.FlatMenuNode(!!node.children, level, node.name, node.icon, node.link); };
SideNavigationComponent.prototype.getLevel = function (node) { return node.level; };
SideNavigationComponent.prototype.isExpandable = function (node) { return node.expandable; };
SideNavigationComponent.prototype.getChildren = function (node) { return rxjs_1.of(node.children); };
SideNavigationComponent.prototype.hasChild = function (_, _nodeData) { return _nodeData.expandable; };
SideNavigationComponent.prototype.ngOnDestroy = function () {
this.unsubscribe.forEach(function (completeSub) {
completeSub.next();
completeSub.complete();
});
};
SideNavigationComponent = __decorate([
core_1.Component({
selector: 'rtl-side-navigation',
template: __webpack_require__(/*! ./side-navigation.component.html */ "./src/app/pages/navigation/side-navigation/side-navigation.component.html"),
styles: [__webpack_require__(/*! ./side-navigation.component.scss */ "./src/app/pages/navigation/side-navigation/side-navigation.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService])
], SideNavigationComponent);
return SideNavigationComponent;
}());
exports.SideNavigationComponent = SideNavigationComponent;
/***/ }),
/***/ "./src/app/pages/navigation/top-menu/top-menu.component.html":
/*!*******************************************************************!*\
!*** ./src/app/pages/navigation/top-menu/top-menu.component.html ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<mat-menu #topMenu=\"matMenu\" [overlapTrigger]=\"false\" class=\"top-menu\">\n <mat-toolbar color=\"primary\">\n <div fxLayout=\"column\" fxLayoutAlign=\"start start\" class=\"info-block\">\n <p class=\"name\">Alias: <mat-spinner [diameter]=\"20\" color=\"accent\" *ngIf=\"flgLoading\" class=\"inline-spinner\"></mat-spinner>{{information?.alias}}</p>\n <p fxLayoutAlign=\"start start\" *ngIf=\"information.testnet; else mainnet\">Chain: <mat-spinner [diameter]=\"20\"\n color=\"accent\" *ngIf=\"flgLoading\" class=\"inline-spinner\"></mat-spinner>{{(undefined === information?.chains)\n ? '' : (information?.chains[0] | titlecase)}}<span *ngIf=\"undefined !== information.testnet\"> [Testnet]</span></p>\n <ng-template #mainnet>\n <p>Chain: <mat-spinner [diameter]=\"20\" color=\"accent\" *ngIf=\"flgLoading\" class=\"inline-spinner\"></mat-spinner>{{(undefined\n === information?.chains) ? '' : (information?.chains[0] | titlecase)}}<span *ngIf=\"!flgLoading && undefined === information.testnet\">\n [Mainnet]</span></p>\n </ng-template>\n <p class=\"name\">LND Version: <mat-spinner [diameter]=\"20\" color=\"accent\" *ngIf=\"flgLoading\" class=\"inline-spinner\"></mat-spinner>{{information?.version}}</p>\n </div>\n </mat-toolbar>\n <a mat-menu-item routerLink=\"/start\">\n <mat-icon>lock_open</mat-icon>\n <span routerLink=\"/start\">Unlock Wallet</span>\n </a>\n <a mat-menu-item routerLink=\"/sconfig\">\n <mat-icon>perm_data_setting</mat-icon>\n <span routerLink=\"/sconfig\">Node Config</span>\n </a>\n <a mat-menu-item routerLink=\"/help\">\n <mat-icon>help</mat-icon>\n <span routerLink=\"/help\">Help</span>\n </a>\n <p mat-menu-item>\n <mat-icon>publish</mat-icon>\n <span>Version: {{version}}</span>\n </p>\n</mat-menu>\n\n<button mat-icon-button [matMenuTriggerFor]=\"topMenu\">\n <mat-icon>account_circle</mat-icon>\n</button>\n"
/***/ }),
/***/ "./src/app/pages/navigation/top-menu/top-menu.component.scss":
/*!*******************************************************************!*\
!*** ./src/app/pages/navigation/top-menu/top-menu.component.scss ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".mat-menu-panel.top-menu .mat-toolbar, .mat-menu-panel.top-menu .mat-toolbar-row {\n height: 100px !important;\n padding: 0 16px !important; }\n\n.mat-menu-panel.top-menu .info-block {\n width: 230px; }\n\n.mat-menu-panel.top-menu .info-block p {\n font-size: 16px;\n line-height: 22px;\n text-align: center; }\n\n.mat-menu-panel.top-menu .mat-menu-item {\n height: 36px;\n line-height: 36px; }\n\n.mat-menu-panel.top-menu .mat-menu-content p {\n cursor: default; }\n\n.mat-menu-panel.top-menu .mat-menu-content p mat-icon, .mat-menu-panel.top-menu .mat-menu-content p span, .mat-menu-panel.top-menu .mat-menu-content p div {\n cursor: default; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvbmF2aWdhdGlvbi90b3AtbWVudS9DOlxcV29ya3NwYWNlXFxSVExGdWxsQXBwbGljYXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxuYXZpZ2F0aW9uXFx0b3AtbWVudVxcdG9wLW1lbnUuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFFSSx5QkFBd0I7RUFDeEIsMkJBQTBCLEVBQzNCOztBQUpIO0VBTUksYUFBWSxFQU1iOztBQVpIO0lBUU0sZ0JBQWU7SUFDZixrQkFBaUI7SUFDakIsbUJBQWtCLEVBQ25COztBQVhMO0VBY0ksYUFBWTtFQUNaLGtCQUFpQixFQUNsQjs7QUFoQkg7RUFtQk0sZ0JBQWUsRUFJaEI7O0FBdkJMO0lBcUJRLGdCQUFlLEVBQ2hCIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvbmF2aWdhdGlvbi90b3AtbWVudS90b3AtbWVudS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5tYXQtbWVudS1wYW5lbC50b3AtbWVudXtcclxuICAubWF0LXRvb2xiYXIsIC5tYXQtdG9vbGJhci1yb3d7XHJcbiAgICBoZWlnaHQ6IDEwMHB4ICFpbXBvcnRhbnQ7XHJcbiAgICBwYWRkaW5nOiAwIDE2cHggIWltcG9ydGFudDtcclxuICB9XHJcbiAgLmluZm8tYmxvY2t7XHJcbiAgICB3aWR0aDogMjMwcHg7XHJcbiAgICBwe1xyXG4gICAgICBmb250LXNpemU6IDE2cHg7XHJcbiAgICAgIGxpbmUtaGVpZ2h0OiAyMnB4O1xyXG4gICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XHJcbiAgICB9XHJcbiAgfVxyXG4gIC5tYXQtbWVudS1pdGVte1xyXG4gICAgaGVpZ2h0OiAzNnB4O1xyXG4gICAgbGluZS1oZWlnaHQ6IDM2cHg7XHJcbiAgfVxyXG4gIC5tYXQtbWVudS1jb250ZW50IHtcclxuICAgIHB7XHJcbiAgICAgIGN1cnNvcjogZGVmYXVsdDtcclxuICAgICAgbWF0LWljb24sIHNwYW4sIGRpdiB7XHJcbiAgICAgICAgY3Vyc29yOiBkZWZhdWx0O1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ== */"
/***/ }),
/***/ "./src/app/pages/navigation/top-menu/top-menu.component.ts":
/*!*****************************************************************!*\
!*** ./src/app/pages/navigation/top-menu/top-menu.component.ts ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var Subject_1 = __webpack_require__(/*! rxjs/Subject */ "./node_modules/rxjs-compat/_esm5/Subject.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var logger_service_1 = __webpack_require__(/*! ../../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var rtl_service_1 = __webpack_require__(/*! ../../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var environment_1 = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
var TopMenuComponent = /** @class */ (function () {
function TopMenuComponent(rtlService, logger, router) {
this.rtlService = rtlService;
this.logger = logger;
this.router = router;
this.version = '';
this.settingsSub = new Subject_1.Subject();
this.infoSub = new Subject_1.Subject();
this.information = {};
this.flgLoading = true;
this.version = environment_1.environment.VERSION;
}
TopMenuComponent.prototype.ngOnInit = function () {
var _this = this;
this.information = this.rtlService.readInformation();
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.infoSub))
.subscribe(function (data) {
_this.flgLoading = false;
_this.information = data;
_this.logger.info('Server Information Updated');
_this.logger.info(_this.information);
});
this.rtlService.UIsettingsUpdated
.pipe(operators_1.takeUntil(this.settingsSub))
.subscribe(function (settings) {
_this.settings = settings;
});
};
TopMenuComponent.prototype.ngOnDestroy = function () {
this.infoSub.next();
this.infoSub.complete();
};
TopMenuComponent = __decorate([
core_1.Component({
selector: 'rtl-top-menu',
template: __webpack_require__(/*! ./top-menu.component.html */ "./src/app/pages/navigation/top-menu/top-menu.component.html"),
styles: [__webpack_require__(/*! ./top-menu.component.scss */ "./src/app/pages/navigation/top-menu/top-menu.component.scss")],
encapsulation: core_1.ViewEncapsulation.None
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService, router_1.Router])
], TopMenuComponent);
return TopMenuComponent;
}());
exports.TopMenuComponent = TopMenuComponent;
/***/ }),
/***/ "./src/app/pages/payments/list-payments/list-payments.component.html":
/*!***************************************************************************!*\
!*** ./src/app/pages/payments/list-payments/list-payments.component.html ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\">\n <div class=\"padding-gap\">\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>\n <h2>Payments</h2>\n <mat-progress-bar *ngIf=\"flgLoading[0]===true\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <mat-table #table perfectScrollbar [dataSource]=\"payments\" matSort [ngClass]=\"{'mat-elevation-z8 overflow-auto error-border': flgLoading[0]==='error','mat-elevation-z8 overflow-auto': true}\">\n <ng-container matColumnDef=\"creation_date_str\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>Creation Date</mat-header-cell>\n <mat-cell *matCellDef=\"let payment\">{{payment?.creation_date_str}}</mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"payment_hash\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>Payment Hash</mat-header-cell>\n <mat-cell *matCellDef=\"let payment\" matTooltip=\"{{payment?.payment_hash}}\" [matTooltipPosition]=\"position\" matTooltipClass=\"wide-tooltip\">\n <div class=\"flex-ellipsis\">{{payment?.payment_hash}}</div>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"fee\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\">Fee</mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let payment\">{{payment?.fee | number}}</mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"value_msat\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\">Value MSat</mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let payment\">{{payment?.value_msat | number}}</mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"value_sat\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\">Value Sat</mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" fxLayoutAlign=\"end center\" *matCellDef=\"let payment\">{{payment?.value_sat | number}}</mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"value\">\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\">Value</mat-header-cell>\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let payment\">{{payment?.value | number}}</mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"payment_preimage\">\n <mat-header-cell class=\"pl-4\" *matHeaderCellDef mat-sort-header>Payment Pre Image</mat-header-cell>\n <mat-cell class=\"pl-4\" *matCellDef=\"let payment\" matTooltip=\"{{payment?.payment_preimage}}\" [matTooltipPosition]=\"position\" matTooltipClass=\"wide-tooltip\">\n <div class=\"flex-ellipsis\">{{payment?.payment_preimage}}</div>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"path\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>Path</mat-header-cell>\n <mat-cell *matCellDef=\"let payment\">\n <mat-accordion displayMode=\"flat\" class=\"w-100\">\n <mat-expansion-panel class=\"mat-elevation-z\">\n <mat-expansion-panel-header class=\"p-0\">\n <mat-panel-title>\n {{payment?.path.length || 0}} Hops\n </mat-panel-title>\n </mat-expansion-panel-header>\n <ul *ngFor=\"let path of payment?.path\" class=\"flex-ellipsis p-0 ml-minus-24px\" matTooltip=\"{{path}}\" [matTooltipPosition]=\"position\" matTooltipClass=\"wide-tooltip\">{{path}}</ul>\n </mat-expansion-panel>\n </mat-accordion>\n </mat-cell>\n </ng-container>\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row fxLayoutAlign=\"stretch stretch\" *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\n </mat-table>\n </mat-card-content>\n </mat-card>\n </div>\n</div>\n"
/***/ }),
/***/ "./src/app/pages/payments/list-payments/list-payments.component.scss":
/*!***************************************************************************!*\
!*** ./src/app/pages/payments/list-payments/list-payments.component.scss ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".mat-column-fee {\n flex: 0 0 4%;\n min-width: 40px; }\n\n.mat-column-path, .mat-column-value {\n flex: 0 0 6%;\n min-width: 60px; }\n\n.mat-column-value_msat, .mat-column-value_sat {\n flex: 0 0 8%;\n min-width: 80px; }\n\n.mat-column-creation_date_str, .mat-column-path {\n flex: 0 0 14%;\n min-width: 140px; }\n\n.mat-column-payment_hash, .mat-column-payment_preimage {\n flex: 0 0 18%;\n min-width: 150px; }\n\n.ml-minus-24px {\n margin-left: -24px; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvcGF5bWVudHMvbGlzdC1wYXltZW50cy9DOlxcV29ya3NwYWNlXFxSVExGdWxsQXBwbGljYXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxwYXltZW50c1xcbGlzdC1wYXltZW50c1xcbGlzdC1wYXltZW50cy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGFBQVk7RUFDWixnQkFBZSxFQUNoQjs7QUFFRDtFQUNFLGFBQVk7RUFDWixnQkFBZSxFQUNoQjs7QUFFRDtFQUNFLGFBQVk7RUFDWixnQkFBZSxFQUNoQjs7QUFFRDtFQUNFLGNBQWE7RUFDYixpQkFBZ0IsRUFDakI7O0FBRUQ7RUFDRSxjQUFhO0VBQ2IsaUJBQWdCLEVBQ2pCOztBQUVEO0VBQ0UsbUJBQWtCLEVBQ25CIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvcGF5bWVudHMvbGlzdC1wYXltZW50cy9saXN0LXBheW1lbnRzLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm1hdC1jb2x1bW4tZmVlIHtcclxuICBmbGV4OiAwIDAgNCU7XHJcbiAgbWluLXdpZHRoOiA0MHB4O1xyXG59XHJcblxyXG4ubWF0LWNvbHVtbi1wYXRoLCAubWF0LWNvbHVtbi12YWx1ZSB7XHJcbiAgZmxleDogMCAwIDYlO1xyXG4gIG1pbi13aWR0aDogNjBweDtcclxufVxyXG5cclxuLm1hdC1jb2x1bW4tdmFsdWVfbXNhdCwgLm1hdC1jb2x1bW4tdmFsdWVfc2F0IHtcclxuICBmbGV4OiAwIDAgOCU7XHJcbiAgbWluLXdpZHRoOiA4MHB4O1xyXG59XHJcblxyXG4ubWF0LWNvbHVtbi1jcmVhdGlvbl9kYXRlX3N0ciwgLm1hdC1jb2x1bW4tcGF0aCB7XHJcbiAgZmxleDogMCAwIDE0JTtcclxuICBtaW4td2lkdGg6IDE0MHB4O1xyXG59XHJcblxyXG4ubWF0LWNvbHVtbi1wYXltZW50X2hhc2gsIC5tYXQtY29sdW1uLXBheW1lbnRfcHJlaW1hZ2Uge1xyXG4gIGZsZXg6IDAgMCAxOCU7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxufVxyXG5cclxuLm1sLW1pbnVzLTI0cHgge1xyXG4gIG1hcmdpbi1sZWZ0OiAtMjRweDtcclxufSJdfQ== */"
/***/ }),
/***/ "./src/app/pages/payments/list-payments/list-payments.component.ts":
/*!*************************************************************************!*\
!*** ./src/app/pages/payments/list-payments/list-payments.component.ts ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var rtl_service_1 = __webpack_require__(/*! ../../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var ListPaymentsComponent = /** @class */ (function () {
function ListPaymentsComponent(rtlService, logger) {
this.rtlService = rtlService;
this.logger = logger;
this.position = 'above';
this.flgLoading = [true];
this.information = {};
this.paymentJSONArr = [];
this.displayedColumns = ['creation_date_str', 'payment_hash', 'fee', 'value_msat', 'value_sat', 'value', 'payment_preimage', 'path'];
this.unsub = [new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject()]; // 0: Info, 1: settings, 2: paymentsList
}
ListPaymentsComponent.prototype.ngOnInit = function () {
var _this = this;
this.settings = __assign({}, this.rtlService.getUISettings());
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.rtlService.getInfo();
}
}
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.unsub[0]))
.subscribe(function (data) {
_this.information = data;
_this.logger.info(_this.information);
});
this.rtlService.UIsettingsUpdated
.pipe(operators_1.takeUntil(this.unsub[1]))
.subscribe(function (settings) {
_this.settings = settings;
});
this.rtlService.getPaymentsList()
.pipe(operators_1.takeUntil(this.unsub[2]))
.subscribe(function (payments) {
_this.flgLoading[0] = false;
_this.paymentJSONArr = (payments.length > 0) ? payments : [];
_this.payments = (undefined === payments) ? new material_1.MatTableDataSource([]) : new material_1.MatTableDataSource(_this.paymentJSONArr.slice());
_this.payments.data = _this.paymentJSONArr;
_this.payments.sort = _this.sort;
_this.logger.info(_this.payments);
}, function (err) {
_this.logger.error(err);
_this.flgLoading[0] = 'error';
});
};
ListPaymentsComponent.prototype.ngOnDestroy = function () {
this.unsub.forEach(function (completeSub) {
completeSub.next();
completeSub.complete();
});
};
__decorate([
core_1.ViewChild(material_1.MatSort),
__metadata("design:type", material_1.MatSort)
], ListPaymentsComponent.prototype, "sort", void 0);
ListPaymentsComponent = __decorate([
core_1.Component({
selector: 'rtl-list-payments',
template: __webpack_require__(/*! ./list-payments.component.html */ "./src/app/pages/payments/list-payments/list-payments.component.html"),
styles: [__webpack_require__(/*! ./list-payments.component.scss */ "./src/app/pages/payments/list-payments/list-payments.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService])
], ListPaymentsComponent);
return ListPaymentsComponent;
}());
exports.ListPaymentsComponent = ListPaymentsComponent;
/***/ }),
/***/ "./src/app/pages/payments/send-payment/send-payment.component.html":
/*!*************************************************************************!*\
!*** ./src/app/pages/payments/send-payment/send-payment.component.html ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\">\n <div class=\"padding-gap\">\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>\n <h2>Verify and Send Payments</h2>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <form fxLayout=\"column\" fxLayoutAlign=\"space-between stretch\" fxLayout.gt-md=\"row wrap\" #sendPaymentForm=\"ngForm\">\n <div fxFlex=\"69\" fxLayoutAlign=\"space-between stretch\">\n <mat-form-field class=\"w-100\">\n <input matInput placeholder=\"Payment Request\" name=\"paymentRequest\" [(ngModel)]=\"paymentRequest\" tabindex=\"1\" required #paymentReq=\"ngModel\">\n </mat-form-field>\n </div>\n <div fxFlex=\"30\" fxLayoutAlign=\"space-between stretch\">\n <button fxFlex=\"32\" fxLayoutAlign=\"center center\" mat-raised-button color=\"primary\" [disabled]=\"paymentReq.invalid\" (click)=\"onSendPayment(sendPaymentForm)\" tabindex=\"2\">\n <p *ngIf=\"paymentReq.invalid && (paymentReq.dirty || paymentReq.touched); else sendText\">Invalid Req</p>\n <ng-template #sendText><p>Send Payment</p></ng-template>\n </button>\n <button fxFlex=\"32\" mat-raised-button color=\"primary\" [disabled]=\"paymentReq.invalid\" (click)=\"onVerifyPayment()\" tabindex=\"3\">\n <p *ngIf=\"paymentReq.invalid && (paymentReq.dirty || paymentReq.touched); else decodeText\">Invalid Req</p>\n <ng-template #decodeText><p>Decode</p></ng-template>\n </button>\n <button fxFlex=\"32\" mat-raised-button color=\"accent\" type=\"reset\" tabindex=\"4\" (click)=\"resetData()\">Clear</button>\n </div>\n </form>\n <div fxLayout=\"column\" fxLayout.gt-sm=\"row wrap\" class=\"mt-2\" *ngIf=\"undefined !== paymentDecoded\">\n <div fxFlex=\"50\">\n <mat-list>\n <mat-list-item>\n <div class=\"info-column\">Destination</div>\n <div class=\"info-value\">{{paymentDecoded?.destination}}</div>\n </mat-list-item>\n <mat-list-item>\n <div class=\"info-column\" *ngIf=\"settings?.satsToBTC; else smallerUnit\">Amount\n ({{information?.currency_unit}})</div>\n <ng-template #smallerUnit>\n <div class=\"info-column\">Amount ({{information?.smaller_currency_unit}})</div>\n </ng-template>\n <div class=\"info-value\" *ngIf=\"settings?.satsToBTC; else smallerData\">{{paymentDecoded?.btc_num_satoshis}}</div>\n <ng-template #smallerData>\n <div class=\"info-value\">{{paymentDecoded?.num_satoshis}}</div>\n </ng-template>\n </mat-list-item>\n <mat-list-item>\n <div class=\"info-column\">Expiry</div>\n <div class=\"info-value\">{{paymentDecoded?.expiry}}</div>\n </mat-list-item>\n <mat-list-item>\n <div class=\"info-column\">Desc. Hash</div>\n <div class=\"info-value\">{{paymentDecoded?.description_hash}}</div>\n </mat-list-item>\n <mat-list-item>\n <div class=\"info-column\">CLTV Expiry</div>\n <div class=\"info-value\">{{paymentDecoded?.cltv_expiry}}</div>\n </mat-list-item>\n </mat-list>\n </div>\n <div fxFlex=\"50\">\n <mat-list>\n <mat-list-item>\n <div class=\"info-column\">Payment Hash</div>\n <div class=\"info-value\">{{paymentDecoded?.payment_hash}}</div>\n </mat-list-item>\n <mat-list-item>\n <div class=\"info-column\">Timestamp</div>\n <div class=\"info-value\">{{paymentDecoded?.timestamp_str}}</div>\n </mat-list-item>\n <mat-list-item>\n <div class=\"info-column\">Description</div>\n <div class=\"info-value\">{{paymentDecoded?.description}}</div>\n </mat-list-item>\n <mat-list-item>\n <div class=\"info-column\">Fallback Addr.</div>\n <div class=\"info-value\">{{paymentDecoded?.fallback_addr}}</div>\n </mat-list-item>\n <mat-list-item>\n <div class=\"info-column\">Route Hints</div>\n <div class=\"info-value\">{{paymentDecoded?.route_hints}}</div>\n </mat-list-item>\n </mat-list>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n</div>\n"
/***/ }),
/***/ "./src/app/pages/payments/send-payment/send-payment.component.scss":
/*!*************************************************************************!*\
!*** ./src/app/pages/payments/send-payment/send-payment.component.scss ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".info-column {\n flex: 1 1 34%;\n box-sizing: border-box;\n max-width: 34%; }\n\n.info-value {\n flex: 1 1 64%;\n max-width: 64%;\n word-break: break-word; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvcGF5bWVudHMvc2VuZC1wYXltZW50L0M6XFxXb3Jrc3BhY2VcXFJUTEZ1bGxBcHBsaWNhdGlvbi9zcmNcXGFwcFxccGFnZXNcXHBheW1lbnRzXFxzZW5kLXBheW1lbnRcXHNlbmQtcGF5bWVudC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNDLGNBQWE7RUFDWix1QkFBc0I7RUFDdkIsZUFBYyxFQUNkOztBQUVEO0VBQ0MsY0FBYTtFQUNiLGVBQWM7RUFDZCx1QkFBc0IsRUFDdEIiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9wYXltZW50cy9zZW5kLXBheW1lbnQvc2VuZC1wYXltZW50LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmluZm8tY29sdW1uIHtcclxuXHRmbGV4OiAxIDEgMzQlO1xyXG4gIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XHJcblx0bWF4LXdpZHRoOiAzNCU7XHJcbn1cclxuXHJcbi5pbmZvLXZhbHVlIHtcclxuXHRmbGV4OiAxIDEgNjQlO1xyXG5cdG1heC13aWR0aDogNjQlO1xyXG5cdHdvcmQtYnJlYWs6IGJyZWFrLXdvcmQ7XHJcbn1cclxuIl19 */"
/***/ }),
/***/ "./src/app/pages/payments/send-payment/send-payment.component.ts":
/*!***********************************************************************!*\
!*** ./src/app/pages/payments/send-payment/send-payment.component.ts ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var rtl_service_1 = __webpack_require__(/*! ../../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var alert_message_component_1 = __webpack_require__(/*! ../../../shared/components/alert-message/alert-message.component */ "./src/app/shared/components/alert-message/alert-message.component.ts");
var spinner_dialog_component_1 = __webpack_require__(/*! ../../../shared/components/spinner-dialog/spinner-dialog.component */ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.ts");
var confirmation_message_component_1 = __webpack_require__(/*! ../../../shared/components/confirmation-message/confirmation-message.component */ "./src/app/shared/components/confirmation-message/confirmation-message.component.ts");
var SendPaymentComponent = /** @class */ (function () {
function SendPaymentComponent(rtlService, logger, dialog) {
this.rtlService = rtlService;
this.logger = logger;
this.dialog = dialog;
this.information = {};
this.paymentRequest = '';
this.unsub = [new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject()]; // 0: Info, 1: settings, 2: decodePayment, 3: sendPayment
}
SendPaymentComponent.prototype.ngOnInit = function () {
var _this = this;
this.settings = __assign({}, this.rtlService.getUISettings());
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.rtlService.getInfo();
}
}
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.unsub[0]))
.subscribe(function (data) {
_this.information = data;
_this.logger.info(_this.information);
});
this.rtlService.UIsettingsUpdated
.pipe(operators_1.takeUntil(this.unsub[1]))
.subscribe(function (settings) {
_this.settings = settings;
});
};
SendPaymentComponent.prototype.onSendPayment = function (form) {
var _this = this;
this.rtlService.decodePayment(this.paymentRequest)
.pipe(operators_1.takeUntil(this.unsub[2]))
.subscribe(function (data) {
_this.paymentDecoded = data;
_this.logger.info(data);
var decimalPipe = new common_1.DecimalPipe('en-US');
var confirmationMsg = 'Destination \t\t\t : ' + _this.paymentDecoded.destination + '\nAmount (' +
((undefined === _this.information.smaller_currency_unit) ? 'Sats' : _this.information.smaller_currency_unit) + ') \t\t : ' +
decimalPipe.transform(_this.paymentDecoded.num_satoshis) + '\nDescription \t\t\t : ' + _this.paymentDecoded.description +
'\nTimestamp \t\t\t : ' + _this.paymentDecoded.timestamp_str + '\nExpiry \t\t\t\t : ' + _this.paymentDecoded.expiry;
var confirmDialog = _this.dialog.open(confirmation_message_component_1.ConfirmationMessageComponent, { width: '760px', data: {
type: 'CONFIRM',
message: confirmationMsg
}
});
confirmDialog.afterClosed().subscribe(function (confirmResponse) {
if (confirmResponse) {
var dialogRef_1 = _this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Sending Payment...' } });
_this.rtlService.sendPayment(_this.paymentRequest)
.pipe(operators_1.takeUntil(_this.unsub[3]))
.subscribe(function (ResData) {
dialogRef_1.close();
if (ResData.payment_error) {
dialogRef_1.close();
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { data: { type: 'ERROR', message: ResData.payment_error } });
_this.logger.error('Error: ' + ResData.payment_error);
}
else {
_this.paymentDecoded = undefined;
_this.paymentRequest = undefined;
form.resetForm();
_this.logger.info(ResData);
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '760px', data: { type: 'SUCCESS', message: 'Payment Sent Successfully!\n\n' +
'Total Fee (' + ((undefined === _this.information.smaller_currency_unit) ? 'Sats' : _this.information.smaller_currency_unit) +
') \t\t : ' + decimalPipe.transform((ResData.payment_route.total_fees_msat / 1000), '1.3-3') + '\n' + confirmationMsg } });
}
}, function (err) {
dialogRef_1.close();
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { data: { type: 'ERROR', message: err.error.error } });
_this.logger.error(err);
});
}
});
}, function (err) {
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { data: { type: 'ERROR', message: 'Error In Decode Payment: ' + err.error.error } });
_this.logger.error(err);
});
};
SendPaymentComponent.prototype.onVerifyPayment = function () {
var _this = this;
var dialogRef = this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Decoding Payment...' } });
this.rtlService.decodePayment(this.paymentRequest)
.pipe(operators_1.takeUntil(this.unsub[2]))
.subscribe(function (data) {
dialogRef.close();
_this.paymentDecoded = data;
_this.logger.info(data);
}, function (err) {
dialogRef.close();
_this.paymentRequest = '';
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'ERROR', message: err.error.error } });
_this.logger.error(err);
});
};
SendPaymentComponent.prototype.resetData = function () {
this.paymentRequest = '';
this.paymentDecoded = undefined;
};
SendPaymentComponent.prototype.ngOnDestroy = function () {
this.unsub.forEach(function (completeSub) {
completeSub.next();
completeSub.complete();
});
};
SendPaymentComponent = __decorate([
core_1.Component({
selector: 'rtl-send-payment',
template: __webpack_require__(/*! ./send-payment.component.html */ "./src/app/pages/payments/send-payment/send-payment.component.html"),
styles: [__webpack_require__(/*! ./send-payment.component.scss */ "./src/app/pages/payments/send-payment/send-payment.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService, material_1.MatDialog])
], SendPaymentComponent);
return SendPaymentComponent;
}());
exports.SendPaymentComponent = SendPaymentComponent;
/***/ }),
/***/ "./src/app/pages/peers/peers.component.html":
/*!**************************************************!*\
!*** ./src/app/pages/peers/peers.component.html ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\">\r\n <div class=\"padding-gap\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-subtitle>\r\n <h2>Add Peer</h2>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <form fxLayout=\"row\" fxLayoutAlign=\"start\" (ngSubmit)=\"addPeerForm.form.valid && onAddPeer(addPeerForm)\" #addPeerForm=\"ngForm\">\r\n <mat-form-field fxFlex=\"80\" fxLayoutAlign=\"start\">\r\n <input matInput placeholder=\"Lightning Address\" name=\"peerAddress\" [(ngModel)]=\"peerAddress\" tabindex=\"1\" required #peerAdd=\"ngModel\">\r\n </mat-form-field>\r\n <button fxFlex=\"10\" fxLayoutAlign=\"center center\" mat-raised-button color=\"primary\" [disabled]=\"peerAdd.invalid\" type=\"submit\" tabindex=\"2\">\r\n <p *ngIf=\"peerAdd.invalid && (peerAdd.dirty || peerAdd.touched); else addText\">Invalid Address</p>\r\n <ng-template #addText><p>Add</p></ng-template>\r\n </button>\r\n </form> \r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n <div class=\"padding-gap\">\r\n <mat-progress-bar *ngIf=\"flgLoading[0]===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n <mat-table perfectScrollbar [dataSource]=\"peers\" matSort [ngClass]=\"{'mat-elevation-z8 overflow-x-auto error-border': flgLoading[0]==='error','mat-elevation-z8 overflow-x-auto': true}\">\r\n <ng-container matColumnDef=\"pub_key\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header> Pub Key </mat-header-cell>\r\n <mat-cell *matCellDef=\"let peer\" matTooltip=\"{{peer?.pub_key}}\" [matTooltipPosition]=\"position\" matTooltipClass=\"wide-tooltip\">\r\n <div class=\"flex-ellipsis\"> {{peer?.pub_key}} </div>\r\n </mat-cell>\r\n </ng-container>\r\n <ng-container matColumnDef=\"alias\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header> Alias </mat-header-cell>\r\n <mat-cell *matCellDef=\"let peer\"> {{peer?.alias}} </mat-cell>\r\n </ng-container>\r\n <ng-container matColumnDef=\"address\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header> Address </mat-header-cell>\r\n <mat-cell *matCellDef=\"let peer\"> {{peer?.address}} </mat-cell>\r\n </ng-container>\r\n <ng-container matColumnDef=\"bytes_sent\">\r\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> Bytes Sent </mat-header-cell>\r\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let peer\"> {{peer?.bytes_sent | number}} </mat-cell>\r\n </ng-container>\r\n <ng-container matColumnDef=\"bytes_recv\">\r\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> Bytes Recv </mat-header-cell>\r\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let peer\"> {{peer?.bytes_recv | number}} </mat-cell>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sat_sent\">\r\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> {{information?.smaller_currency_unit}} Sent </mat-header-cell>\r\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let peer\"> {{peer?.sat_sent | number}} </mat-cell>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sat_recv\">\r\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> {{information?.smaller_currency_unit}} Recv </mat-header-cell>\r\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let peer\"> {{peer?.sat_recv | number}} </mat-cell>\r\n </ng-container>\r\n <ng-container matColumnDef=\"inbound\">\r\n <mat-header-cell class=\"pl-4\" *matHeaderCellDef mat-sort-header> Inbound </mat-header-cell>\r\n <mat-cell class=\"pl-4\" *matCellDef=\"let peer\"> {{peer?.inbound}} </mat-cell>\r\n </ng-container>\r\n <ng-container matColumnDef=\"ping_time\">\r\n <mat-header-cell fxLayoutAlign=\"end center\" *matHeaderCellDef mat-sort-header arrowPosition=\"before\"> Ping </mat-header-cell>\r\n <mat-cell fxLayoutAlign=\"end center\" *matCellDef=\"let peer\"> {{peer?.ping_time | number}} </mat-cell>\r\n </ng-container>\r\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\r\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\r\n </mat-table>\r\n </div>\r\n </div>"
/***/ }),
/***/ "./src/app/pages/peers/peers.component.scss":
/*!**************************************************!*\
!*** ./src/app/pages/peers/peers.component.scss ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".mat-column-bytes_sent {\n flex: 0 0 7%;\n min-width: 70px; }\n\n.mat-column-bytes_recv, .mat-column-sat_sent, .mat-column-sat_recv, .mat-column-inbound, .mat-column-ping_time {\n flex: 0 0 8%;\n min-width: 80px; }\n\n.mat-column-alias, .mat-column-address {\n flex: 0 0 14%;\n min-width: 150px; }\n\n.mat-column-pub_key {\n flex: 0 0 19%;\n min-width: 200px; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvcGVlcnMvQzpcXFdvcmtzcGFjZVxcUlRMRnVsbEFwcGxpY2F0aW9uL3NyY1xcYXBwXFxwYWdlc1xccGVlcnNcXHBlZXJzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBWTtFQUNaLGdCQUFlLEVBQ2hCOztBQUVEO0VBQ0UsYUFBWTtFQUNaLGdCQUFlLEVBQ2hCOztBQUVEO0VBQ0UsY0FBYTtFQUNiLGlCQUFnQixFQUNqQjs7QUFFRDtFQUNFLGNBQWE7RUFDYixpQkFBZ0IsRUFDakIiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9wZWVycy9wZWVycy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5tYXQtY29sdW1uLWJ5dGVzX3NlbnQge1xyXG4gIGZsZXg6IDAgMCA3JTtcclxuICBtaW4td2lkdGg6IDcwcHg7XHJcbn1cclxuXHJcbi5tYXQtY29sdW1uLWJ5dGVzX3JlY3YsIC5tYXQtY29sdW1uLXNhdF9zZW50LCAubWF0LWNvbHVtbi1zYXRfcmVjdiwgLm1hdC1jb2x1bW4taW5ib3VuZCwgLm1hdC1jb2x1bW4tcGluZ190aW1lIHtcclxuICBmbGV4OiAwIDAgOCU7XHJcbiAgbWluLXdpZHRoOiA4MHB4O1xyXG59XHJcblxyXG4ubWF0LWNvbHVtbi1hbGlhcywgLm1hdC1jb2x1bW4tYWRkcmVzcyB7XHJcbiAgZmxleDogMCAwIDE0JTtcclxuICBtaW4td2lkdGg6IDE1MHB4O1xyXG59XHJcblxyXG4ubWF0LWNvbHVtbi1wdWJfa2V5IHtcclxuICBmbGV4OiAwIDAgMTklO1xyXG4gIG1pbi13aWR0aDogMjAwcHg7XHJcbn1cclxuIl19 */"
/***/ }),
/***/ "./src/app/pages/peers/peers.component.ts":
/*!************************************************!*\
!*** ./src/app/pages/peers/peers.component.ts ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var rtl_service_1 = __webpack_require__(/*! ../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var alert_message_component_1 = __webpack_require__(/*! ../../shared/components/alert-message/alert-message.component */ "./src/app/shared/components/alert-message/alert-message.component.ts");
var spinner_dialog_component_1 = __webpack_require__(/*! ../../shared/components/spinner-dialog/spinner-dialog.component */ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.ts");
var PeersComponent = /** @class */ (function () {
function PeersComponent(rtlService, logger, dialog) {
this.rtlService = rtlService;
this.logger = logger;
this.dialog = dialog;
this.position = 'above';
this.displayedColumns = ['pub_key', 'alias', 'address', 'bytes_sent', 'bytes_recv', 'sat_sent', 'sat_recv', 'inbound', 'ping_time'];
this.peerAddress = '';
this.information = {};
this.peersJSONArr = [];
this.flgLoading = [true]; // 0: peers
this.peersSub = [new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject()]; // 0: info, 1: getPeers, 2: addPeers, 3: getGraphNode
}
PeersComponent.prototype.ngOnInit = function () {
var _this = this;
if (undefined === this.information.currency_unit) {
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.flgLoading[0] = true;
this.rtlService.getInfo();
}
else {
this.flgLoading[0] = false;
}
}
else {
this.flgLoading[0] = false;
}
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.peersSub[0]))
.subscribe(function (data) {
_this.information = data;
_this.logger.info(_this.information);
});
this.rtlService.getPeers()
.pipe(operators_1.takeUntil(this.peersSub[1]))
.subscribe(function (peers) {
_this.flgLoading[0] = false;
_this.peersJSONArr = peers;
_this.peers = (undefined === peers) ? new material_1.MatTableDataSource([]) : new material_1.MatTableDataSource(_this.peersJSONArr.slice());
_this.peers.data = _this.peersJSONArr;
_this.peers.sort = _this.sort;
_this.logger.info(_this.peers);
}, function (err) {
_this.logger.error(err);
_this.flgLoading[0] = 'error';
});
};
PeersComponent.prototype.onAddPeer = function (form) {
var _this = this;
var pattern = '^([a-zA-Z0-9]){1,66}@(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]):[0-9]+$';
var deviderIndex = this.peerAddress.search('@');
var pubkey = '';
var host = '';
if (new RegExp(pattern).test(this.peerAddress)) {
pubkey = this.peerAddress.substring(0, deviderIndex);
host = this.peerAddress.substring(deviderIndex + 1);
this.addPeerWithParams(form, pubkey, host);
}
else {
var dialogRef_1 = this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Getting Node Address...' } });
this.rtlService.getGraphNode(this.peerAddress)
.pipe(operators_1.takeUntil(this.peersSub[3]))
.subscribe(function (data) {
dialogRef_1.close();
host = (undefined === data.node.addresses || undefined === data.node.addresses[0].addr) ? '' : data.node.addresses[0].addr;
_this.addPeerWithParams(form, _this.peerAddress, host);
}, function (err) {
dialogRef_1.close();
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'ERROR', message: err.error.error } });
_this.logger.error(err);
});
}
};
PeersComponent.prototype.addPeerWithParams = function (form, pubkey, host) {
var _this = this;
var dialogRef = this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Adding Peer...' } });
this.rtlService.addPeer(pubkey, host)
.pipe(operators_1.takeUntil(this.peersSub[2]))
.subscribe(function (data) {
dialogRef.close();
_this.peersJSONArr.push({ pub_key: pubkey, address: host });
_this.peers.data = _this.peersJSONArr;
_this.peerAddress = '';
form.resetForm();
_this.logger.info(data);
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'SUCCESS', message: 'Peer Added Successfully!' } });
}, function (err) {
dialogRef.close();
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'ERROR', message: err.error.error } });
_this.logger.error(err);
});
};
PeersComponent.prototype.ngOnDestroy = function () {
this.peersSub.forEach(function (completeSub) {
completeSub.next();
completeSub.complete();
});
};
__decorate([
core_1.ViewChild(material_1.MatSort),
__metadata("design:type", material_1.MatSort)
], PeersComponent.prototype, "sort", void 0);
PeersComponent = __decorate([
core_1.Component({
selector: 'rtl-peers',
template: __webpack_require__(/*! ./peers.component.html */ "./src/app/pages/peers/peers.component.html"),
styles: [__webpack_require__(/*! ./peers.component.scss */ "./src/app/pages/peers/peers.component.scss")],
encapsulation: core_1.ViewEncapsulation.None
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService, material_1.MatDialog])
], PeersComponent);
return PeersComponent;
}());
exports.PeersComponent = PeersComponent;
/***/ }),
/***/ "./src/app/pages/server-config/server-config.component.html":
/*!******************************************************************!*\
!*** ./src/app/pages/server-config/server-config.component.html ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\">\r\n <div class=\"padding-gap\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-subtitle>\r\n <h2>Node Configuration Path</h2>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <form fxLayout=\"row\" fxLayoutAlign=\"space-around start\" (ngSubmit)=\"lndConfForm.form.valid && onShowConfig()\" #lndConfForm=\"ngForm\">\r\n <mat-form-field fxFlex=\"74\" fxLayoutAlign=\"start\">\r\n <input matInput placeholder=\"Node Config Local Path With File Ext .conf (lnd.conf | bitcoin.conf)\" name=\"filePath\" [(ngModel)]=\"settings.lndConfigPath\" tabindex=\"1\" required pattern=\"[^\\0]+(lnd|bitcoin)+(.conf)$\" #filePth=\"ngModel\">\r\n </mat-form-field>\r\n <button fxFlex=\"14\" fxLayoutAlign=\"center center\" mat-raised-button color=\"primary\" [disabled]=\"settings.lndConfigPath==='' || filePth.invalid\" type=\"submit\" tabindex=\"2\">\r\n <p *ngIf=\"filePth.invalid && (filePth.dirty || filePth.touched); else showText\">Invalid Path (ext .conf)</p>\r\n <ng-template #showText><p>Show Config</p></ng-template>\r\n </button>\r\n <button fxFlex=\"10\" fxLayoutAlign=\"center center\" mat-raised-button color=\"accent\" type=\"reset\" tabindex=\"3\" (click)=\"resetData()\">Clear</button>\r\n </form> \r\n <mat-list>\r\n <mat-list-item *ngFor=\"let conf of lndConfigData; index as i;\">\r\n <mat-card-subtitle class=\"my-1\">\r\n <h2 *ngIf=\"conf.indexOf('[') >= 0\">{{conf}}</h2>\r\n </mat-card-subtitle>\r\n <mat-card-subtitle class=\"m-0\">\r\n <h4 *ngIf=\"conf.indexOf('[') < 0\" class=\"ml-4\">{{conf}}</h4>\r\n </mat-card-subtitle>\r\n <mat-divider [inset]=\"true\" *ngIf=\"conf.indexOf('[') < 0\"></mat-divider>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/pages/server-config/server-config.component.scss":
/*!******************************************************************!*\
!*** ./src/app/pages/server-config/server-config.component.scss ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "h4 {\n word-break: break-word; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvc2VydmVyLWNvbmZpZy9DOlxcV29ya3NwYWNlXFxSVExGdWxsQXBwbGljYXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxzZXJ2ZXItY29uZmlnXFxzZXJ2ZXItY29uZmlnLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsdUJBQXNCLEVBQ3ZCIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvc2VydmVyLWNvbmZpZy9zZXJ2ZXItY29uZmlnLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiaDQge1xyXG4gIHdvcmQtYnJlYWs6IGJyZWFrLXdvcmQ7XHJcbn1cclxuIl19 */"
/***/ }),
/***/ "./src/app/pages/server-config/server-config.component.ts":
/*!****************************************************************!*\
!*** ./src/app/pages/server-config/server-config.component.ts ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var rtl_service_1 = __webpack_require__(/*! ../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var alert_message_component_1 = __webpack_require__(/*! ../../shared/components/alert-message/alert-message.component */ "./src/app/shared/components/alert-message/alert-message.component.ts");
var spinner_dialog_component_1 = __webpack_require__(/*! ../../shared/components/spinner-dialog/spinner-dialog.component */ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.ts");
var ServerConfigComponent = /** @class */ (function () {
function ServerConfigComponent(rtlService, logger, dialog) {
this.rtlService = rtlService;
this.logger = logger;
this.dialog = dialog;
this.prevConfigPath = '';
this.lndConfigData = [];
this.unsubConfig = [new rxjs_1.Subject(), new rxjs_1.Subject()];
}
ServerConfigComponent.prototype.ngOnInit = function () {
var _this = this;
this.settings = __assign({}, this.rtlService.getUISettings());
this.rtlService.UIsettingsUpdated
.pipe(operators_1.takeUntil(this.unsubConfig[0]))
.subscribe(function (settings) {
_this.settings = __assign({}, settings);
_this.prevConfigPath = settings.lndConfigPath;
});
};
ServerConfigComponent.prototype.onShowConfig = function () {
var _this = this;
this.lndConfigData = [];
var dialogRef = this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Opening Config File...' } });
this.rtlService.fetchLNDServerConfig(this.settings.lndConfigPath)
.pipe(operators_1.takeUntil(this.unsubConfig[1]))
.subscribe(function (data) {
dialogRef.close();
_this.lndConfigData = data.split('\n');
_this.logger.info(_this.lndConfigData);
if (_this.settings.lndConfigPath.trim() !== _this.prevConfigPath.trim()) {
_this.rtlService.updateUISettings(_this.settings);
}
}, function (err) {
dialogRef.close();
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'ERROR', message: JSON.stringify(err.error.error) } });
_this.logger.error(err);
});
};
ServerConfigComponent.prototype.resetData = function () {
this.lndConfigData = [];
this.settings.lndConfigPath = '';
if (this.settings.lndConfigPath.trim() !== this.prevConfigPath.trim()) {
this.rtlService.updateUISettings(this.settings);
}
};
ServerConfigComponent.prototype.ngOnDestroy = function () {
this.unsubConfig.forEach(function (completeSub) {
completeSub.next();
completeSub.complete();
});
};
ServerConfigComponent = __decorate([
core_1.Component({
selector: 'rtl-server-config',
template: __webpack_require__(/*! ./server-config.component.html */ "./src/app/pages/server-config/server-config.component.html"),
styles: [__webpack_require__(/*! ./server-config.component.scss */ "./src/app/pages/server-config/server-config.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService, material_1.MatDialog])
], ServerConfigComponent);
return ServerConfigComponent;
}());
exports.ServerConfigComponent = ServerConfigComponent;
/***/ }),
/***/ "./src/app/pages/wallet/wallet.component.html":
/*!****************************************************!*\
!*** ./src/app/pages/wallet/wallet.component.html ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\" fxLayout.gt-sm=\"row wrap\">\r\n <div fxFlex=\"34\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'custom-card error-border': flgLoadingWallet==='error','custom-card': true}\">\r\n <mat-card-header class=\"bg-primary p-1\" fxLayoutAlign=\"center center\">\r\n <mat-card-title class=\"m-0 pt-1\">\r\n <h3>Total Balance</h3>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content fxLayout=\"column\" fxLayoutAlign=\"center center\">\r\n <mat-card-content class=\"mt-1\">\r\n <svg style=\"width:70px;height:70px\" viewBox=\"0 0 24 24\">\r\n <path fill=\"currentColor\" d=\"M10,2H14A2,2 0 0,1 16,4V6H20A2,2 0 0,1 22,8V19A2,2 0 0,1 20,21H4C2.89,21 2,20.1 2,19V8C2,6.89 2.89,6 4,6H8V4C8,2.89 8.89,2 10,2M14,6V4H10V6H14Z\" />\r\n </svg>\r\n </mat-card-content>\r\n <span *ngIf=\"information?.currency_unit; else withoutData\">\r\n <h3 *ngIf=\"settings?.satsToBTC; else smallerUnit1\">{{blockchainBalance?.btc_total_balance | number}} {{information?.currency_unit}}</h3>\r\n <ng-template #smallerUnit1><h3>{{blockchainBalance?.total_balance | number}} {{information?.smaller_currency_unit}}</h3></ng-template>\r\n </span>\r\n </mat-card-content>\r\n <mat-progress-bar *ngIf=\"flgLoadingWallet===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n <mat-divider></mat-divider>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"33\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'custom-card error-border': flgLoadingWallet==='error','custom-card': true}\">\r\n <mat-card-header class=\"bg-primary p-1\" fxLayoutAlign=\"center center\">\r\n <mat-card-title class=\"m-0 pt-1\">\r\n <h3>Confirmed Balance</h3>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content fxLayout=\"column\" fxLayoutAlign=\"center center\">\r\n <mat-card-content class=\"mt-1\">\r\n <svg style=\"width:70px;height:70px\" viewBox=\"0 0 24 24\">\r\n <path fill=\"currentColor\" d=\"M10,2H14A2,2 0 0,1 16,4V6H20A2,2 0 0,1 22,8V19A2,2 0 0,1 20,21H4A2,2 0 0,1 2,19V8A2,2 0 0,1 4,6H8V4A2,2 0 0,1 10,2M14,6V4H10V6H14M10.5,17.5L17.09,10.91L15.68,9.5L10.5,14.67L8.41,12.59L7,14L10.5,17.5Z\" />\r\n </svg>\r\n </mat-card-content>\r\n <span *ngIf=\"information?.currency_unit; else withoutData\">\r\n <h3 *ngIf=\"settings?.satsToBTC; else smallerUnit2\">{{blockchainBalance?.btc_confirmed_balance | number}} {{information?.currency_unit}}</h3>\r\n <ng-template #smallerUnit2><h3>{{blockchainBalance?.confirmed_balance | number}} {{information?.smaller_currency_unit}}</h3></ng-template>\r\n </span>\r\n </mat-card-content>\r\n <mat-progress-bar *ngIf=\"flgLoadingWallet===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n <mat-divider></mat-divider>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"33\" class=\"padding-gap\">\r\n <mat-card [ngClass]=\"{'custom-card error-border': flgLoadingWallet==='error','custom-card': true}\">\r\n <mat-card-header class=\"bg-primary p-1\" fxLayoutAlign=\"center center\">\r\n <mat-card-title class=\"m-0 pt-1\">\r\n <h3>Unconfirmed Balance</h3>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content fxLayout=\"column\" fxLayoutAlign=\"center center\">\r\n <mat-card-content class=\"mt-1\">\r\n <svg style=\"width:70px;height:70px\" viewBox=\"0 0 24 24\">\r\n <path fill=\"currentColor\" d=\"M14,2A2,2 0 0,1 16,4V6H20A2,2 0 0,1 22,8L10.85,19C10.85,20.1 10.85,19.5 10.85,21H4C2.89,21 2,20.1 2,19V8C2,6.89 2.89,6 4,6H8V4C8,2.89 8.89,2 10,2H14M14,6V4H10V6H14M21.04,12.13C20.9,12.13 20.76,12.19 20.65,12.3L19.65,13.3L21.7,15.35L22.7,14.35C22.92,14.14 22.92,13.79 22.7,13.58L21.42,12.3C21.31,12.19 21.18,12.13 21.04,12.13M19.07,13.88L13,19.94V22H15.06L21.12,15.93L19.07,13.88Z\" />\r\n </svg>\r\n </mat-card-content>\r\n <span *ngIf=\"information?.currency_unit; else withoutData\">\r\n <h3 *ngIf=\"settings?.satsToBTC; else smallerUnit3\">{{blockchainBalance?.btc_unconfirmed_balance | number}} {{information?.currency_unit}}</h3>\r\n <ng-template #smallerUnit3><h3>{{blockchainBalance?.unconfirmed_balance | number}} {{information?.smaller_currency_unit}}</h3></ng-template>\r\n </span>\r\n </mat-card-content>\r\n <mat-progress-bar *ngIf=\"flgLoadingWallet===true\" mode=\"indeterminate\"></mat-progress-bar>\r\n <mat-divider></mat-divider>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"100\" class=\"padding-gap\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-subtitle>\r\n <h2>Receive Funds</h2>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n <mat-card-content class=\"top-minus-25px\">\r\n <div fxLayout=\"column\" fxLayout.gt-sm=\"row wrap\">\r\n <div fxFlex=\"48\" fxLayoutAlign=\"space-around end\">\r\n <mat-form-field fxFlex=\"50\">\r\n <mat-select [(ngModel)]=\"selectedAddress\" placeholder=\"Address Type\" name=\"address_type\" tabindex=\"1\">\r\n <mat-option *ngFor=\"let addressType of addressTypes\" [value]=\"addressType\">\r\n {{addressType.addressTp}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <button fxFlex=\"45\" mat-raised-button color=\"primary\" [disabled]=\"undefined === selectedAddress.addressId\" (click)=\"onGenerateAddress()\" tabindex=\"2\" class=\"top-minus-15px\">Generate Address</button>\r\n </div>\r\n <div fxFlex=\"34\" fxLayoutAlign=\"start end\">\r\n <mat-form-field fxFlex=\"100\">\r\n <input matInput [value]=\"newAddress\" readonly>\r\n </mat-form-field>\r\n </div> \r\n <div fxFlex=\"14\" fxLayoutAlign=\"center center\">\r\n <qr-code [ngStyle]=\"{'visibility': (newAddress === '') ? 'hidden' : 'visible'}\" [value]=\"newAddress\" [size]=\"120\" class=\"top-minus-5px\"></qr-code>\r\n </div> \r\n </div>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n <div fxFlex=\"100\" class=\"padding-gap\">\r\n <form (ngSubmit)=\"sendFundForm.form.valid && onSendFunds(sendFundForm)\" #sendFundForm=\"ngForm\">\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-subtitle>\r\n <h2>Send Funds</h2>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div fxLayout=\"column\" fxLayout.gt-md=\"row wrap\">\r\n <div fxFlex=\"49\" fxLayoutAlign=\"space-between start\" class=\"mr-2\">\r\n <mat-form-field fxFlex=\"65\">\r\n <input matInput [(ngModel)]=\"transaction.address\" placeholder=\"BTC Address\" required tabindex=\"3\" name=\"address\" #address=\"ngModel\">\r\n </mat-form-field>\r\n <mat-form-field fxFlex=\"32\">\r\n <input matInput [(ngModel)]=\"transaction.amount\" placeholder=\"Amount ({{information?.smaller_currency_unit}})\" name=\"amount\" type=\"number\" step=\"100\" min=\"0\" required tabindex=\"4\" #amount=\"ngModel\">\r\n </mat-form-field>\r\n </div>\r\n <div fxFlex=\"49\" fxLayoutAlign=\"space-between start\">\r\n <mat-form-field fxFlex=\"32\">\r\n <input matInput [(ngModel)]=\"transaction.blocks\" placeholder=\"Target Confirmation Blocks\" type=\"number\" name=\"blocks\" step=\"1\" min=\"0\" required tabindex=\"5\" #blocks=\"ngModel\">\r\n </mat-form-field>\r\n <mat-form-field fxFlex=\"32\">\r\n <input matInput [(ngModel)]=\"transaction.fees\" placeholder=\"Fee ({{information?.smaller_currency_unit}}/Byte)\" type=\"number\" name=\"fees\" step=\"1\" min=\"0\" required tabindex=\"6\" #fees=\"ngModel\">\r\n </mat-form-field>\r\n <button fxFlex=\"32\" fxLayoutAlign=\"center center\" mat-raised-button color=\"primary\" class=\"ml-2\" [disabled]=\"invalidValues\" type=\"submit\" tabindex=\"7\">\r\n <p *ngIf=\"invalidValues && (address.touched || address.dirty) && (amount.touched || amount.dirty) && (blocks.touched || blocks.dirty) && (fees.touched || fees.dirty); else sendText\">Invalid Values</p>\r\n <ng-template #sendText><p>Send</p></ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </mat-card-content>\r\n </mat-card>\r\n </form> \r\n </div>\r\n</div>\r\n<ng-template #withoutData><h3>Sats</h3></ng-template>\r\n"
/***/ }),
/***/ "./src/app/pages/wallet/wallet.component.scss":
/*!****************************************************!*\
!*** ./src/app/pages/wallet/wallet.component.scss ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL3dhbGxldC93YWxsZXQuY29tcG9uZW50LnNjc3MifQ== */"
/***/ }),
/***/ "./src/app/pages/wallet/wallet.component.ts":
/*!**************************************************!*\
!*** ./src/app/pages/wallet/wallet.component.ts ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var rtl_service_1 = __webpack_require__(/*! ../../shared/services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../shared/services/logger.service */ "./src/app/shared/services/logger.service.ts");
var spinner_dialog_component_1 = __webpack_require__(/*! ../../shared/components/spinner-dialog/spinner-dialog.component */ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.ts");
var alert_message_component_1 = __webpack_require__(/*! ../../shared/components/alert-message/alert-message.component */ "./src/app/shared/components/alert-message/alert-message.component.ts");
var confirmation_message_component_1 = __webpack_require__(/*! ../../shared/components/confirmation-message/confirmation-message.component */ "./src/app/shared/components/confirmation-message/confirmation-message.component.ts");
var WalletComponent = /** @class */ (function () {
// 0: Info, 1: blockchain, 2: getNewAddress, 3: setTransactions, 4: settings
function WalletComponent(rtlService, logger, dialog) {
this.rtlService = rtlService;
this.logger = logger;
this.dialog = dialog;
this.addressTypes = [];
this.flgLoadingWallet = true;
this.selectedAddress = {};
this.blockchainBalance = {};
this.information = {};
this.newAddress = '';
this.transaction = {};
this.unsub = [new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject(), new rxjs_1.Subject()];
}
WalletComponent.prototype.ngOnInit = function () {
var _this = this;
this.settings = __assign({}, this.rtlService.getUISettings());
this.addressTypes = this.rtlService.getAddressTypes();
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.rtlService.getInfo();
}
}
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.unsub[0]))
.subscribe(function (data) {
_this.information = data;
_this.logger.info(_this.information);
});
this.rtlService.getBalance('blockchain')
.pipe(operators_1.takeUntil(this.unsub[1]))
.subscribe(function (data) {
_this.flgLoadingWallet = false;
_this.blockchainBalance = data;
if (undefined === _this.blockchainBalance.total_balance) {
_this.blockchainBalance.total_balance = '0';
}
if (undefined === _this.blockchainBalance.confirmed_balance) {
_this.blockchainBalance.confirmed_balance = '0';
}
if (undefined === _this.blockchainBalance.unconfirmed_balance) {
_this.blockchainBalance.unconfirmed_balance = '0';
}
}, function (err) {
_this.flgLoadingWallet = 'error';
});
this.rtlService.UIsettingsUpdated
.pipe(operators_1.takeUntil(this.unsub[4]))
.subscribe(function (settings) {
_this.settings = settings;
});
};
WalletComponent.prototype.onGenerateAddress = function () {
var _this = this;
var dialogRef = this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Getting New Address...' } });
this.rtlService.getNewAddress(this.selectedAddress)
.pipe(operators_1.takeUntil(this.unsub[2]))
.subscribe(function (data) {
dialogRef.close();
_this.newAddress = data.address;
_this.logger.info(_this.newAddress);
}, function (err) {
dialogRef.close();
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { width: '700px', data: { type: 'ERROR', message: JSON.stringify(err.error.error) } });
_this.logger.error(err);
});
};
WalletComponent.prototype.onSendFunds = function (form) {
var _this = this;
var decimalPipe = new common_1.DecimalPipe('en-US');
var confirmationMsg = 'BTC Address \t\t\t\t\t : ' + this.transaction.address + '\nAmount (' + this.information.smaller_currency_unit +
') \t\t\t\t\t : ' + decimalPipe.transform(this.transaction.amount) + '\nTarget Confirmation Blocks \t\t : ' + this.transaction.blocks +
'\nFee (' + this.information.smaller_currency_unit + '/Byte) \t\t\t\t\t : ' + this.transaction.fees;
var confirmDialog = this.dialog.open(confirmation_message_component_1.ConfirmationMessageComponent, { height: '250px', width: '450px', data: {
type: 'CONFIRM',
message: confirmationMsg
}
});
confirmDialog.afterClosed().subscribe(function (confirmResponse) {
if (confirmResponse) {
var dialogRef_1 = _this.dialog.open(spinner_dialog_component_1.SpinnerDialogComponent, { data: { message: 'Sending Funds...' } });
_this.rtlService.setTransactions(_this.transaction)
.pipe(operators_1.takeUntil(_this.unsub[3]))
.subscribe(function (data) {
dialogRef_1.close();
_this.transaction = {};
form.resetForm();
_this.logger.info(data);
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { data: { type: 'SUCCESS', message: 'Fund Sent Successfully!' } });
}, function (err) {
dialogRef_1.close();
_this.dialog.open(alert_message_component_1.AlertMessageComponent, { data: { type: 'ERROR', message: err.error.error } });
_this.logger.error(err);
});
}
});
};
Object.defineProperty(WalletComponent.prototype, "invalidValues", {
get: function () {
return undefined === this.transaction.address || this.transaction.address === ''
|| undefined === this.transaction.amount || this.transaction.amount <= 0
|| undefined === this.transaction.blocks || this.transaction.blocks <= 0
|| undefined === this.transaction.fees || this.transaction.fees <= 0;
},
enumerable: true,
configurable: true
});
WalletComponent.prototype.ngOnDestroy = function () {
this.unsub.forEach(function (completeSub) {
completeSub.next();
completeSub.complete();
});
};
WalletComponent = __decorate([
core_1.Component({
selector: 'rtl-wallet',
template: __webpack_require__(/*! ./wallet.component.html */ "./src/app/pages/wallet/wallet.component.html"),
styles: [__webpack_require__(/*! ./wallet.component.scss */ "./src/app/pages/wallet/wallet.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService, material_1.MatDialog])
], WalletComponent);
return WalletComponent;
}());
exports.WalletComponent = WalletComponent;
/***/ }),
/***/ "./src/app/shared/components/alert-message/alert-message.component.html":
/*!******************************************************************************!*\
!*** ./src/app/shared/components/alert-message/alert-message.component.html ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"row\">\n <div class=\"w-100\">\n <mat-card-header [ngClass]=\"msgTypeBackground\" fxLayoutAlign=\"end\">\n <h2 fxFlex=\"91\">{{data.type}}</h2>\n <mat-icon fxFlex=\"7\" fxLayoutAlign=\"end\" type=\"button\" (click)=\"onClose()\" class=\"cursor-pointer\">close</mat-icon>\n </mat-card-header>\n <mat-card-content>\n <div *ngIf=\"data.jsonMsg\" class=\"pb-2 p-2 wrap-text new-line\">\n <div *ngFor=\"let obj of messageObj\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <div fxFlex=\"20\">{{obj[0]}}</div>\n <div fxFlex=\"2\">:</div>\n <div fxFlex=\"65\">{{obj[1]}}</div>\n </div>\n </div>\n <p *ngIf=\"!data.jsonMsg\" class=\"pb-2 p-2 wrap-text new-line\" fxLayoutAlign=\"center center\">{{data.message}}</p>\n <mat-divider class=\"pb-1\"></mat-divider>\n <div fxLayoutAlign=\"center\">\n <button mat-raised-button [color]=\"msgTypeForeground\" fxFlex=\"30\" class=\"mb-1\" type=\"button\" [mat-dialog-close]=\"false\" default>Close</button>\n </div>\n </mat-card-content>\n </div>\n</div>\n"
/***/ }),
/***/ "./src/app/shared/components/alert-message/alert-message.component.scss":
/*!******************************************************************************!*\
!*** ./src/app/shared/components/alert-message/alert-message.component.scss ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".p-2 {\n padding: 1rem; }\n\n.pb-1 {\n padding-bottom: 0.3rem; }\n\n.pb-2 {\n padding-bottom: 1rem; }\n\n.mb-1 {\n margin-bottom: 0.5rem; }\n\n.wrap-text {\n word-break: break-word; }\n\n.mat-icon[type=\"button\"] {\n cursor: pointer; }\n\n.new-line {\n white-space: pre-wrap; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc2hhcmVkL2NvbXBvbmVudHMvYWxlcnQtbWVzc2FnZS9DOlxcV29ya3NwYWNlXFxSVExGdWxsQXBwbGljYXRpb24vc3JjXFxhcHBcXHNoYXJlZFxcY29tcG9uZW50c1xcYWxlcnQtbWVzc2FnZVxcYWxlcnQtbWVzc2FnZS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGNBQWEsRUFDZDs7QUFFRDtFQUNFLHVCQUFzQixFQUN2Qjs7QUFFRDtFQUNFLHFCQUFvQixFQUNyQjs7QUFFRDtFQUNFLHNCQUFxQixFQUN0Qjs7QUFFRDtFQUNFLHVCQUFzQixFQUN2Qjs7QUFFRDtFQUNFLGdCQUFlLEVBQ2hCOztBQUVEO0VBQ0Usc0JBQXFCLEVBQ3RCIiwiZmlsZSI6InNyYy9hcHAvc2hhcmVkL2NvbXBvbmVudHMvYWxlcnQtbWVzc2FnZS9hbGVydC1tZXNzYWdlLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLnAtMiB7XHJcbiAgcGFkZGluZzogMXJlbTtcclxufVxyXG5cclxuLnBiLTEge1xyXG4gIHBhZGRpbmctYm90dG9tOiAwLjNyZW07XHJcbn1cclxuXHJcbi5wYi0yIHtcclxuICBwYWRkaW5nLWJvdHRvbTogMXJlbTtcclxufVxyXG5cclxuLm1iLTEge1xyXG4gIG1hcmdpbi1ib3R0b206IDAuNXJlbTtcclxufVxyXG5cclxuLndyYXAtdGV4dCB7XHJcbiAgd29yZC1icmVhazogYnJlYWstd29yZDtcclxufVxyXG5cclxuLm1hdC1pY29uW3R5cGU9XCJidXR0b25cIl0ge1xyXG4gIGN1cnNvcjogcG9pbnRlcjtcclxufVxyXG5cclxuLm5ldy1saW5lIHtcclxuICB3aGl0ZS1zcGFjZTogcHJlLXdyYXA7XHJcbn1cclxuIl19 */"
/***/ }),
/***/ "./src/app/shared/components/alert-message/alert-message.component.ts":
/*!****************************************************************************!*\
!*** ./src/app/shared/components/alert-message/alert-message.component.ts ***!
\****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var AlertMessageComponent = /** @class */ (function () {
function AlertMessageComponent(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
this.msgTypeBackground = 'bg-primary p-1';
this.msgTypeForeground = 'primary';
this.messageObj = [];
}
AlertMessageComponent.prototype.ngOnInit = function () {
var _this = this;
// INFO/WARN/ERROR/SUCCESS/CONFIRM
if (this.data.type === 'WARN') {
this.msgTypeBackground = 'bg-accent p-1';
this.msgTypeForeground = 'accent';
}
if (this.data.type === 'ERROR') {
this.msgTypeBackground = 'bg-warn p-1';
this.msgTypeForeground = 'warn';
}
this.data.message = this.data.message.replace(/{/g, '').replace(/"/g, '').replace(/}/g, '').replace(/\n/g, '');
this.messageObj = this.data.message.split(',');
this.messageObj.forEach(function (obj, idx) {
_this.messageObj[idx] = obj.split(':');
});
};
AlertMessageComponent.prototype.onClose = function () {
this.dialogRef.close(false);
};
AlertMessageComponent = __decorate([
core_1.Component({
selector: 'rtl-alert-message',
template: __webpack_require__(/*! ./alert-message.component.html */ "./src/app/shared/components/alert-message/alert-message.component.html"),
styles: [__webpack_require__(/*! ./alert-message.component.scss */ "./src/app/shared/components/alert-message/alert-message.component.scss")]
}),
__param(1, core_1.Inject(material_1.MAT_DIALOG_DATA)),
__metadata("design:paramtypes", [material_1.MatDialogRef, Object])
], AlertMessageComponent);
return AlertMessageComponent;
}());
exports.AlertMessageComponent = AlertMessageComponent;
/***/ }),
/***/ "./src/app/shared/components/confirmation-message/confirmation-message.component.html":
/*!********************************************************************************************!*\
!*** ./src/app/shared/components/confirmation-message/confirmation-message.component.html ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"row\">\n <div class=\"w-100\">\n <mat-card-header [ngClass]=\"msgTypeBackground\" fxLayoutAlign=\"end\">\n <h2 fxFlex=\"91\">{{data.type}}</h2>\n <mat-icon fxFlex=\"7\" fxLayoutAlign=\"end\" type=\"button\" (click)=\"onClose()\" class=\"cursor-pointer\">close</mat-icon>\n </mat-card-header>\n <mat-card-content>\n <p class=\"pb-2 p-2 wrap-text new-line\" fxLayoutAlign=\"center center\">{{data.message}}</p>\n <mat-divider class=\"pb-1\"></mat-divider>\n <div fxLayoutAlign=\"center\">\n <button mat-raised-button color=\"accent\" fxFlex=\"20\" class=\"mb-1 mr-2\" type=\"button\" [mat-dialog-close]=\"false\" default>No</button>\n <button mat-raised-button [color]=\"msgTypeForeground\" fxFlex=\"20\" class=\"mb-1 ml-2\" type=\"button\" [mat-dialog-close]=\"true\">Yes</button>\n </div>\n </mat-card-content>\n </div>\n</div>\n"
/***/ }),
/***/ "./src/app/shared/components/confirmation-message/confirmation-message.component.scss":
/*!********************************************************************************************!*\
!*** ./src/app/shared/components/confirmation-message/confirmation-message.component.scss ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".new-line {\n white-space: pre-wrap; }\n\n.wrap-text {\n word-break: break-word; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc2hhcmVkL2NvbXBvbmVudHMvY29uZmlybWF0aW9uLW1lc3NhZ2UvQzpcXFdvcmtzcGFjZVxcUlRMRnVsbEFwcGxpY2F0aW9uL3NyY1xcYXBwXFxzaGFyZWRcXGNvbXBvbmVudHNcXGNvbmZpcm1hdGlvbi1tZXNzYWdlXFxjb25maXJtYXRpb24tbWVzc2FnZS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLHNCQUFxQixFQUN0Qjs7QUFFRDtFQUNFLHVCQUFzQixFQUN2QiIsImZpbGUiOiJzcmMvYXBwL3NoYXJlZC9jb21wb25lbnRzL2NvbmZpcm1hdGlvbi1tZXNzYWdlL2NvbmZpcm1hdGlvbi1tZXNzYWdlLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1saW5lIHtcclxuICB3aGl0ZS1zcGFjZTogcHJlLXdyYXA7XHJcbn1cclxuXHJcbi53cmFwLXRleHQge1xyXG4gIHdvcmQtYnJlYWs6IGJyZWFrLXdvcmQ7XHJcbn1cclxuIl19 */"
/***/ }),
/***/ "./src/app/shared/components/confirmation-message/confirmation-message.component.ts":
/*!******************************************************************************************!*\
!*** ./src/app/shared/components/confirmation-message/confirmation-message.component.ts ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var ConfirmationMessageComponent = /** @class */ (function () {
function ConfirmationMessageComponent(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
this.msgTypeBackground = 'bg-primary p-1';
this.msgTypeForeground = 'primary';
}
ConfirmationMessageComponent.prototype.ngOnInit = function () {
// INFO/WARN/ERROR/SUCCESS/CONFIRM
if (this.data.type === 'WARN') {
this.msgTypeBackground = 'bg-accent p-1';
}
if (this.data.type === 'ERROR') {
this.msgTypeBackground = 'bg-warn p-1';
this.msgTypeForeground = 'warn';
}
};
ConfirmationMessageComponent.prototype.onClose = function () {
this.dialogRef.close(false);
};
ConfirmationMessageComponent = __decorate([
core_1.Component({
selector: 'rtl-confirmation-message',
template: __webpack_require__(/*! ./confirmation-message.component.html */ "./src/app/shared/components/confirmation-message/confirmation-message.component.html"),
styles: [__webpack_require__(/*! ./confirmation-message.component.scss */ "./src/app/shared/components/confirmation-message/confirmation-message.component.scss")]
}),
__param(1, core_1.Inject(material_1.MAT_DIALOG_DATA)),
__metadata("design:paramtypes", [material_1.MatDialogRef, Object])
], ConfirmationMessageComponent);
return ConfirmationMessageComponent;
}());
exports.ConfirmationMessageComponent = ConfirmationMessageComponent;
/***/ }),
/***/ "./src/app/shared/components/not-found/not-found.component.html":
/*!**********************************************************************!*\
!*** ./src/app/shared/components/not-found/not-found.component.html ***!
\**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div fxLayout=\"column\" fxLayoutAlign=\"center center\">\r\n <mat-card class=\"mat-elevation-z24 not-found-box\">\r\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" class=\"bg-primary\">\r\n <button mat-fab color=\"accent\" class=\"mat-elevation-z12\">\r\n <mat-icon>error</mat-icon>\r\n </button>\r\n <h1 class=\"error\">404</h1>\r\n </div>\r\n <mat-card-content fxLayout=\"row\" fxLayoutAlign=\"center center\">\r\n <mat-card fxLayout=\"column\" fxLayoutAlign=\"center center\" class=\"mat-elevation-z12 w-100\">\r\n <div class=\"box-text\">This page does not exist!!!</div>\r\n <button mat-raised-button color=\"primary\" class=\"mat-elevation-z12 padding-gap-x\" type=\"button\" (click)=\"goHome()\">HOME</button>\r\n </mat-card>\r\n </mat-card-content>\r\n </mat-card>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/shared/components/not-found/not-found.component.ts":
/*!********************************************************************!*\
!*** ./src/app/shared/components/not-found/not-found.component.ts ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var NotFoundComponent = /** @class */ (function () {
function NotFoundComponent(router) {
this.router = router;
}
NotFoundComponent.prototype.goHome = function () {
this.router.navigate(['/']);
};
NotFoundComponent = __decorate([
core_1.Component({
selector: 'rtl-not-found',
template: __webpack_require__(/*! ./not-found.component.html */ "./src/app/shared/components/not-found/not-found.component.html")
}),
__metadata("design:paramtypes", [router_1.Router])
], NotFoundComponent);
return NotFoundComponent;
}());
exports.NotFoundComponent = NotFoundComponent;
/***/ }),
/***/ "./src/app/shared/components/settings-nav/settings-nav.component.html":
/*!****************************************************************************!*\
!*** ./src/app/shared/components/settings-nav/settings-nav.component.html ***!
\****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<mat-toolbar color=\"primary\" fxLayoutAlign = \"space-between center\" class=\"\">\r\n <h4>Settings</h4>\r\n</mat-toolbar>\r\n<div fxLayout=\"column\" class=\"container\">\r\n <button fxLayoutAlign=\"center center\" mat-raised-button color=\"accent\" class=\"mt-2\" type=\"reset\" (click)=\"onClose()\">Close</button>\r\n <div fxLayout=\"column\">\r\n <h4>Currency Unit</h4>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\r\n <span>{{information?.currency_unit}}</span>\r\n <mat-slide-toggle [checked]=\"settings?.satsToBTC\" (change)=\"toggleSettings('satsToBTC')\" labelPosition=\"before\"></mat-slide-toggle>\r\n </div>\r\n <mat-divider class=\"mt-2\"></mat-divider>\r\n <h4>Menu</h4>\r\n <mat-radio-group [(ngModel)]=\"selectedMenu\" (change)=\"chooseMenu()\">\r\n <mat-radio-button *ngFor=\"let menu of menus\" [value]=\"menu\">{{menu}}</mat-radio-button>\r\n </mat-radio-group>\r\n <mat-divider class=\"mt-2\"></mat-divider>\r\n <h4>Menu Type</h4>\r\n <mat-radio-group [(ngModel)]=\"selectedMenuType\" (change)=\"chooseMenuType()\">\r\n <mat-radio-button *ngFor=\"let menuType of menuTypes\" [value]=\"menuType\">{{menuType}}</mat-radio-button>\r\n </mat-radio-group>\r\n <mat-divider class=\"mt-2\"></mat-divider>\r\n <div fxLayout=\"column\">\r\n <h4>Sidenav Options</h4>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\r\n <span>Opened</span>\r\n <mat-slide-toggle checked=\"settings.flgSidenavOpened\" (change)=\"toggleSettings('flgSidenavOpened')\"\r\n labelPosition=\"before\"></mat-slide-toggle>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\r\n <span>Pinned</span>\r\n <mat-slide-toggle checked=\"settings.flgSidenavPinned\" (change)=\"toggleSettings('flgSidenavPinned')\"\r\n labelPosition=\"before\"></mat-slide-toggle>\r\n </div>\r\n </div>\r\n <mat-divider class=\"mt-2\"></mat-divider>\r\n <h4>Skins</h4>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\" class=\"p-0\">\r\n <div class=\"skin dark-blue m-1px\" (click)=\"changeTheme('dark-blue')\"></div>\r\n <div class=\"skin dark-green m-1px\" (click)=\"changeTheme('dark-green')\"></div>\r\n <div class=\"skin dark-pink m-1px\" (click)=\"changeTheme('dark-pink')\"></div>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\" class=\"p-0\">\r\n <div class=\"skin light-blue m-1px\" (click)=\"changeTheme('light-blue')\"></div>\r\n <div class=\"skin light-teal m-1px\" (click)=\"changeTheme('light-teal')\"></div>\r\n <div class=\"skin light-red m-1px\" (click)=\"changeTheme('light-red')\"></div>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\" class=\"p-0\">\r\n <div class=\"skin bluegray-amber m-1px\" (click)=\"changeTheme('bluegray-amber')\"></div>\r\n <div class=\"skin bluegray-deeppurple m-1px\" (click)=\"changeTheme('bluegray-deeppurple')\"></div>\r\n <div class=\"skin bluegray-lightgreen m-1px\" (click)=\"changeTheme('bluegray-lightgreen')\"></div>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\" class=\"p-0\">\r\n <div class=\"skin gray-blue m-1px\" (click)=\"changeTheme('gray-blue')\"></div>\r\n <div class=\"skin gray-lime m-1px\" (click)=\"changeTheme('gray-lime')\"></div>\r\n <div class=\"skin gray-purple m-1px\" (click)=\"changeTheme('gray-purple')\"></div>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\" class=\"p-0\">\r\n <div class=\"skin self-gray m-1px\" (click)=\"changeTheme('self-gray')\"></div>\r\n <div class=\"skin self-blue m-1px\" (click)=\"changeTheme('self-blue')\"></div>\r\n <div class=\"skin self-brown m-1px\" (click)=\"changeTheme('self-brown')\"></div>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\" class=\"p-0\">\r\n <div class=\"skin self-yellow m-1px\" (click)=\"changeTheme('self-yellow')\"></div>\r\n <div class=\"skin self-green m-1px\" (click)=\"changeTheme('self-green')\"></div>\r\n <div class=\"skin self-pink m-1px\" (click)=\"changeTheme('self-pink')\"></div>\r\n </div>\r\n <mat-divider class=\"mt-2\"></mat-divider>\r\n </div>\r\n</div>\r\n"
/***/ }),
/***/ "./src/app/shared/components/settings-nav/settings-nav.component.scss":
/*!****************************************************************************!*\
!*** ./src/app/shared/components/settings-nav/settings-nav.component.scss ***!
\****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3NoYXJlZC9jb21wb25lbnRzL3NldHRpbmdzLW5hdi9zZXR0aW5ncy1uYXYuY29tcG9uZW50LnNjc3MifQ== */"
/***/ }),
/***/ "./src/app/shared/components/settings-nav/settings-nav.component.ts":
/*!**************************************************************************!*\
!*** ./src/app/shared/components/settings-nav/settings-nav.component.ts ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var rtl_service_1 = __webpack_require__(/*! ../../services/rtl.service */ "./src/app/shared/services/rtl.service.ts");
var logger_service_1 = __webpack_require__(/*! ../../services/logger.service */ "./src/app/shared/services/logger.service.ts");
var SettingsNavComponent = /** @class */ (function () {
function SettingsNavComponent(rtlService, logger) {
this.rtlService = rtlService;
this.logger = logger;
this.information = {};
this.menus = ['Vertical', 'Horizontal'];
this.menuTypes = ['Regular', 'Compact', 'Mini'];
this.unsubs = [new rxjs_1.Subject(), new rxjs_1.Subject()];
this.done = new core_1.EventEmitter();
this.settings = this.rtlService.getUISettings();
this.selectedMenu = this.settings.menu;
this.selectedMenuType = this.settings.menuType;
if (window.innerWidth <= 768) {
this.settings.menu = 'Vertical';
this.settings.flgSidenavOpened = false;
this.settings.flgSidenavPinned = false;
}
}
SettingsNavComponent.prototype.ngOnInit = function () {
var _this = this;
this.rtlService.UIsettingsUpdated
.pipe(operators_1.takeUntil(this.unsubs[0]))
.subscribe(function (settings) {
_this.settings = settings;
_this.selectedMenu = _this.settings.menu;
_this.selectedMenuType = _this.settings.menuType;
if (window.innerWidth <= 768) {
_this.settings.menu = 'Vertical';
_this.settings.flgSidenavOpened = false;
_this.settings.flgSidenavPinned = false;
}
_this.logger.info(_this.settings);
});
if (undefined === this.information.currency_unit) {
this.information = this.rtlService.readInformation();
if (undefined === this.information.currency_unit) {
this.rtlService.getInfo();
}
}
this.rtlService.informationUpdated
.pipe(operators_1.takeUntil(this.unsubs[1]))
.subscribe(function (data) {
_this.information = data;
_this.logger.info(_this.information);
});
};
SettingsNavComponent.prototype.chooseMenu = function () {
this.settings.menu = this.selectedMenu;
// this.rtlService.updateUISettings(this.settings);
};
SettingsNavComponent.prototype.chooseMenuType = function () {
this.settings.menuType = this.selectedMenuType;
// this.rtlService.updateUISettings(this.settings);
};
SettingsNavComponent.prototype.toggleSettings = function (toggleField) {
this.settings[toggleField] = !this.settings[toggleField];
// this.rtlService.updateUISettings(this.settings);
};
SettingsNavComponent.prototype.changeTheme = function (newTheme) {
this.settings.theme = newTheme;
// this.rtlService.updateUISettings(this.settings);
};
SettingsNavComponent.prototype.onClose = function () {
this.logger.info(this.settings);
this.rtlService.updateUISettings(this.settings);
this.done.emit();
};
SettingsNavComponent.prototype.ngOnDestroy = function () {
this.unsubs.forEach(function (unsub) {
unsub.next();
unsub.complete();
});
};
__decorate([
core_1.Output('done'),
__metadata("design:type", core_1.EventEmitter)
], SettingsNavComponent.prototype, "done", void 0);
SettingsNavComponent = __decorate([
core_1.Component({
selector: 'rtl-settings-nav',
template: __webpack_require__(/*! ./settings-nav.component.html */ "./src/app/shared/components/settings-nav/settings-nav.component.html"),
styles: [__webpack_require__(/*! ./settings-nav.component.scss */ "./src/app/shared/components/settings-nav/settings-nav.component.scss")]
}),
__metadata("design:paramtypes", [rtl_service_1.RTLService, logger_service_1.LoggerService])
], SettingsNavComponent);
return SettingsNavComponent;
}());
exports.SettingsNavComponent = SettingsNavComponent;
/***/ }),
/***/ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.html":
/*!********************************************************************************!*\
!*** ./src/app/shared/components/spinner-dialog/spinner-dialog.component.html ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"spinner-container\">\n <div class=\"spinner-circle\">\n <mat-spinner color=\"primary\"></mat-spinner>\n <h4 fxLayoutAlign=\"center\">{{data.message}}</h4>\n </div>\n</div>\n"
/***/ }),
/***/ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.scss":
/*!********************************************************************************!*\
!*** ./src/app/shared/components/spinner-dialog/spinner-dialog.component.scss ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".spinner-container {\n position: absolute;\n left: 50%; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc2hhcmVkL2NvbXBvbmVudHMvc3Bpbm5lci1kaWFsb2cvQzpcXFdvcmtzcGFjZVxcUlRMRnVsbEFwcGxpY2F0aW9uL3NyY1xcYXBwXFxzaGFyZWRcXGNvbXBvbmVudHNcXHNwaW5uZXItZGlhbG9nXFxzcGlubmVyLWRpYWxvZy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLG1CQUFrQjtFQUNsQixVQUFTLEVBQ1YiLCJmaWxlIjoic3JjL2FwcC9zaGFyZWQvY29tcG9uZW50cy9zcGlubmVyLWRpYWxvZy9zcGlubmVyLWRpYWxvZy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5zcGlubmVyLWNvbnRhaW5lciB7XHJcbiAgcG9zaXRpb246IGFic29sdXRlO1xyXG4gIGxlZnQ6IDUwJTtcclxufVxyXG4iXX0= */"
/***/ }),
/***/ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.ts":
/*!******************************************************************************!*\
!*** ./src/app/shared/components/spinner-dialog/spinner-dialog.component.ts ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var SpinnerDialogComponent = /** @class */ (function () {
function SpinnerDialogComponent(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
}
SpinnerDialogComponent.prototype.ngOnInit = function () {
};
SpinnerDialogComponent = __decorate([
core_1.Component({
selector: 'rtl-spinner-dialog',
template: __webpack_require__(/*! ./spinner-dialog.component.html */ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.html"),
styles: [__webpack_require__(/*! ./spinner-dialog.component.scss */ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.scss")]
}),
__param(1, core_1.Inject(material_1.MAT_DIALOG_DATA)),
__metadata("design:paramtypes", [material_1.MatDialogRef, Object])
], SpinnerDialogComponent);
return SpinnerDialogComponent;
}());
exports.SpinnerDialogComponent = SpinnerDialogComponent;
/***/ }),
/***/ "./src/app/shared/models/navMenu.ts":
/*!******************************************!*\
!*** ./src/app/shared/models/navMenu.ts ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MENU_DATA = {
name: 'root',
icon: 'root',
link: 'root',
children: [
{ name: 'Home', icon: 'home', link: '/home' },
{ name: 'LND Wallet', icon: 'account_balance_wallet', link: '/wallet' },
{ name: 'Peers', icon: 'group', link: '/peers' },
{ name: 'Channels', icon: 'settings_ethernet', link: '', children: [
{ name: 'Dashboard', icon: 'dashboard', link: '/chnldashboard' },
{ name: 'Management', icon: 'subtitles', link: '/chnlmanage' }
] },
{ name: 'Payments', icon: 'payment', link: '', children: [
{ name: 'List Payments', icon: 'list', link: '/listpayments' },
{ name: 'Send Payment', icon: 'playlist_add', link: '/sendpayment' }
] },
{ name: 'Node Config', icon: 'perm_data_setting', link: '/sconfig' },
{ name: 'Help', icon: 'help', link: '/help' }
]
};
var MenuNode = /** @class */ (function () {
function MenuNode() {
}
return MenuNode;
}());
exports.MenuNode = MenuNode;
var FlatMenuNode = /** @class */ (function () {
function FlatMenuNode(expandable, level, name, icon, link) {
this.expandable = expandable;
this.level = level;
this.name = name;
this.icon = icon;
this.link = link;
}
return FlatMenuNode;
}());
exports.FlatMenuNode = FlatMenuNode;
/***/ }),
/***/ "./src/app/shared/models/settings.ts":
/*!*******************************************!*\
!*** ./src/app/shared/models/settings.ts ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Settings = /** @class */ (function () {
function Settings(flgSidenavOpened, flgSidenavPinned, menu, menuType, theme, lndConfigPath, satsToBTC) {
this.flgSidenavOpened = flgSidenavOpened;
this.flgSidenavPinned = flgSidenavPinned;
this.menu = menu;
this.menuType = menuType;
this.theme = theme;
this.lndConfigPath = lndConfigPath;
this.satsToBTC = satsToBTC;
}
return Settings;
}());
exports.Settings = Settings;
/***/ }),
/***/ "./src/app/shared/services/logger.service.ts":
/*!***************************************************!*\
!*** ./src/app/shared/services/logger.service.ts ***!
\***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var environment_1 = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts");
exports.isDebugMode = environment_1.environment.isDebugMode;
var noop = function () { return undefined; };
var Logger = /** @class */ (function () {
function Logger() {
}
return Logger;
}());
exports.Logger = Logger;
var LoggerService = /** @class */ (function () {
function LoggerService() {
}
LoggerService.prototype.invokeConsoleMethod = function (type, args) { };
LoggerService = __decorate([
core_1.Injectable()
], LoggerService);
return LoggerService;
}());
exports.LoggerService = LoggerService;
var ConsoleLoggerService = /** @class */ (function () {
function ConsoleLoggerService() {
}
Object.defineProperty(ConsoleLoggerService.prototype, "info", {
get: function () {
if (exports.isDebugMode) {
return console.info.bind(console);
}
else {
return noop;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(ConsoleLoggerService.prototype, "warn", {
get: function () {
if (exports.isDebugMode) {
return console.warn.bind(console);
}
else {
return noop;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(ConsoleLoggerService.prototype, "error", {
get: function () {
if (exports.isDebugMode) {
return console.error.bind(console);
}
else {
return noop;
}
},
enumerable: true,
configurable: true
});
ConsoleLoggerService.prototype.invokeConsoleMethod = function (type, args) {
var logFn = (console)[type] || console.log || noop;
logFn.apply(console, [args]);
};
ConsoleLoggerService = __decorate([
core_1.Injectable()
], ConsoleLoggerService);
return ConsoleLoggerService;
}());
exports.ConsoleLoggerService = ConsoleLoggerService;
/***/ }),
/***/ "./src/app/shared/services/rtl.service.ts":
/*!************************************************!*\
!*** ./src/app/shared/services/rtl.service.ts ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
var rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var environment_1 = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts");
var logger_service_1 = __webpack_require__(/*! ./logger.service */ "./src/app/shared/services/logger.service.ts");
var settings_1 = __webpack_require__(/*! ../models/settings */ "./src/app/shared/models/settings.ts");
var RTLService = /** @class */ (function () {
function RTLService(http, logger) {
this.http = http;
this.logger = logger;
this.settings = new settings_1.Settings(true, true, 'horizontal', 'default', 'blue-dark', '', false);
this.information = {};
this.addressTypes = [];
this.peers = [];
this.UIsettingsUpdated = new rxjs_1.Subject();
this.informationUpdated = new rxjs_1.Subject();
this.setAddressType({ addressId: '0', addressTp: 'p2wkh', addressDetails: 'Pay to witness key hash' });
this.setAddressType({ addressId: '1', addressTp: 'np2wkh', addressDetails: 'Pay to nested witness key hash (default)' });
}
RTLService.prototype.readInformation = function () {
return this.information;
};
RTLService.prototype.getInfo = function () {
var _this = this;
this.http.get(environment_1.environment.GETINFO_API)
.subscribe(function (data) {
_this.information = data;
if (undefined !== _this.information.chains) {
_this.information.smaller_currency_unit = (_this.information.chains[0].toLowerCase().indexOf('bitcoin') < 0) ? 'Litoshis' : 'Sats';
_this.information.currency_unit = (_this.information.chains[0].toLowerCase().indexOf('bitcoin') < 0) ? 'LTC' : 'BTC';
}
else {
_this.information.smaller_currency_unit = 'Sats';
_this.information.currency_unit = 'BTC';
}
_this.information.version = (undefined === _this.information.version) ? '' : _this.information.version.split(' ')[0];
_this.logger.info(_this.information);
_this.informationUpdated.next(_this.information);
}, function (err) {
_this.informationUpdated.next(err);
});
};
RTLService.prototype.decodePayment = function (routeParam) {
return this.http.get(environment_1.environment.PAYREQUEST_API + '/' + routeParam);
};
RTLService.prototype.getChannels = function (routeParam, channelStatus) {
var options = (undefined === channelStatus || channelStatus === '') ? {} : { params: new http_1.HttpParams().set(channelStatus, 'true') };
return this.http.get(environment_1.environment.CHANNELS_API + '/' + routeParam, options);
};
RTLService.prototype.addChannel = function (pubkey, fundingAmt) {
return this.http.post(environment_1.environment.CHANNELS_API, { node_pubkey: pubkey, local_funding_amount: fundingAmt });
};
RTLService.prototype.closeChannel = function (channelPoint, forcibly) {
return this.http.delete(environment_1.environment.CHANNELS_API + '/' + channelPoint + '?force=' + forcibly);
};
RTLService.prototype.sendPayment = function (sendPaymentReq) {
return this.http.post(environment_1.environment.CHANNELS_API + '/transactions', { paymentReq: sendPaymentReq });
};
RTLService.prototype.getPeers = function () {
var _this = this;
if (this.peers.length > 0) {
return rxjs_1.of(this.peers);
}
else {
return this.http.get(environment_1.environment.PEERS_API)
.pipe(operators_1.map(function (data) {
_this.peers = data;
_this.peers.forEach(function (peer, idx) {
rxjs_1.forkJoin(_this.http.get(environment_1.environment.NETWORK_API + '/node/' + peer.pub_key))
.subscribe(function (_a) {
var res = _a[0];
_this.peers[idx].alias = res.node.alias;
});
});
return _this.peers;
}));
}
};
RTLService.prototype.addPeer = function (pubkey, host) {
return this.http.post(environment_1.environment.PEERS_API, { pubkey: pubkey, host: host, perm: false });
};
RTLService.prototype.getAddressTypes = function () {
return this.addressTypes;
};
RTLService.prototype.setAddressType = function (type) {
this.addressTypes.push(type);
};
RTLService.prototype.getPaymentsList = function () {
return this.http.get(environment_1.environment.PAYMENTS_API);
};
RTLService.prototype.getFees = function () {
return this.http.get(environment_1.environment.FEES_API);
};
RTLService.prototype.getNewAddress = function (selAddr) {
return this.http.get(environment_1.environment.NEW_ADDRESS_API + '?type=' + selAddr.addressId);
};
RTLService.prototype.setTransactions = function (trans) {
return this.http.post(environment_1.environment.TRANSACTIONS_API, { amount: trans.amount, address: trans.address, fees: trans.fees, blocks: trans.blocks });
};
RTLService.prototype.getBalance = function (routeParam) {
if (undefined === routeParam || null === routeParam) {
routeParam = '';
}
return this.http.get(environment_1.environment.BALANCE_API + '/' + routeParam);
};
RTLService.prototype.operateWallet = function (operation, pwd) {
return this.http.post(environment_1.environment.WALLET_API + '/' + operation, { wallet_password: pwd });
};
RTLService.prototype.getNetworkInfo = function () {
return this.http.get(environment_1.environment.NETWORK_API + '/info');
};
RTLService.prototype.getGraphNode = function (pubkey) {
return this.http.get(environment_1.environment.NETWORK_API + '/node/' + pubkey);
};
RTLService.prototype.fetchLNDServerConfig = function (filePath) {
var filePathHeader = new http_1.HttpHeaders({ filePath: filePath });
return this.http.get(environment_1.environment.LND_SERVER_CONFIG_API, { headers: filePathHeader });
};
RTLService.prototype.getUISettings = function () {
return this.settings;
};
RTLService.prototype.setUISettings = function (newSettings) {
this.settings = newSettings;
this.UIsettingsUpdated.next(this.settings);
};
RTLService.prototype.fetchUISettings = function () {
var _this = this;
this.http.get(environment_1.environment.UI_SETTINGS_API)
.subscribe(function (data) {
_this.settings = data.settings;
_this.logger.info(_this.settings);
_this.UIsettingsUpdated.next(_this.settings);
});
};
RTLService.prototype.updateUISettings = function (settings) {
var _this = this;
this.logger.info('Updated Settings:');
this.logger.info(settings);
this.http.post(environment_1.environment.UI_SETTINGS_API, { updatedSettings: settings })
.subscribe(function (data) {
_this.logger.info(data);
_this.settings = settings;
_this.UIsettingsUpdated.next(settings);
}, function (err) {
_this.logger.error('UI Settings Updation Failed!');
});
};
RTLService = __decorate([
core_1.Injectable(),
__metadata("design:paramtypes", [http_1.HttpClient, logger_service_1.LoggerService])
], RTLService);
return RTLService;
}());
exports.RTLService = RTLService;
/***/ }),
/***/ "./src/app/shared/shared.module.ts":
/*!*****************************************!*\
!*** ./src/app/shared/shared.module.ts ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
var forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
var flex_layout_1 = __webpack_require__(/*! @angular/flex-layout */ "./node_modules/@angular/flex-layout/esm5/flex-layout.es5.js");
var material_1 = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
var alert_message_component_1 = __webpack_require__(/*! ./components/alert-message/alert-message.component */ "./src/app/shared/components/alert-message/alert-message.component.ts");
var confirmation_message_component_1 = __webpack_require__(/*! ./components/confirmation-message/confirmation-message.component */ "./src/app/shared/components/confirmation-message/confirmation-message.component.ts");
var spinner_dialog_component_1 = __webpack_require__(/*! ./components/spinner-dialog/spinner-dialog.component */ "./src/app/shared/components/spinner-dialog/spinner-dialog.component.ts");
var not_found_component_1 = __webpack_require__(/*! ./components/not-found/not-found.component */ "./src/app/shared/components/not-found/not-found.component.ts");
var settings_nav_component_1 = __webpack_require__(/*! ./components/settings-nav/settings-nav.component */ "./src/app/shared/components/settings-nav/settings-nav.component.ts");
var SharedModule = /** @class */ (function () {
function SharedModule() {
}
SharedModule = __decorate([
core_1.NgModule({
imports: [
common_1.CommonModule,
forms_1.FormsModule,
forms_1.ReactiveFormsModule,
flex_layout_1.FlexLayoutModule,
material_1.MatButtonModule,
material_1.MatButtonToggleModule,
material_1.MatCardModule,
material_1.MatCheckboxModule,
material_1.MatDialogModule,
material_1.MatExpansionModule,
material_1.MatGridListModule,
material_1.MatIconModule,
material_1.MatInputModule,
material_1.MatListModule,
material_1.MatMenuModule,
material_1.MatProgressBarModule,
material_1.MatProgressSpinnerModule,
material_1.MatRadioModule,
material_1.MatTreeModule,
material_1.MatSelectModule,
material_1.MatSidenavModule,
material_1.MatSlideToggleModule,
material_1.MatSortModule,
material_1.MatTableModule,
material_1.MatToolbarModule,
material_1.MatTooltipModule
],
exports: [
flex_layout_1.FlexLayoutModule,
material_1.MatButtonModule,
material_1.MatButtonToggleModule,
material_1.MatCardModule,
material_1.MatCheckboxModule,
material_1.MatDialogModule,
material_1.MatExpansionModule,
material_1.MatGridListModule,
material_1.MatIconModule,
material_1.MatInputModule,
material_1.MatListModule,
material_1.MatMenuModule,
material_1.MatProgressBarModule,
material_1.MatProgressSpinnerModule,
material_1.MatRadioModule,
material_1.MatTreeModule,
material_1.MatSelectModule,
material_1.MatSidenavModule,
material_1.MatSlideToggleModule,
material_1.MatSortModule,
material_1.MatTableModule,
material_1.MatToolbarModule,
material_1.MatTooltipModule,
alert_message_component_1.AlertMessageComponent,
confirmation_message_component_1.ConfirmationMessageComponent,
spinner_dialog_component_1.SpinnerDialogComponent,
not_found_component_1.NotFoundComponent,
settings_nav_component_1.SettingsNavComponent
],
declarations: [
alert_message_component_1.AlertMessageComponent,
confirmation_message_component_1.ConfirmationMessageComponent,
spinner_dialog_component_1.SpinnerDialogComponent,
not_found_component_1.NotFoundComponent,
settings_nav_component_1.SettingsNavComponent
],
entryComponents: [
alert_message_component_1.AlertMessageComponent,
spinner_dialog_component_1.SpinnerDialogComponent,
confirmation_message_component_1.ConfirmationMessageComponent
],
providers: [
{ provide: material_1.MAT_DIALOG_DEFAULT_OPTIONS, useValue: { hasBackdrop: true, autoFocus: true, disableClose: true, role: 'dialog', width: '700px' } }
]
})
], SharedModule);
return SharedModule;
}());
exports.SharedModule = SharedModule;
/***/ }),
/***/ "./src/app/shared/theme/overlay-container/theme-overlay.ts":
/*!*****************************************************************!*\
!*** ./src/app/shared/theme/overlay-container/theme-overlay.ts ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var overlay_1 = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
var ThemeOverlay = /** @class */ (function (_super) {
__extends(ThemeOverlay, _super);
function ThemeOverlay() {
return _super !== null && _super.apply(this, arguments) || this;
}
ThemeOverlay.prototype._createContainer = function () {
var container = document.createElement('div');
container.classList.add('cdk-overlay-container');
document.getElementById('rtl-container').appendChild(container);
this._containerElement = container;
};
ThemeOverlay = __decorate([
core_1.Injectable()
], ThemeOverlay);
return ThemeOverlay;
}(overlay_1.OverlayContainer));
exports.ThemeOverlay = ThemeOverlay;
/***/ }),
/***/ "./src/environments/environment.ts":
/*!*****************************************!*\
!*** ./src/environments/environment.ts ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var version_1 = __webpack_require__(/*! ./version */ "./src/environments/version.ts");
exports.API_URL = 'http://localhost:3000/api';
exports.environment = {
production: false,
isDebugMode: true,
BALANCE_API: exports.API_URL + '/balance',
FEES_API: exports.API_URL + '/fees',
PEERS_API: exports.API_URL + '/peers',
CHANNELS_API: exports.API_URL + '/channels',
GETINFO_API: exports.API_URL + '/getinfo',
WALLET_API: exports.API_URL + '/wallet',
NETWORK_API: exports.API_URL + '/network',
NEW_ADDRESS_API: exports.API_URL + '/newaddress',
TRANSACTIONS_API: exports.API_URL + '/transactions',
UI_SETTINGS_API: exports.API_URL + '/uisettings',
LND_SERVER_CONFIG_API: exports.API_URL + '/lndconf',
PAYREQUEST_API: exports.API_URL + '/payreq',
PAYMENTS_API: exports.API_URL + '/payments',
VERSION: version_1.VERSION
};
/***/ }),
/***/ "./src/environments/version.ts":
/*!*************************************!*\
!*** ./src/environments/version.ts ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = '0.0.3-alpha';
/***/ }),
/***/ "./src/main.ts":
/*!*********************!*\
!*** ./src/main.ts ***!
\*********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(/*! hammerjs */ "./node_modules/hammerjs/hammer.js");
var core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var platform_browser_dynamic_1 = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js");
var app_module_1 = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts");
var environment_1 = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts");
if (environment_1.environment.production) {
core_1.enableProdMode();
}
platform_browser_dynamic_1.platformBrowserDynamic().bootstrapModule(app_module_1.AppModule).catch(function (err) { return console.log(err); });
/***/ }),
/***/ 0:
/*!***************************!*\
!*** multi ./src/main.ts ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! C:\Workspace\RTLFullApplication\src\main.ts */"./src/main.ts");
/***/ })
},[[0,"runtime","vendor"]]]);
//# sourceMappingURL=main.js.map