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.
38 lines
2.3 KiB
HTML
38 lines
2.3 KiB
HTML
<div fxLayout="row">
|
|
<div fxFlex="100">
|
|
<mat-card-header fxLayout="row" fxLayoutAlign="space-between center" class="modal-info-header">
|
|
<div fxFlex="95" fxLayoutAlign="start start">
|
|
<span class="page-title">Initiate a Swapin</span>
|
|
</div>
|
|
<button tabindex="5" fxFlex="5" fxLayoutAlign="center" class="btn-close-x p-0" [mat-dialog-close]="false" default
|
|
mat-button>X</button>
|
|
</mat-card-header>
|
|
<mat-card-content class="padding-gap-x-large">
|
|
<form fxLayout="row wrap" fxLayoutAlign="start space-between" fxFlex="100" #swapInForm="ngForm">
|
|
<p fxLayoutAlign="start center" class="pb-2 word-break">Swapin with {{sPeer?.alias}}</p>
|
|
<mat-form-field fxFlex="100" fxLayoutAlign="start end">
|
|
<input matInput [value]="sPeer.short_channel_id" placeholder="Short Channel ID" tabindex="1" name="shortChanId" disabled>
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex="100">
|
|
<input matInput autoFocus [(ngModel)]="swapAmount" (keyup)="onAmountChange()" placeholder="Amount"
|
|
type="number" [step]="1000" [min]="100000" [max]="sPeer.remote_balance" tabindex="2" name="swapAmt" #swapAmt="ngModel" required>
|
|
<span matSuffix class="ml-1"> Sats </span>
|
|
<mat-error *ngIf="swapAmt.errors?.required">Amount is required.</mat-error>
|
|
<mat-error *ngIf="swapAmt.errors?.min">Amount must be greater than or equal to 100,000.</mat-error>
|
|
<mat-error *ngIf="swapAmt.errors?.max">Amount must be less than or equal to {{sPeer.remote_balance | number}}.</mat-error>
|
|
<mat-hint>Amount should be between 100,000 and {{sPeer.remote_balance | number}}<br>{{swapAmountHint}}</mat-hint>
|
|
</mat-form-field>
|
|
<div fxFlex="100" class="alert alert-danger mt-2" *ngIf="swapInError !== ''">
|
|
<fa-icon [icon]="faExclamationTriangle" class="mr-1 alert-icon"></fa-icon>
|
|
<span *ngIf="swapInError !== ''">{{swapInError}}</span>
|
|
</div>
|
|
<div fxLayout="row" fxFlex="100" class="mt-1" fxLayoutAlign="end center">
|
|
<button class="mr-1" mat-button color="primary" tabindex="3" type="button" (click)="resetData()">Clear
|
|
Field</button>
|
|
<button mat-button color="primary" (click)="onExecuteSwapin()" tabindex="4">Execute</button>
|
|
</div>
|
|
</form>
|
|
</mat-card-content>
|
|
</div>
|
|
</div>
|