Skip to content
Snippets Groups Projects

Check mnemonic and scan derivations to choose one

Merged poka requested to merge feat/mnemonic-import into develop
Files
23
<ion-header>
<ion-toolbar>
<ion-title translate>AUTH.SELECT_DERIVATION.TITLE</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
@if (loading) {
<ion-item lines="none">
<label>LOGIN.SCAN_DERIVATIONS</label>
</ion-item>
} @else {
<ion-list>
<ion-radio-group [(ngModel)]="selectedDerivation" (ngModelChange)="onSelectionChange()">
<ion-list-header>
<label translate>AUTH.SELECT_DERIVATION.AVAILABLE_WALLETS</label>
</ion-list-header>
@for (account of derivations; track account.address) {
<ion-item (click)="selectDerivation(account)" tappable [class.selected]="selectedDerivation === account">
<ion-icon aria-hidden="true" slot="start" name="key"></ion-icon>
<ion-label>
<h2 translate>COMMON.ADDRESS</h2>
<p class="ion-text-nowrap">
<span>{{ account.address | addressFormat }}</span>
</p>
</ion-label>
<ion-badge slot="end" color="light">
{{ account | balance | amountFormat }}
</ion-badge>
</ion-item>
}
</ion-radio-group>
</ion-list>
}
</ion-content>
<!-- TODO: Consider using common form buttons used in the rest of the app for consistency, reusability and responsiveness -->
<ion-footer>
<ion-toolbar>
<ion-row class="ion-no-padding">
<ion-col></ion-col>
<!-- buttons -->
<ion-col size="auto">
<ion-button fill="clear" color="dark" (click)="onCancel()">
<ion-label translate>COMMON.BTN_CANCEL</ion-label>
</ion-button>
<ion-button
[fill]="invalid ? 'clear' : 'solid'"
[disabled]="!selectedDerivation"
(click)="doSubmit()"
(keyup.enter)="doSubmit()"
color="tertiary"
>
<ion-label translate>COMMON.BTN_CONTINUE</ion-label>
</ion-button>
</ion-col>
</ion-row>
</ion-toolbar>
</ion-footer>
Loading