parent
4003ea0805
commit
c671f9d751
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
@ -1 +1 @@
|
||||
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=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(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,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:"5d20dbfb50eaa379bb80",6:"3d0de3786487442c9432",7:"3d047437a6897df1a06b"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.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: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 f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);
|
||||
!function(e){function r(r){for(var n,a,i=r[0],f=r[1],c=r[2],p=0,s=[];p<i.length;p++)o[a=i[p]]&&s.push(o[a][0]),o[a]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,c||[]),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:"5d20dbfb50eaa379bb80",6:"411079f3303825bbd77e",7:"a75ff00ea1e0f0d0a1c8"}[e]+".js"}(e);var f=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(c);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;f.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",f.name="ChunkLoadError",f.type=n,f.request=u,t[1](f)}o[e]=void 0}};var c=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||[],f=i.push.bind(i);i.push=r,i=i.slice();for(var c=0;c<i.length;c++)r(i[c]);var l=f;t()}([]);
|
@ -0,0 +1,69 @@
|
||||
<mat-card [ngClass]="{'custom-card error-border': flgLoading==='error','custom-card': true}">
|
||||
<mat-card-header class="bg-primary" fxLayoutAlign="center center">
|
||||
<mat-card-title class="m-0 pt-2">
|
||||
<h5>Per {{feeRateStyle}} Fee Rates</h5>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div fxLayout="column" class="pl-4">
|
||||
<mat-list class="fee-rate-list" fxFlex="100" fxLayoutAlign="start start">
|
||||
<mat-list-item fxFlex="55" fxLayoutAlign="start start">Urgent</mat-list-item>
|
||||
<mat-list-item fxFlex="25" fxLayoutAlign="start start">
|
||||
<p class="mat-button-text">{{perkbw?.urgent}}</p>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list>
|
||||
<mat-list class="fee-rate-list" fxFlex="100" fxLayoutAlign="start start">
|
||||
<mat-list-item fxFlex="55" fxLayoutAlign="start start">Normal</mat-list-item>
|
||||
<mat-list-item fxFlex="25" fxLayoutAlign="start start">
|
||||
<p class="mat-button-text">{{perkbw?.normal}}</p>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list>
|
||||
<mat-list class="fee-rate-list" fxFlex="100" fxLayoutAlign="start start">
|
||||
<mat-list-item fxFlex="55" fxLayoutAlign="start start">Slow</mat-list-item>
|
||||
<mat-list-item fxFlex="25" fxLayoutAlign="start start">
|
||||
<p class="mat-button-text">{{perkbw?.slow}}</p>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list>
|
||||
<mat-list class="fee-rate-list" fxFlex="100" fxLayoutAlign="start start">
|
||||
<mat-list-item fxFlex="55" fxLayoutAlign="start start">Min Acceptable</mat-list-item>
|
||||
<mat-list-item fxFlex="25" fxLayoutAlign="start start">
|
||||
<p class="mat-button-text">{{perkbw?.min_acceptable}}</p>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list>
|
||||
<mat-list class="fee-rate-list" fxFlex="100" fxLayoutAlign="start start">
|
||||
<mat-list-item fxFlex="55" fxLayoutAlign="start start">Max Acceptable</mat-list-item>
|
||||
<mat-list-item fxFlex="25" fxLayoutAlign="start start">
|
||||
<p class="mat-button-text">{{perkbw?.max_acceptable}}</p>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list>
|
||||
<mat-list class="fee-rate-list" fxFlex="100" fxLayoutAlign="start start">
|
||||
<mat-list-item fxFlex="55" fxLayoutAlign="start start">Opening Channel</mat-list-item>
|
||||
<mat-list-item fxFlex="25" fxLayoutAlign="start start">
|
||||
<p class="mat-button-text">{{feeRates?.onchain_fee_estimates?.opening_channel_satoshis}}</p>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list>
|
||||
<mat-list class="fee-rate-list" fxFlex="100" fxLayoutAlign="start start">
|
||||
<mat-list-item fxFlex="55" fxLayoutAlign="start start">Mutual Close</mat-list-item>
|
||||
<mat-list-item fxFlex="25" fxLayoutAlign="start start">
|
||||
<p class="mat-button-text">{{feeRates?.onchain_fee_estimates?.mutual_close_satoshis}}</p>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list>
|
||||
<mat-list class="fee-rate-list" fxFlex="100" fxLayoutAlign="start start">
|
||||
<mat-list-item fxFlex="55" fxLayoutAlign="start start">Unilateral Close</mat-list-item>
|
||||
<mat-list-item fxFlex="25" fxLayoutAlign="start start">
|
||||
<p class="mat-button-text">{{feeRates?.onchain_fee_estimates?.unilateral_close_satoshis}}</p>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list>
|
||||
</div>
|
||||
<mat-progress-bar *ngIf="flgLoading===true" mode="indeterminate" class="mt-minus-5"></mat-progress-bar>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
@ -0,0 +1,3 @@
|
||||
.fee-rate-list .mat-list-item {
|
||||
height: 44px;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FeeRatesComponent } from './fee-rates.component';
|
||||
|
||||
describe('FeeRatesComponent', () => {
|
||||
let component: FeeRatesComponent;
|
||||
let fixture: ComponentFixture<FeeRatesComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ FeeRatesComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FeeRatesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,28 @@
|
||||
import { Component, AfterContentChecked, Input } from '@angular/core';
|
||||
|
||||
import { FeeRatesCL, FeeRatePerObj, feeRateStyle } from '../../../shared/models/clModels';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-cl-fee-rates',
|
||||
templateUrl: './fee-rates.component.html',
|
||||
styleUrls: ['./fee-rates.component.scss']
|
||||
})
|
||||
export class CLFeeRatesComponent implements AfterContentChecked {
|
||||
@Input() feeRateStyle: string;
|
||||
@Input() feeRates: FeeRatesCL;
|
||||
@Input() flgLoading: Boolean | 'error';
|
||||
perkbw: FeeRatePerObj = {};
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
ngAfterContentChecked() {
|
||||
if (this.feeRateStyle === feeRateStyle.KB) {
|
||||
this.perkbw = this.feeRates.perkb;
|
||||
} else if (this.feeRateStyle === feeRateStyle.KW) {
|
||||
this.perkbw = this.feeRates.perkw;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue