better texts and forms

This commit is contained in:
Matias Alejo Garcia 2015-09-03 01:49:48 -03:00
parent 142a6bd03a
commit 4ac32f13a0
10 changed files with 151 additions and 52 deletions

View File

@ -1,12 +1,16 @@
# Copay Mnemonic Notes
# Copay Backup and Restore Notes
## Description
Copay is a Multisig HD Wallet. Copay apps hold the extended private keys for the wallet. The private key never leave the device, so for accessing a wallet funds it is necesary to have the device or the backup of the wallet.
## Definitions
### Backup Formats:
* Backup Words: 12 words mnemonic created as backup in Copay (from version v1.2)
* Backup File: Exported file from Copay, containing an AES encrypted JSON (see #export-format).
* Wallet Seed (WS): 12 words mnemonic backup (available from Copay v1.2+). The 12 words are used as wallet seed, following BIP39 specification. The wallet seed may require a passphrase to recreate the wallet (if that was specified at creation time).
* Wallet Backup (WB): Exported data from Copay, containing an AES encrypted JSON with many wallet parameters (like extended Private Key, wallet Name, extended public keys of Copayers, etc. See #export-format). This data can be created from Copay v1.2+ (Settings->Export) and it was the default backup format on previous Copay versions. WB can be a file (standart format for Copay desktop versions) or a text (standart from Copay mobile versions).
### Backup recovery cases
* Case 1: Lost of device holding the wallet
@ -21,39 +25,49 @@
### Non multisig wallets
Case 1: From both Backup Words and Backup file, full recovery is possible.
- Enter the backup words or file at 'Import wallet' in a new device.
Case 1: From both WS and WB, full recovery is possible.
- Enter the WS or the WB at 'Import wallet' in a new device.
- Wallet access should be restored
Case 2: Partial recovery is possible using the device where the wallet is installed, pointing the the new server (Recreate Wallet feature).
- Point to the new server
- If the wallet is not registered at the new Wallet service, a "Recreate" buttom will appear at wallet's home. Click it to recreate the wallet.
- Wallet should be recreated and funds can be acceded
- If the wallet existed, it could be needed to rescan Wallet's addresses for fund (from Settings -> Advanced -> Scan Addresses for Funds)
Case 3: From both Backup Words and Backup file, partial recovery is possible.
(Using Backup Words)
- Enter the Backup Words at 'Import Wallet'
If the error "This wallet is not registered at the wallet service" appear:
- Go to 'Create Wallet', and enter the Backup Words at 'Advanced Options'
(Using Backup File)
- Enter the Backup File at 'Import Wallet'
(Using WS)
- Enter the WS at 'Import Wallet'
If the error "This wallet is not registered at the wallet service" will appear:
- Go to 'Create Wallet', and enter the WS at 'Advanced Options'. Select a new name for the restored wallet. Total and required number of copayers should be set to 1.
- Wallet should be recreated and funds can be acceded
(Using WD)
- Enter the WD at 'Import Wallet'
- Wallet should be recreated and funds should be accesable
### Multisig wallets
Case 1: From both Backup Words and Backup file, full recovery is possible.
- Enter the backup words or file at 'Import wallet' in a new device.
Case 1: From both WS and WD, full recovery is possible.
- Enter WS or WD at 'Import wallet' in a new device.
- Wallet access should be restored
Case 2: Partial recovery is possible using the device where the wallet is installed, pointing the the new server (Recreate Wallet feature).
- Point to the new server
- If the wallet is not registered at the new Wallet service, a "Recreate" buttom will appear at wallet's home. Click it to recreate the wallet.
- Wallet should be recreated and funds should be accesable
- If the wallet existed, it could be needed to rescan Wallet's addresses for fund (from Settings -> Advanced -> Scan Addresses for Funds)
Case 3: Partial recovery is possible using:
A) All the Backup Words of the copayers of the wallet or
- Enter Backup Words at Create or Join Wallet ( at the Advanced option sections). Note that the wallet's configuration (M-N and network paramenters) need to be entered and need to match the parameters that where enterered when the wallet was created. Name and Nickname of Copayers need to be entered also, but there is no need for them to match the original wallet setup.
- Ask other copayers to join the wallet using the given invitation code. All copayers need to enter their Backup Words at Join -> Advanced Options -> Backup Words.
A) All WS's of the copayers of the wallet
- Enter one WS at Create ( at the Advanced option section). Note that the wallet's configuration (M-N and network paramenters) need to be entered and need to match the parameters that where enterered when the wallet was created. Name and Nickname of Copayers need to be entered also, but there is no need for them to match the original wallet setup.
- Ask other copayers to join the wallet using the given invitation code. All copayers need to enter their WS at Join (at -> Advanced Options -> Wallet Seed).
- Wallet should be recreated and funds should be accesable
B) One File Backup and a quorum of Backup Words of the other members.
- Using the File Backup, import the wallet.
- Ask other copayers to import the wallet using the their Backup words.
B) One WD and a quorum of WS of the other members.
- Using the WD, import the wallet.
- Ask other copayers to import the wallet using the their WS.
- Wallet should be recreated and funds should be accesable

View File

@ -112,21 +112,49 @@
</select>
</label>
</div>
<label ng-hide="hwLedger" for="network-name" class="line-b oh">
<label for="network-name" class="oh">
<span translate>Testnet</span>
<switch id="network-name" name="isTestnet" ng-model="isTestnet" class="green right m5t m10b"></switch>
</label>
<label for="ext-master" class="m10t">
<span translate>Backup Words (BIP39 seed)</span>
<small translate>If not given, a random secure key will be generated</small>
<label for="seed" class="oh">
<span translate>Specify the wallet seed</span>
<switch id="seed" name="setSeed" ng-model="setSeed" class="green right m5t m10b"></switch>
</label>
<label for="createPassphrase" class="line-b oh" ng-show="!setSeed" ><span translate>Seed Passphrase</span> <small translate>Add an optional passphrase to secure the wallet seed</small>
<div class="input">
<input type="text" class="form-control"
name="createPassphrase" ng-model="createPassphrase">
</div>
</label>
<label for="ext-master" class="m10t" ng-show="setSeed">
<span translate>Wallet Seed</span>
<small translate>Enter the 12 words to seed the wallet (BIP39)</small>
<input id="ext-master"
type="text"
placeholder="{{'Backup words'|translate}}"
placeholder="{{'Wallet seed'|translate}}"
name="privateKey" ng-model="privateKey">
</label>
<label for="passphrase" class="line-b oh" ng-show="setSeed"><span translate>Seed Passphrase</span> <small translate>Seed could require a passphrase to be imported</small>
<div class="input">
<input type="text" class="form-control" name="passphrase" ng-model="passphrase">
</div>
</label>
</div>
</div>
<div class="box-notification" ng-show="!setSeed && createPassphrase">
<span class="text-warning size-14">
<i class="fi-alert"></i>
<span translate>
WARNING: Passphrase cannot be recovered. <b>Be sure to write it down</b>. The wallet can not be restored without the passphrase.
</span>
</span>
</div>
<button type="submit" class="button round black expand m0" ng-show="totalCopayers != 1" ng-disabled="setupForm.$invalid || create.loading">

View File

@ -23,7 +23,7 @@
<div class="tab-container small-6 medium-6 large-6">
<a href
ng-class="{'selected': type =='12'}"
ng-click="import.setType('12')" translate>12 Words Backup</a>
ng-click="import.setType('12')" translate>Walled Seed</a>
</div>
<div class="tab-container small-6 medium-6 large-6">
<a href
@ -53,7 +53,7 @@
<div >
<label for="words">
<span translate>Type the 12 backup words here</span>:
<span translate>Type the Wallet Seed (12 words)</span>:
</label>
<textarea class="form-control" name="words" ng-model="import.words" rows="2"></textarea>
</div>
@ -69,22 +69,21 @@
</div>
<div ng-hide="hideAdv" class="row">
<div class="large-12 columns">
<label for="passphrase" class="line-b oh"><span translate>Passphrase</span> <small translate>Mnemonics could required a passphrase to be imported</small>
<div class="input">
<input type="password" class="form-control" placeholder="{{'Your backup passhrase'|translate}}"
name="passphrase" ng-model="import.passphrase">
</div>
</label>
<label for="network-name" class="line-b oh">
<label for="network-name" class=" oh">
<span translate>Testnet</span>
<switch id="network-name" name="isTestnet" ng-model="isTestnet" class="green right m5t m10b"></switch>
</label>
<label for="passphrase" class="oh line-b"><span translate>Passphrase</span> <small translate>Wallet Seed could require a passphrase to be imported</small>
<div class="input">
<input type="password" class="form-control" placeholder="{{'Seed passphrase'|translate}}"
name="passphrase" ng-model="import.passphrase">
</div>
</label>
</div>
</div>
<button translate type="submit" class="button round expand black"
<button translate type="submit" class="button round expand black m10t"
ng-disabled="importForm12.$invalid || import.loading">
Import
</button>
@ -118,7 +117,7 @@
<textarea class="form-control" name="backupText" ng-model="import.backupText" rows="5"></textarea>
</div>
<label for="password"><span translate>Password</span> <small translate>Required</small>
<label for="password"><span translate>Password</span>
</label>
<div class="input">
<input type="password" class="form-control" placeholder="{{'Your backup password'|translate}}"

View File

@ -99,15 +99,42 @@
</label>
</div>
<div class="large-12 columns">
<label for="ext-master">
<span translate>Backup Words (BIP39 seed)</span>
<small translate>If not given, a random secure key will be generated</small>
<input id="ext-master"
type="text"
placeholder="{{'Backup words'|translate}}"
name="privateKey" ng-model="privateKey">
</label>
</div>
<label for="seed" class="oh">
<span translate>Specify the wallet seed</span>
<switch id="seed" name="setSeed" ng-model="setSeed" class="green right m5t m10b"></switch>
</label>
<label for="createPassphrase" class="line-b oh" ng-show="!setSeed" ><span translate>Seed Passphrase</span> <small translate>Add an optional passphrase to secure the wallet seed</small>
<div class="input">
<input type="text" class="form-control"
name="createPassphrase" ng-model="createPassphrase">
</div>
</label>
<label for="ext-master" class="m10t" ng-show="setSeed">
<span translate>Wallet Seed</span>
<small translate>Enter the 12 words to seed the wallet (BIP39)</small>
<input id="ext-master"
type="text"
placeholder="{{'Wallet seed'|translate}}"
name="privateKey" ng-model="privateKey">
</label>
<label for="passphrase" class="line-b oh" ng-show="setSeed"><span translate>Seed Passphrase</span> <small translate>Seed could require a passphrase to be imported</small>
<div class="input">
<input type="text" class="form-control" name="passphrase" ng-model="passphrase">
</div>
</label>
</div>
</div>
<div class="box-notification" ng-show="!setSeed && createPassphrase">
<span class="text-warning size-14">
<i class="fi-alert"></i>
<span translate>
WARNING: Passphrase cannot be recovered. <b>Be sure to write it down</b>. The wallet can not be restored without the passphrase.
</span>
</span>
</div>
<button translate type="submit" class="button expand black m0 round"
ng-disabled="joinForm.$invalid || join.loading">Join</button>

View File

@ -573,6 +573,13 @@ button.radius, .button.radius {
border-radius: 3px;
}
label small {
font-size: 10px;
color: #999;
}
label small.has-error {
font-size: 11px;
}

View File

@ -57,10 +57,22 @@ angular.module('copayApp.controllers').controller('createController',
m: $scope.requiredCopayers,
n: $scope.totalCopayers,
name: form.walletName.$modelValue,
mnemonic: form.privateKey.$modelValue,
myName: $scope.totalCopayers > 1 ? form.myName.$modelValue : null,
networkName: form.isTestnet.$modelValue ? 'testnet' : 'livenet',
};
var setSeed = form.setSeed.$modelValue;
if (setSeed) {
opts.mnemonic = form.privateKey.$modelValue;
opts.passphrase = form.passphrase.$modelValue;
} else {
opts.passphrase = form.createPassphrase.$modelValue;
}
if (setSeed && !opts.mnemonic) {
this.error = gettext('Please enter the wallet seed');
return;
}
self.loading = true;
if (form.hwLedger.$modelValue) {

View File

@ -61,7 +61,7 @@ angular.module('copayApp.controllers').controller('importController',
};
var _importMnemonic = function(words, passphrase, opts) {
var _importMnemonic = function(words, opts) {
self.loading = true;
$timeout(function() {
@ -164,6 +164,6 @@ angular.module('copayApp.controllers').controller('importController',
opts.passphrase = form.passphrase.$modelValue || null;
opts.networkName = form.isTestnet.$modelValue ? 'testnet' : 'livenet';
_importMnemonic(words, passphrase, opts);
_importMnemonic(words, opts);
};
});

View File

@ -153,11 +153,23 @@ angular.module('copayApp.controllers').controller('joinController',
var opts = {
secret: form.secret.$modelValue,
mnemonic: form.privateKey.$modelValue,
myName: form.myName.$modelValue
extendedPrivateKey: form.privateKey.$modelValue,
myName: form.myName.$modelValue
}
var setSeed = form.setSeed.$modelValue;
if (setSeed) {
opts.mnemonic = form.privateKey.$modelValue;
opts.passphrase = form.passphrase.$modelValue;
} else {
opts.passphrase = form.createPassphrase.$modelValue;
}
if (setSeed && !opts.mnemonic) {
this.error = gettext('Please enter the wallet seed');
return;
}
if (form.hwLedger.$modelValue) {
self.ledger = true;

View File

@ -91,7 +91,7 @@ angular.module('copayApp.services')
body = gettextCatalog.getString('This wallet is not registed at the wallet service. Please create it from "Create Wallet" using adding for backup words');
break;
case 'INVALID_BACKUP':
body = gettextCatalog.getString('Backup words are invalid');
body = gettextCatalog.getString('Wallet seed is invalid');
break;

View File

@ -175,7 +175,7 @@ angular.module('copayApp.services')
walletClient.seedFromMnemonic(opts.mnemonic, opts.passphrase, network);
} catch (ex) {
$log.info(ex);
return cb(gettext('Could not create: Invalid Backup Words'));
return cb(gettext('Could not create: Invalid wallet seed'));
}
} else if (opts.extendedPublicKey) {
try {