parent
c2e96740e4
commit
860e72800e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],l=r[2],p=0,s=[];p<i.length;p++)o[a=i[p]]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,l||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"50859d501eab13ab41b8",6:"244e17a7d7b515a4b924",7:"3c3b40e20ade1c335151"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(l);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var l=0;l<i.length;l++)r(i[l]);var f=c;t()}([]);
|
@ -1 +0,0 @@
|
||||
!function(e){function r(r){for(var n,i,a=r[0],c=r[1],f=r[2],p=0,s=[];p<a.length;p++)o[i=a[p]]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++)0!==o[t[a]]&&(n=!1);n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={0:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+""+({}[e]||e)+"."+{1:"c7ef37d92d6c98e58e25",6:"bb075656f8b4a826eed4",7:"207f6b0883d4876d89ed"}[e]+".js"}(e);var c=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,(function(r){return e[r]}).bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="",i.oe=function(e){throw console.error(e),e};var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var f=0;f<a.length;f++)r(a[f]);var l=c;t()}([]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
||||
tr.mat-footer-row td.mat-footer-cell {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
@ -1,69 +1,47 @@
|
||||
<div fxLayout="column">
|
||||
<div class="padding-gap" *ngIf="allRestoreExists">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-subtitle>
|
||||
<h2>Channels Restore</h2>
|
||||
</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div fxLayout="column" fxLayout.gt-sm="row wrap" fxFlex="100" fxLayoutAlign="space-between start">
|
||||
<h4 fxFlex="100">Restore folder location: {{selNode.channelBackupPath}}/restore</h4>
|
||||
<button fxFlex="49" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="1"
|
||||
(click)="onRestoreChannels({})">Restore All Channels</button>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<div fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap" *ngIf="allRestoreExists">
|
||||
<h4 fxFlex="100" class="mt-1">Restore folder location: {{selNode.channelBackupPath}}/restore</h4>
|
||||
<div fxLayout="row" fxFlex.gt-sm="20" fxLayoutAlign="start start" class="mt-2">
|
||||
<button fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="1" (click)="onRestoreChannels({})">Restore All Channels</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="padding-gap" *ngIf="!allRestoreExists && (!channels || channels.data.length<=0)">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-subtitle>
|
||||
<h2>Channels Restore</h2>
|
||||
<h4 fxLayout="row" fxLayoutAlign="start start" class="pt-2">
|
||||
Restore folder location: {{selNode.channelBackupPath}}/restore
|
||||
</h4>
|
||||
</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="table-card-content">
|
||||
Backup file/s not found!<br>To perform channel restoration, channel backup file/s must be placed at the above location.
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<div fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap" *ngIf="!allRestoreExists && (!channels || channels.data.length<=0)">
|
||||
<h4 fxFlex="100" class="mt-1">Restore folder location: {{selNode.channelBackupPath}}/restore</h4>
|
||||
<h4 fxFlex="100" class="mt-1">All channel backup file not found! To perform channel restoration, channel backup file/s must be placed at the above location.</h4>
|
||||
</div>
|
||||
<div class="padding-gap" *ngIf="channels && channels.data.length>0">
|
||||
<mat-card>
|
||||
<mat-card-header *ngIf="!allRestoreExists">
|
||||
<mat-card-subtitle>
|
||||
<h2>Channels Restore</h2>
|
||||
<h4 fxLayout="row" fxLayoutAlign="start start" class="pt-2">Restore folder location:
|
||||
{{selNode.channelBackupPath}}/restore</h4>
|
||||
</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="table-card-content">
|
||||
<div fxLayout="row" fxLayoutAlign="start start">
|
||||
<mat-form-field fxFlex="30">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div perfectScrollbar class="table-container">
|
||||
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
|
||||
<table mat-table #table [dataSource]="channels" matSort
|
||||
[ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
|
||||
<ng-container matColumnDef="chan_point">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </th>
|
||||
<td mat-cell *matCellDef="let channel">{{channel?.channel_point}}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="restore">
|
||||
<th mat-header-cell *matHeaderCellDef>Restore</th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<mat-icon color="primary" (click)="onRestoreChannels(channel)">restore</mat-icon>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: flgSticky;"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<div fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap" *ngIf="!allRestoreExists && channels && channels.data.length && channels.data.length>0">
|
||||
<h4 fxFlex="100" class="mt-1">Restore folder location: {{selNode.channelBackupPath}}/restore</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-sub-title-container mt-minus-2">
|
||||
<div fxFlex="70"></div>
|
||||
<mat-form-field fxFlex="30">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div perfectScrollbar fxLayout="row" fxLayoutAlign="start center" fxFlex="100" class="table-container">
|
||||
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
|
||||
<table mat-table #table [dataSource]="channels" matSort [ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
|
||||
<ng-container matColumnDef="channel_point">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </th>
|
||||
<td mat-cell *matCellDef="let channel">{{channel?.channel_point}}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef class="pl-4 pr-3"><span fxLayoutAlign="end center">Actions</span></th>
|
||||
<td mat-cell *matCellDef="let channel" class="pl-4">
|
||||
<span fxLayoutAlign="end center">
|
||||
<button mat-stroked-button color="primary" type="button" tabindex="1" (click)="onRestoreChannels(channel)">Restore</button>
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="no_channel">
|
||||
<td mat-footer-cell *matFooterCellDef colspan="4">
|
||||
<p *ngIf="!channels || !channels.data || channels.data.length<1">No singular channel backups available.</p>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-footer-row *matFooterRowDef="['no_channel']" [ngClass]="{'display-none': channels && channels.data && channels.data.length>0}"></tr>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: flgSticky;"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</div>
|
||||
<mat-paginator [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions" showFirstLastButtons class="mb-4"></mat-paginator>
|
||||
</div>
|
||||
|
@ -1,12 +1,6 @@
|
||||
.mat-column-chan_point {
|
||||
flex: 1 1 25%;
|
||||
min-width: 100px;
|
||||
max-width: 100px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1 1 25%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
table {
|
||||
width:100%;
|
||||
}
|
@ -1,124 +0,0 @@
|
||||
<div fxLayout="column">
|
||||
<div class="padding-gap">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-subtitle>
|
||||
<h2>Unlock/Initialize Wallet</h2>
|
||||
</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div fxLayout="column" fxFlex="100" fxLayoutAlign="start">
|
||||
<div fxLayout="row" fxFlex.gt-sm="100"><div fxLayout="column" fxFlex="40" fxFlex.lt-sm="100">
|
||||
<mat-radio-group [(ngModel)]="walletOperation" color="primary" aria-label="Select an option" fxLayoutAlign="space-between">
|
||||
<mat-radio-button value="unlock" tabindex="1">Unlock</mat-radio-button>
|
||||
<mat-radio-button value="init" tabindex="2">Initialize</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
</div></div>
|
||||
<div *ngIf="walletOperation === 'unlock'; else initBlock">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
|
||||
<mat-form-field fxFlex="65" fxLayoutAlign="start">
|
||||
<input matInput type="password" placeholder="Password" name="walletPassword" [(ngModel)]="walletPassword" tabindex="3" required>
|
||||
<mat-hint>Enter Wallet Password</mat-hint>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button fxFlex="15" color="primary" [disabled]="walletPassword == ''" (click)="onOperateWallet()" tabindex="4">Unlock Wallet</button>
|
||||
<button fxFlex="15" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="5" type="reset" (click)="resetData()">Clear</button>
|
||||
</form>
|
||||
</div>
|
||||
<ng-template #initBlock>
|
||||
<div *ngIf="insecureLND && !warnRes">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
|
||||
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message">Warning: Your connection is unsecure, it's not safe to generate private keys over this connection.Are you sure you want to proceed?</div>
|
||||
<button mat-raised-button fxFlex="15" color="primary" type="submit" (click)="proceed=true;warnRes=true" tabindex="4">Proceed</button>
|
||||
<button fxFlex="15" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="5" type="reset" (click)="proceed=false;warnRes=true">Cancel</button>
|
||||
</form>
|
||||
</div>
|
||||
<div *ngIf="warnRes && !proceed" fxFlex="100" fxLayoutAlign="start" class="insecure-message mt-2">Please reconfig & restart RTL after securing your LND connction. You can close this window now.</div>
|
||||
<mat-vertical-stepper *ngIf="(!insecureLND || (warnRes && proceed)) && genSeedResponse.length <= 0 && initWalletResponse === ''" [linear]="true" #stepper>
|
||||
<mat-step [stepControl]="passwordFormGroup" label="Wallet Password" state="password">
|
||||
<form [formGroup]="passwordFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
|
||||
<mat-form-field fxFlex="44" fxLayoutAlign="start">
|
||||
<input matInput type="password" placeholder="Password" name="initWalletPassword" formControlName="initWalletPassword" tabindex="6" required>
|
||||
<mat-hint>Enter Wallet Password</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex="44" fxLayoutAlign="start">
|
||||
<input matInput type="password" placeholder="Confirm Password" name="initWalletConfirmPassword" formControlName="initWalletConfirmPassword" tabindex="7" required>
|
||||
<mat-hint>Confirm Wallet Password</mat-hint>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" fxFlex="10" [disabled]="!passwordFormGroup.valid" type="submit" matStepperNext>Next</button>
|
||||
<div *ngIf="passwordFormGroup.controls.initWalletPassword.errors?.minlength && (passwordFormGroup.controls.initWalletPassword.touched || passwordFormGroup.controls.initWalletPassword.dirty)" class="validation-error-message">
|
||||
<mat-icon class="validation-error-icon red">cancel</mat-icon>Password must be at least 8 characters in length.
|
||||
</div>
|
||||
<div *ngIf="passwordFormGroup.errors?.unmatchedPasswords && (passwordFormGroup.controls.initWalletPassword.touched || passwordFormGroup.controls.initWalletPassword.dirty) && (passwordFormGroup.controls.initWalletConfirmPassword.touched || passwordFormGroup.controls.initWalletConfirmPassword.dirty)" class="validation-error-message">
|
||||
<mat-icon class="validation-error-icon red">cancel</mat-icon>Passwords do not match.
|
||||
</div>
|
||||
</form>
|
||||
</mat-step>
|
||||
<mat-step [stepControl]="cipherFormGroup" label="Cipher" state="cipher">
|
||||
<form [formGroup]="cipherFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
|
||||
<mat-checkbox fxFlex="20" fxFlex.gt-lg="10" tabindex="8" fxLayoutAlign="start center" class="chkbox-wallet" formControlName="existingCipher" name="existingCipher">Existing Cipher</mat-checkbox>
|
||||
<mat-form-field fxFlex="58" fxFlex.gt-lg="58" fxLayoutAlign="start">
|
||||
<input matInput type="input" placeholder="Comma separated array of 24 words cipher seed" name="cipherSeed" formControlName="cipherSeed" tabindex="9" required>
|
||||
<mat-hint>Cipher Seed</mat-hint>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" fxFlex="10" [disabled]="!cipherFormGroup.valid" type="submit" matStepperNext>Next</button>
|
||||
<button mat-stroked-button color="primary" fxFlex="10" type="reset" matStepperPrevious>Back</button>
|
||||
<div *ngIf="cipherFormGroup.errors?.invalidCipher && cipherFormGroup.controls.existingCipher.value && (cipherFormGroup.controls.cipherSeed.touched || cipherFormGroup.controls.cipherSeed.dirty)" class="validation-error-message">
|
||||
<mat-icon class="validation-error-icon red">cancel</mat-icon>Invalid Cipher. Enter comma separated 24 words cipher seed.
|
||||
</div>
|
||||
</form>
|
||||
</mat-step>
|
||||
<mat-step [stepControl]="passphraseFormGroup" label="Passphrase" state="passphrase">
|
||||
<form [formGroup]="passphraseFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
|
||||
<mat-checkbox fxFlex="20" fxFlex.gt-lg="10" tabindex="10" fxLayoutAlign="start center" class="chkbox-wallet" formControlName="enterPassphrase" name="enterPassphrase">Enter Passphrase</mat-checkbox>
|
||||
<mat-form-field fxFlex="40" fxFlex.gt-lg="50" fxLayoutAlign="start">
|
||||
<input matInput type="input" type="password" placeholder="Passphrase" name="passphrase" formControlName="passphrase" tabindex="11" required>
|
||||
<mat-hint>Enter Passphrase</mat-hint>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button fxFlex="15" fxFlex.gt-lg="14" color="primary" [disabled]="!passphraseFormGroup.valid" (click)="onInitWallet()" tabindex="12" type="submit">Initialize Wallet</button>
|
||||
<button mat-raised-button fxFlex="10" fxFlex.gt-lg="9" color="accent" type="button" matStepperPrevious>Back</button>
|
||||
<button fxFlex="10" fxFlex.gt-lg="9" fxLayoutAlign="center center" mat-raised-button color="warn" tabindex="13" type="reset" (click)="resetData()">Clear</button>
|
||||
</form>
|
||||
</mat-step>
|
||||
<ng-template matStepperIcon="password">
|
||||
<mat-icon>fingerprint</mat-icon>
|
||||
</ng-template>
|
||||
<ng-template matStepperIcon="cipher">
|
||||
<mat-icon>swap_calls</mat-icon>
|
||||
</ng-template>
|
||||
<ng-template matStepperIcon="passphrase">
|
||||
<mat-icon>waves</mat-icon>
|
||||
</ng-template>
|
||||
</mat-vertical-stepper>
|
||||
<div *ngIf="genSeedResponse.length > 0 && initWalletResponse !== ''">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
|
||||
<div fxFlex="100" fxLayoutAlign="start" class="insecure-message blinker">YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET!</div>
|
||||
<div fxFlex="40" fxLayout="row wrap" class="mt-2">
|
||||
<span *ngFor="let genSeed of genSeedResponse; index as i;" fxFlex="25" fxLayoutAlign="start" class="genseed-message">
|
||||
{{genSeed}}
|
||||
</span>
|
||||
</div>
|
||||
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">Wallet initialization is done.</div>
|
||||
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">The node will be usable only after LND has synced completely with the network.</div>
|
||||
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">Click continue only after writing down the seed.</div>
|
||||
<button mat-raised-button fxFlex="15" color="primary" type="submit" (click)="onGoToHome()" tabindex="14">Go To Home</button>
|
||||
</form>
|
||||
</div>
|
||||
<div *ngIf="genSeedResponse.length > 0 && initWalletResponse === ''">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
|
||||
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">Something went wrong! Unable to initialize wallet!</div>
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="warn" tabindex="15" type="reset" (click)="resetData()">Restart</button>
|
||||
</form>
|
||||
</div>
|
||||
<div *ngIf="genSeedResponse.length <= 0 && initWalletResponse !== ''">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
|
||||
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">Wallet recovery is done.</div>
|
||||
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">The node will be usable only after LND has synced completely with the network.</div>
|
||||
<button mat-raised-button fxFlex="15" color="primary" type="submit" (click)="onGoToHome()" tabindex="14">Go To Home</button>
|
||||
</form>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
@ -1,12 +0,0 @@
|
||||
.chkbox-wallet:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.blinker {
|
||||
animation: blink-animation 1s steps(5, start) infinite;
|
||||
-webkit-animation: blink-animation 1s steps(5, start) infinite;
|
||||
}
|
||||
|
||||
@keyframes blink-animation { to { visibility: hidden; }}
|
||||
|
||||
@-webkit-keyframes blink-animation { to { visibility: hidden; }}
|
@ -0,0 +1,113 @@
|
||||
<div fxLayout="column" class="padding-gap mb-4">
|
||||
<div *ngIf="insecureLND && !warnRes">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
|
||||
<div fxFlex="100" fxLayoutAlign="start">Warning: Your connection is unsecure, it's not safe to generate private keys over this connection.Are you sure you want to proceed?</div>
|
||||
<div fxLayout="column" fxFlex.gt-sm="30" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
|
||||
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="1" type="reset" (click)="proceed=false;warnRes=true">Do Not Proceed</button>
|
||||
<button mat-raised-button fxFlex="48" color="primary" type="submit" (click)="proceed=true;warnRes=true" tabindex="2">Proceed</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div *ngIf="warnRes && !proceed" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
|
||||
<div fxFlex="100" class="mt-2">Please re-configure & re-start RTL after securing your LND connction. You can close this window now.</div>
|
||||
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
|
||||
<button fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="3" type="reset" (click)="warnRes=false">Go Back</button>
|
||||
</div>
|
||||
</div>
|
||||
<mat-vertical-stepper *ngIf="(!insecureLND || (warnRes && proceed)) && genSeedResponse.length <= 0 && initWalletResponse === ''" [linear]="true" #stepper>
|
||||
<mat-step [stepControl]="passwordFormGroup" label="Wallet Password" state="password">
|
||||
<form [formGroup]="passwordFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
|
||||
<mat-form-field fxFlex="49" fxLayoutAlign="start">
|
||||
<input matInput type="password" placeholder="Password" name="initWalletPassword" formControlName="initWalletPassword" tabindex="5" required>
|
||||
<mat-hint>Enter Wallet Password</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex="49" fxLayoutAlign="start">
|
||||
<input matInput type="password" placeholder="Confirm Password" name="initWalletConfirmPassword" formControlName="initWalletConfirmPassword" tabindex="6" required>
|
||||
<mat-hint>Confirm Wallet Password</mat-hint>
|
||||
</mat-form-field>
|
||||
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="my-2">
|
||||
<button mat-raised-button color="primary" fxFlex="10" [disabled]="!passwordFormGroup.valid" tabindex="7" type="submit" matStepperNext>Next</button>
|
||||
</div>
|
||||
<div *ngIf="passwordFormGroup.controls.initWalletPassword.errors?.minlength && (passwordFormGroup.controls.initWalletPassword.touched || passwordFormGroup.controls.initWalletPassword.dirty)" class="validation-error-message">
|
||||
<mat-icon class="validation-error-icon red">cancel</mat-icon>Password must be at least 8 characters in length.
|
||||
</div>
|
||||
<div *ngIf="passwordFormGroup.errors?.unmatchedPasswords && (passwordFormGroup.controls.initWalletPassword.touched || passwordFormGroup.controls.initWalletPassword.dirty) && (passwordFormGroup.controls.initWalletConfirmPassword.touched || passwordFormGroup.controls.initWalletConfirmPassword.dirty)" class="validation-error-message">
|
||||
<mat-icon class="validation-error-icon red">cancel</mat-icon>Passwords do not match.
|
||||
</div>
|
||||
</form>
|
||||
</mat-step>
|
||||
<mat-step [stepControl]="cipherFormGroup" label="Cipher" state="cipher">
|
||||
<form [formGroup]="cipherFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
|
||||
<div fxFlex="100" fxLayoutAlign="space-between center">
|
||||
<mat-slide-toggle [labelPosition]="'before'" fxFlex="20" tabindex="8" color="primary" class="chkbox-wallet" formControlName="existingCipher" name="existingCipher">Existing Cipher</mat-slide-toggle>
|
||||
<mat-form-field fxFlex="75" fxLayoutAlign="start">
|
||||
<input matInput type="input" placeholder="Comma separated array of 24 words cipher seed" name="cipherSeed" formControlName="cipherSeed" tabindex="9" required>
|
||||
<mat-hint>Cipher Seed</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="column" fxFlex.gt-sm="30" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="my-2">
|
||||
<button mat-stroked-button color="primary" fxFlex="48" type="reset" tabindex="10" matStepperPrevious>Back</button>
|
||||
<button mat-raised-button color="primary" fxFlex="48" [disabled]="!cipherFormGroup.valid" tabindex="11" type="submit" matStepperNext>Next</button>
|
||||
</div>
|
||||
<div *ngIf="cipherFormGroup.errors?.invalidCipher && cipherFormGroup.controls.existingCipher.value && (cipherFormGroup.controls.cipherSeed.touched || cipherFormGroup.controls.cipherSeed.dirty)" class="validation-error-message">
|
||||
<mat-icon class="validation-error-icon red">cancel</mat-icon>Invalid Cipher. Enter comma separated 24 words cipher seed.
|
||||
</div>
|
||||
</form>
|
||||
</mat-step>
|
||||
<mat-step [stepControl]="passphraseFormGroup" label="Passphrase" state="passphrase">
|
||||
<form [formGroup]="passphraseFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
|
||||
<div fxFlex="100" fxLayoutAlign="space-between center">
|
||||
<mat-slide-toggle [labelPosition]="'before'" fxFlex="20" tabindex="10" color="primary" class="chkbox-wallet" formControlName="enterPassphrase" name="enterPassphrase">Existing Passphrase</mat-slide-toggle>
|
||||
<mat-form-field fxFlex="75" fxLayoutAlign="start">
|
||||
<input matInput type="input" type="password" placeholder="Passphrase" name="passphrase" formControlName="passphrase" tabindex="12" required>
|
||||
<mat-hint>Enter Passphrase</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="column" fxFlex.gt-sm="40" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="my-2">
|
||||
<button fxFlex="32" fxLayoutAlign="center center" mat-stroked-button color="warn" tabindex="13" type="reset" (click)="resetData()">Clear</button>
|
||||
<button mat-stroked-button fxFlex="32" tabindex="14" color="primary" type="button" matStepperPrevious>Back</button>
|
||||
<button mat-raised-button fxFlex="32" color="primary" [disabled]="!passphraseFormGroup.valid" (click)="onInitWallet()" tabindex="15" type="submit">Initialize Wallet</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-step>
|
||||
<ng-template matStepperIcon="password">
|
||||
<mat-icon>vpn_key</mat-icon>
|
||||
</ng-template>
|
||||
<ng-template matStepperIcon="cipher">
|
||||
<mat-icon>swap_calls</mat-icon>
|
||||
</ng-template>
|
||||
<ng-template matStepperIcon="passphrase">
|
||||
<mat-icon>fingerprint</mat-icon>
|
||||
</ng-template>
|
||||
</mat-vertical-stepper>
|
||||
<div *ngIf="genSeedResponse.length > 0 && initWalletResponse !== ''">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
|
||||
<div fxFlex="100" fxLayoutAlign="start" class="blinker">YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET!</div>
|
||||
<div fxFlex="40" fxLayout="row wrap" class="mt-2">
|
||||
<span *ngFor="let genSeed of genSeedResponse; index as i;" fxFlex="25" fxLayoutAlign="start" class="genseed-message">{{genSeed}}</span>
|
||||
</div>
|
||||
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">Wallet initialization is done.</div>
|
||||
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">The node will be usable only after LND has synced completely with the network.</div>
|
||||
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">Click continue only after writing down the seed.</div>
|
||||
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
|
||||
<button mat-raised-button color="primary" type="submit" (click)="onGoToHome()" tabindex="16">Go To Home</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div *ngIf="genSeedResponse.length > 0 && initWalletResponse === ''">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
|
||||
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">Something went wrong! Unable to initialize wallet!</div>
|
||||
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
|
||||
<button fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="17" type="reset" (click)="resetData()">Restart</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div *ngIf="genSeedResponse.length <= 0 && initWalletResponse !== ''">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
|
||||
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">Wallet recovery is done.</div>
|
||||
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">The node will be usable only after LND has synced completely with the network.</div>
|
||||
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
|
||||
<button mat-raised-button color="primary" type="submit" (click)="onGoToHome()" tabindex="18">Go To Home</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { InitializeWalletComponent } from './initialize.component';
|
||||
|
||||
describe('InitializeWalletComponent', () => {
|
||||
let component: InitializeWalletComponent;
|
||||
let fixture: ComponentFixture<InitializeWalletComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ InitializeWalletComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(InitializeWalletComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,12 @@
|
||||
<div fxLayout="column" class="padding-gap mb-2">
|
||||
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
|
||||
<mat-form-field fxFlex="100" fxLayoutAlign="start">
|
||||
<input matInput type="password" placeholder="Password" name="walletPassword" [(ngModel)]="walletPassword" tabindex="1" required>
|
||||
<mat-hint>Enter Wallet Password</mat-hint>
|
||||
</mat-form-field>
|
||||
<div fxLayout="column" fxFlex.gt-sm="30" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
|
||||
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="2" type="reset" (click)="resetData()">Clear Field</button>
|
||||
<button mat-raised-button fxFlex="48" color="primary" [disabled]="walletPassword == ''" (click)="onUnlockWallet()" tabindex="3">Unlock Wallet</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { UnlockWalletComponent } from './unlock.component';
|
||||
|
||||
describe('UnlockWalletComponent', () => {
|
||||
let component: UnlockWalletComponent;
|
||||
let fixture: ComponentFixture<UnlockWalletComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ UnlockWalletComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(UnlockWalletComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,29 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as RTLActions from '../../../store/rtl.actions';
|
||||
import * as fromRTLReducer from '../../../store/rtl.reducers';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-unlock-wallet',
|
||||
templateUrl: './unlock.component.html',
|
||||
styleUrls: ['./unlock.component.scss']
|
||||
})
|
||||
export class UnlockWalletComponent implements OnInit {
|
||||
walletPassword = '';
|
||||
|
||||
constructor(private store: Store<fromRTLReducer.RTLState>) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.walletPassword = '';
|
||||
}
|
||||
|
||||
onUnlockWallet() {
|
||||
this.store.dispatch(new RTLActions.OpenSpinner('Unlocking...'));
|
||||
this.store.dispatch(new RTLActions.UnlockWallet({pwd: window.btoa(this.walletPassword)}));
|
||||
}
|
||||
|
||||
resetData() {
|
||||
this.walletPassword = '';
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-title-container">
|
||||
<fa-icon [icon]="faWallet" class="page-title-img mr-1"></fa-icon>
|
||||
<span class="page-title">Wallet</span>
|
||||
</div>
|
||||
<div fxLayout="column" class="padding-gap-x">
|
||||
<mat-card>
|
||||
<mat-card-content fxLayout="column">
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Unlock"><rtl-unlock-wallet></rtl-unlock-wallet></mat-tab>
|
||||
<mat-tab label="Initialize"><rtl-initialize-wallet></rtl-initialize-wallet></mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
@ -0,0 +1,17 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { faWallet } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-wallet',
|
||||
templateUrl: './wallet.component.html',
|
||||
styleUrls: ['./wallet.component.scss']
|
||||
})
|
||||
export class WalletComponent implements OnInit {
|
||||
public faWallet = faWallet;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
}
|
Loading…
Reference in New Issue