FEAT: create default bch wallet

This commit is contained in:
Gabriel Bazán 2018-01-16 15:10:44 -03:00
parent eb91cc9927
commit a0017eb849
2 changed files with 10 additions and 4 deletions

View File

@ -52,7 +52,7 @@
<img src="assets/img/check-white.svg" class="bg green" />
</ion-icon>
<div class="title" translate>
Your bitcoin wallet is ready!
Your wallets are ready!
</div>
<div class="subtitle" translate>
On this screen you can see all your wallets, accounts, and assets.

View File

@ -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);
});