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,20 +1,11 @@
|
|||
<!--
|
||||
Generated template for the ReceivePage page.
|
||||
|
||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
||||
Ionic pages and navigation.
|
||||
-->
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title>Receive</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<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>
|
||||
<div>
|
||||
<span>{{ address }}</span>
|
||||
|
@ -31,4 +22,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!wallet">
|
||||
<span>No wallet</span>
|
||||
</div>
|
||||
</ion-content>
|
|
@ -24,20 +24,25 @@ export class ReceivePage {
|
|||
private profileProvider: ProfileProvider,
|
||||
private walletProvider: WalletProvider
|
||||
) {
|
||||
this.wallets = this.profileProvider.getWallets();
|
||||
this.updateQrAddress();
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad ReceivePage');
|
||||
}
|
||||
|
||||
ionViewDidEnter() {
|
||||
this.wallets = this.profileProvider.getWallets();
|
||||
this.updateQrAddress();
|
||||
this.onSelect(this.checkSelectedWallet(this.wallet, this.wallets));
|
||||
}
|
||||
|
||||
private onSelect(wallet: any): any {
|
||||
this.wallet = wallet;
|
||||
if (this.wallet) {
|
||||
this.setProtocolHandler();
|
||||
this.setAddress();
|
||||
}
|
||||
}
|
||||
|
||||
private setProtocolHandler(): void {
|
||||
this.protocolHandler = this.walletProvider.getProtocolHandler(this.wallet);
|
||||
|
|
Loading…
Reference in New Issue