mirror of https://github.com/BTCPrivate/copay.git
Fix: Message for receive view when there is no wallets
This commit is contained in:
parent
2dfd458114
commit
f736b80fa4
|
@ -1,34 +1,28 @@
|
||||||
<!--
|
|
||||||
Generated template for the ReceivePage page.
|
|
||||||
|
|
||||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
|
||||||
Ionic pages and navigation.
|
|
||||||
-->
|
|
||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-navbar>
|
<ion-navbar>
|
||||||
<ion-title>Receive</ion-title>
|
<ion-title>Receive</ion-title>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
<div class="qr-container">
|
<div *ngIf="wallet" class="qr-container">
|
||||||
<qr-code *ngIf="address" [value]="qrAddress" [level]="M" [size]="220" [foreground]="'#334'"></qr-code>
|
<qr-code *ngIf="address" [value]="qrAddress" [level]="M" [size]="220" [foreground]="'#334'"></qr-code>
|
||||||
<div>
|
<div>
|
||||||
<span>{{ address }}</span>
|
<span>{{ address }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button [hidden]="!address" class="button-request" (click)="requestSpecificAmount()">
|
<button [hidden]="!address" class="button-request" (click)="requestSpecificAmount()">
|
||||||
<span>Request Specific amount</span>
|
<span>Request Specific amount</span>
|
||||||
<ion-icon name="arrow-forward"></ion-icon>
|
<ion-icon name="arrow-forward"></ion-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button [hidden]="!address" class="button-address" (click)="setAddress(true)">
|
||||||
|
<span>Generate new address</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<button [hidden]="!address" class="button-address" (click)="setAddress(true)">
|
|
||||||
<span>Generate new address</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
<div *ngIf="!wallet">
|
||||||
|
<span>No wallet</span>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
|
@ -24,19 +24,24 @@ export class ReceivePage {
|
||||||
private profileProvider: ProfileProvider,
|
private profileProvider: ProfileProvider,
|
||||||
private walletProvider: WalletProvider
|
private walletProvider: WalletProvider
|
||||||
) {
|
) {
|
||||||
this.wallets = this.profileProvider.getWallets();
|
|
||||||
this.updateQrAddress();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
console.log('ionViewDidLoad ReceivePage');
|
console.log('ionViewDidLoad ReceivePage');
|
||||||
|
}
|
||||||
|
|
||||||
|
ionViewDidEnter() {
|
||||||
|
this.wallets = this.profileProvider.getWallets();
|
||||||
|
this.updateQrAddress();
|
||||||
this.onSelect(this.checkSelectedWallet(this.wallet, this.wallets));
|
this.onSelect(this.checkSelectedWallet(this.wallet, this.wallets));
|
||||||
}
|
}
|
||||||
|
|
||||||
private onSelect(wallet: any): any {
|
private onSelect(wallet: any): any {
|
||||||
this.wallet = wallet;
|
this.wallet = wallet;
|
||||||
this.setProtocolHandler();
|
if (this.wallet) {
|
||||||
this.setAddress();
|
this.setProtocolHandler();
|
||||||
|
this.setAddress();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private setProtocolHandler(): void {
|
private setProtocolHandler(): void {
|
||||||
|
|
Loading…
Reference in New Issue