2016-10-12 22:31:15 -07:00
|
|
|
<ion-view class="settings">
|
2016-09-08 07:28:41 -07:00
|
|
|
<ion-nav-bar class="bar-royal">
|
|
|
|
<ion-nav-title>{{'Create Shared Wallet' | translate}}</ion-nav-title>
|
|
|
|
<ion-nav-back-button>
|
|
|
|
</ion-nav-back-button>
|
|
|
|
</ion-nav-bar>
|
|
|
|
|
2017-05-22 17:28:41 -07:00
|
|
|
<ion-content>
|
2017-05-22 17:05:32 -07:00
|
|
|
<form name="setupForm" ng-submit="create()" novalidate>
|
2016-10-12 22:31:15 -07:00
|
|
|
<div class="list settings-list settings-input-group">
|
2016-09-08 07:28:41 -07:00
|
|
|
<label class="item item-input item-stacked-label">
|
|
|
|
<span class="input-label" translate>Wallet name</span>
|
|
|
|
<input type="text"
|
|
|
|
placeholder="{{'Family vacation funds'|translate}}"
|
|
|
|
ng-model="formData.walletName"
|
|
|
|
ng-required="true"
|
|
|
|
ng-focus="formFocus('wallet-name')"
|
|
|
|
ng-blur="formFocus(false)">
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="item item-input item-stacked-label">
|
2016-10-12 22:31:15 -07:00
|
|
|
<span class="input-label" translate>Your name</span>
|
2016-09-08 07:28:41 -07:00
|
|
|
<input type="text"
|
2016-12-09 06:26:24 -08:00
|
|
|
placeholder="Satoshi"
|
2016-09-08 07:28:41 -07:00
|
|
|
ng-model="formData.myName"
|
|
|
|
ng-required="formData.totalCopayers != 1"
|
|
|
|
ng-disabled="formData.totalCopayers == 1"
|
|
|
|
ng-focus="formFocus('my-name')"
|
|
|
|
ng-blur="formFocus(false)">
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="item item-input item-select">
|
|
|
|
<div class="input-label" translate>
|
|
|
|
Total number of copayers
|
|
|
|
</div>
|
|
|
|
<select class="m10t" ng-model="formData.totalCopayers" ng-options="totalCopayers as totalCopayers for totalCopayers in TCValues"
|
|
|
|
ng-change="setTotalCopayers(formData.totalCopayers)">
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="item item-input item-select">
|
|
|
|
<div class="input-label" translate>
|
|
|
|
Required number of signatures
|
|
|
|
</div>
|
|
|
|
<select class="m10t"
|
|
|
|
ng-model="formData.requiredCopayers" ng-options="requiredCopayers as requiredCopayers for requiredCopayers in RCValues"
|
|
|
|
ng-disabled="formData.totalCopayers == 1">
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
|
2016-10-07 11:54:14 -07:00
|
|
|
<div class="item item-divider"></div>
|
|
|
|
|
|
|
|
<a class="item" ng-click="showAdvChange()">
|
2016-09-08 07:28:41 -07:00
|
|
|
<span translate ng-show="!showAdv">Show advanced options</span>
|
|
|
|
<span translate ng-show="showAdv">Hide advanced options</span>
|
2016-10-07 11:54:14 -07:00
|
|
|
</a>
|
2016-09-08 07:28:41 -07:00
|
|
|
|
|
|
|
<div ng-show="showAdv">
|
|
|
|
<label class="item item-input item-stacked-label">
|
|
|
|
<span class="input-label">Wallet Service URL</span>
|
|
|
|
<input type="text" ng-model="formData.bwsurl">
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="item item-input item-select">
|
|
|
|
<div class="input-label" translate>
|
|
|
|
Wallet Key
|
|
|
|
</div>
|
2017-05-29 11:04:22 -07:00
|
|
|
<select class="m10t" ng-model="formData.seedSource" ng-options="seed as seed.label for seed in seedOptions" ng-change="resizeView()"></select>
|
2016-09-08 07:28:41 -07:00
|
|
|
</label>
|
|
|
|
|
2017-05-29 11:04:22 -07:00
|
|
|
<label class="item item-input item-stacked-label" ng-show="formData.seedSource.id == 'trezor' || formData.seedSource.id == 'ledger'">
|
2016-09-08 07:28:41 -07:00
|
|
|
<span class="input-label" translate>Account Number</span>
|
|
|
|
<input type="number" ng-model="formData.account" ignore-mouse-wheel>
|
|
|
|
</label>
|
|
|
|
|
2017-05-29 11:04:22 -07:00
|
|
|
<label class="item item-input item-stacked-label" ng-show="formData.seedSource.id == 'set'">
|
2016-09-08 07:28:41 -07:00
|
|
|
<span class="input-label" translate>Wallet Recovery Phrase</span>
|
|
|
|
<input placeholder="{{'Enter the recovery phrase (BIP39)'|translate}}"
|
|
|
|
autocapitalize="off"
|
|
|
|
type="text"
|
|
|
|
ng-model="formData.privateKey">
|
|
|
|
</label>
|
|
|
|
|
2017-05-29 11:04:22 -07:00
|
|
|
<div ng-show="formData.seedSource.id == 'new' || formData.seedSource.id == 'set'">
|
2017-01-13 04:43:55 -08:00
|
|
|
<ion-toggle class="has-comment" ng-model="encrypt" toggle-class="toggle-positive" ng-change="resizeView()">
|
|
|
|
<span class="toggle-label" translate>Add a password</span>
|
|
|
|
</ion-toggle>
|
|
|
|
<div class="comment">
|
2017-05-29 11:04:22 -07:00
|
|
|
<span ng-show="formData.seedSource.id == 'new'" translate>Add an optional password to secure the recovery phrase</span>
|
|
|
|
<span ng-show="formData.seedSource.id == 'set'" translate>The recovery phrase could require a password to be imported</span>
|
2017-01-13 04:43:55 -08:00
|
|
|
</div>
|
2016-12-19 12:55:21 -08:00
|
|
|
</div>
|
2016-10-07 11:54:14 -07:00
|
|
|
|
2016-12-19 12:55:21 -08:00
|
|
|
<div class="item item-input" ng-show="encrypt">
|
2017-05-29 11:04:22 -07:00
|
|
|
<input ng-show="formData.seedSource.id == 'new'"
|
2016-12-19 12:55:21 -08:00
|
|
|
placeholder="{{'Password'|translate}}"
|
|
|
|
type="password"
|
|
|
|
autocapitalize="off"
|
2017-05-22 12:00:29 -07:00
|
|
|
ng-model="formData.createPassphrase"
|
2017-05-22 17:28:41 -07:00
|
|
|
ng-change="checkPassword(formData.createPassphrase, formData.repeatPassword)"
|
2017-05-22 12:00:29 -07:00
|
|
|
ng-class="{'correct': result == 'correct', 'incorrect': result == 'incorrect'}">
|
2016-12-19 12:55:21 -08:00
|
|
|
|
2017-05-29 11:04:22 -07:00
|
|
|
<input ng-show="formData.seedSource.id == 'set'"
|
2016-12-19 12:55:21 -08:00
|
|
|
placeholder="{{'Password'|translate}}"
|
|
|
|
type="password"
|
|
|
|
autocapitalize="off"
|
2017-05-22 12:00:29 -07:00
|
|
|
ng-model="formData.passphrase"
|
2017-05-22 17:28:41 -07:00
|
|
|
ng-change="checkPassword(formData.passphrase, formData.repeatPassword)"
|
2017-05-22 12:00:29 -07:00
|
|
|
ng-class="{'correct': result == 'correct', 'incorrect': result == 'incorrect'}">
|
|
|
|
</div>
|
|
|
|
<div class="item item-input" ng-show="encrypt">
|
2017-05-29 11:04:22 -07:00
|
|
|
<input ng-show="formData.seedSource.id == 'new'"
|
2017-05-22 12:00:29 -07:00
|
|
|
placeholder="{{'Repeat password'|translate}}"
|
|
|
|
type="password"
|
|
|
|
autocapitalize="off"
|
2017-05-22 17:28:41 -07:00
|
|
|
ng-model="formData.repeatPassword"
|
|
|
|
ng-change="checkPassword(formData.createPassphrase, formData.repeatPassword)"
|
2017-05-22 12:00:29 -07:00
|
|
|
ng-class="{'correct': result == 'correct', 'incorrect': result == 'incorrect'}">
|
|
|
|
|
2017-05-29 11:04:22 -07:00
|
|
|
<input ng-show="formData.seedSource.id == 'set'"
|
2017-05-22 12:00:29 -07:00
|
|
|
placeholder="{{'Repeat password'|translate}}"
|
|
|
|
type="password"
|
|
|
|
autocapitalize="off"
|
2017-05-22 17:28:41 -07:00
|
|
|
ng-model="formData.repeatPassword"
|
|
|
|
ng-change="checkPassword(formData.passphrase, formData.repeatPassword)"
|
2017-05-22 12:00:29 -07:00
|
|
|
ng-class="{'correct': result == 'correct', 'incorrect': result == 'incorrect'}">
|
2016-12-19 12:55:21 -08:00
|
|
|
</div>
|
2016-09-08 07:28:41 -07:00
|
|
|
|
2017-05-29 11:04:22 -07:00
|
|
|
<div class="text-center box-notification error" ng-show="(formData.seedSource.id =='new' || formData.seedSource.id =='set') && encrypt">
|
2016-12-09 06:26:24 -08:00
|
|
|
<strong translate>This password cannot be recovered. If the password is lost, there is no way you could recover your funds.</strong>
|
2016-10-07 11:54:14 -07:00
|
|
|
</div>
|
|
|
|
|
2017-05-22 12:00:29 -07:00
|
|
|
<ion-checkbox ng-model="formData.passwordSaved" class="checkbox-positive" ng-show="encrypt && result == 'correct'">
|
2016-10-07 11:54:14 -07:00
|
|
|
<span class="toggle-label" translate>I have written it down</span>
|
|
|
|
</ion-checkbox>
|
|
|
|
|
2017-05-29 11:04:22 -07:00
|
|
|
<label class="item item-input item-stacked-label" ng-show="formData.seedSource.id == 'set'">
|
2016-09-08 07:28:41 -07:00
|
|
|
<span class="input-label" translate>Derivation Path</span>
|
|
|
|
<input type="text"
|
|
|
|
placeholder="{{'BIP32 path for address derivation'|translate}}"
|
|
|
|
ng-model="formData.derivationPath">
|
|
|
|
</label>
|
|
|
|
|
2017-05-29 11:04:22 -07:00
|
|
|
<ion-toggle ng-show="formData.seedSource.supportsTestnet" ng-model="formData.testnetEnabled" toggle-class="toggle-positive">
|
2016-09-08 07:28:41 -07:00
|
|
|
Testnet
|
|
|
|
</ion-toggle>
|
|
|
|
|
|
|
|
<ion-toggle ng-model="formData.singleAddressEnabled" toggle-class="toggle-positive">
|
|
|
|
<span translate>Single Address Wallet</span>
|
|
|
|
<small translate>For audit purposes</small>
|
|
|
|
</ion-toggle>
|
|
|
|
|
|
|
|
</div> <!-- advanced -->
|
|
|
|
</div> <!-- list -->
|
|
|
|
|
2016-10-11 20:23:54 -07:00
|
|
|
<button type="submit" class="button button-standard button-primary"
|
2017-05-29 11:04:22 -07:00
|
|
|
ng-disabled="setupForm.$invalid || ((encrypt && !formData.passwordSaved) || encrypt && ((formData.seedSource.id == 'new' && !formData.createPassphrase) || (formData.seedSource.id == 'set' && !formData.passphrase)))">
|
2016-09-08 07:28:41 -07:00
|
|
|
<span translate>Create {{formData.requiredCopayers}}-of-{{formData.totalCopayers}} wallet</span>
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</ion-content>
|
|
|
|
</ion-view>
|