From a0017eb849eb388f6c5beae3894b6473e7149faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 16 Jan 2018 15:10:44 -0300 Subject: [PATCH] FEAT: create default bch wallet --- src/pages/home/home.html | 2 +- src/providers/profile/profile.ts | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/pages/home/home.html b/src/pages/home/home.html index bd47fc970..415062ef3 100644 --- a/src/pages/home/home.html +++ b/src/pages/home/home.html @@ -52,7 +52,7 @@
- Your bitcoin wallet is ready! + Your wallets are ready!
On this screen you can see all your wallets, accounts, and assets. diff --git a/src/providers/profile/profile.ts b/src/providers/profile/profile.ts index 3ee1ebc79..86fb5d99a 100644 --- a/src/providers/profile/profile.ts +++ b/src/providers/profile/profile.ts @@ -711,8 +711,9 @@ export class ProfileProvider { setTimeout(() => { this.seedWallet(opts).then((walletClient: any) => { - let name = opts.name || 'Personal Wallet'; // TODO GetTextCatalog - let myName = opts.myName || 'me'; // TODO GetTextCatalog + let defaultName = opts.coin == 'btc' ? 'Personal Wallet [BTC]' : 'Personal Wallet [BCH]'; + let name = opts.name ? opts.name : defaultName; // TODO GetTextCatalog + let myName = opts.myName ? opts.myName : 'me'; // TODO GetTextCatalog walletClient.createWallet(name, myName, opts.m, opts.n, { network: opts.networkName, @@ -828,7 +829,12 @@ export class ProfileProvider { opts.networkName = 'livenet'; opts.coin = 'btc'; this.createWallet(opts).then((wallet: any) => { - return resolve(wallet); + opts.coin = 'bch'; + this.createWallet(opts).then(() => { + return resolve(wallet); + }).catch((err) => { + return resolve(wallet); + }); }).catch((err) => { return reject(err); });