UNPKG

copay-crown

Version:

A Secure Crown Wallet

89 lines (74 loc) 3.28 kB
<ion-header> <ion-navbar> <ion-title>{{title}}</ion-title> </ion-navbar> </ion-header> <ion-content no-bounce> <form [formGroup]="createForm" (ngSubmit)="setOptsAndCreate()"> <ion-item> <ion-label stacked>Wallet name</ion-label> <ion-input type="text" formControlName="walletName"></ion-input> </ion-item> <div *ngIf="isShared"> <ion-item> <ion-label stacked>Your name</ion-label> <ion-input type="text" formControlName="myName"></ion-input> </ion-item> <ion-item> <ion-label stacked>Total number of copayers</ion-label> <ion-select formControlName="totalCopayers" (ionChange)="setTotalCopayers(createForm.value.totalCopayers)"> <ion-option *ngFor="let copayer of copayers" [value]="copayer">{{copayer}}</ion-option> </ion-select> </ion-item> <ion-item> <ion-label stacked>Required number of signatures</ion-label> <ion-select formControlName="requiredCopayers"> <ion-option *ngFor="let signature of signatures" [value]="signature">{{signature}}</ion-option> </ion-select> </ion-item> </div> <ion-item> <ion-label stacked>{{'Coin' | translate}}</ion-label> <ion-select formControlName="coin" (ionChange)="createForm.value.testnetEnabled = false"> <ion-option value="btc">BTC</ion-option> <ion-option value="bch">BCH</ion-option> </ion-select> </ion-item> <ion-item-divider></ion-item-divider> <ion-item (click)="showAdvOpts = !showAdvOpts"> <ion-label *ngIf="!showAdvOpts">Show advanced options</ion-label> <ion-label *ngIf="showAdvOpts">Hide advanced options</ion-label> </ion-item> <div *ngIf="showAdvOpts"> <ion-item> <ion-label stacked>Wallet service URL</ion-label> <ion-input type="text" formControlName="bwsURL"></ion-input> </ion-item> <ion-item> <ion-label stacked>Wallet key</ion-label> <ion-select formControlName="selectedSeed" (ionChange)="seedOptionsChange(createForm.value.selectedSeed)"> <ion-option *ngFor="let opt of seedOptions" [value]="opt.id">{{opt.label}}</ion-option> </ion-select> </ion-item> <ion-item *ngIf="createForm.value.selectedSeed == 'set'"> <ion-label stacked>Wallet recovery phrase</ion-label> <ion-input type="text" formControlName="recoveryPhrase"></ion-input> </ion-item> <ion-item *ngIf="createForm.value.selectedSeed == 'new' && createForm.value.coin == 'btc'"> <ion-label stacked>Testnet</ion-label> <ion-toggle formControlName="testnetEnabled" (ionChange)="setDerivationPath()"></ion-toggle> </ion-item> <ion-item *ngIf="createForm.value.selectedSeed == 'set'"> <ion-label stacked>Derivation path</ion-label> <ion-input type="text" formControlName="derivationPath"></ion-input> </ion-item> <ion-item> <ion-label stacked>Single address</ion-label> <ion-toggle formControlName="singleAddress"></ion-toggle> </ion-item> </div> </form> </ion-content> <ion-footer> <button ion-button block class="button-footer" (click)="setOptsAndCreate()" [disabled]="!createForm.valid">Create wallet</button> </ion-footer>