commit
25e4930730
32 changed files with 294 additions and 387 deletions
|
|
@ -26,9 +26,6 @@
|
|||
<div ng-include="'views/includes/sidebar.html'" ng-if="index.hasProfile"></div>
|
||||
|
||||
<div notifications="right top"></div>
|
||||
<div ng-include="'views/includes/offline.html'" ng-if="index.isOffline"></div>
|
||||
<div ng-include="'views/includes/clientError.html'" ng-if="index.clientError"></div>
|
||||
|
||||
<div ng-include="'views/includes/password.html'" ng-if="index.askPassword"
|
||||
></div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<div class="content">
|
||||
<ul class="no-bullet manage size-12">
|
||||
<li>
|
||||
<a title="Create new wallet" ng-click="$root.go('create')">
|
||||
|
|
@ -29,4 +30,4 @@
|
|||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="extra-margin-bottom"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<div class="backup" ng-controller="backupController as backup">
|
||||
<div class="content p20v" ng-controller="backupController as backup">
|
||||
<div class="row m20t">
|
||||
<div class="columns" ng-show="!backup.backupWalletPlainText && !backup.error">
|
||||
<div class="text-warning size-14 m10v" ng-show="backup.isEncrypted">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
<div ng-controller="copayersController as copayers" ng-init="copayers.init()"
|
||||
ng-if="!index.clientError">
|
||||
|
||||
<div class="content p20v" ng-controller="copayersController as copayers" ng-init="copayers.init()">
|
||||
<div ng-show="!index.notAuthorized">
|
||||
<div class="row m10t text-center">
|
||||
<div class="large-12 columns">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,17 @@
|
|||
<div class="create m20t" ng-controller="createController as create">
|
||||
<div ng-show="create.loading" class="text-center text-gray animated infinite flash" translate>Creating wallet...</div>
|
||||
<div class="content p20v" ng-controller="createController as create">
|
||||
|
||||
<div class="onGoingProcess" ng-show="create.loading" style="background-color:#222">
|
||||
<div class="spinner">
|
||||
<div class="rect1"></div>
|
||||
<div class="rect2"></div>
|
||||
<div class="rect3"></div>
|
||||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
<span translate>Creating Wallet...</span>
|
||||
</div>
|
||||
|
||||
|
||||
<form name="setupForm" ng-submit="create.create(setupForm)" ng-show="!create.loading" novalidate>
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@
|
|||
<div class="text-center size-12 text-warning" ng-show="cp.error">
|
||||
{{(cp.error)|translate}}. Retrying...
|
||||
</div>
|
||||
|
||||
<div class="m20tp text-white text-center animated infinite flash" ng-if="cp.creatingProfile">
|
||||
<span translate>Creating wallet...</span>
|
||||
<div class="onGoingProcess" ng-show="cp.creatingProfile" style="background-color:#222">
|
||||
<div class="spinner">
|
||||
<div class="rect1"></div>
|
||||
<div class="rect2"></div>
|
||||
<div class="rect3"></div>
|
||||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
<span translate>Creating Wallet...</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="extra-margin-bottom"></div>
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
<div class="extra-margin-bottom"></div>
|
||||
|
|
@ -1,5 +1,16 @@
|
|||
<div class="import m20t" ng-controller="importController as import">
|
||||
<div ng-show="import.loading" class="text-center text-gray animated infinite flash" translate>Importing wallet...</div>
|
||||
<div class="content p20v" ng-controller="importController as import">
|
||||
<div class="onGoingProcess" ng-show="import.loading" style="background-color:#222">
|
||||
<div class="spinner">
|
||||
<div class="rect1"></div>
|
||||
<div class="rect2"></div>
|
||||
<div class="rect3"></div>
|
||||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
<span translate>Importing wallet...</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" ng-show="!import.loading">
|
||||
<div class="large-12 columns">
|
||||
<form name="importForm" ng-submit="import.import(importForm)" novalidate>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="import-profile" ng-controller="importLegacyController as importLegacy">
|
||||
<div class="content p20v" ng-controller="importLegacyController as importLegacy">
|
||||
<div class="row m20t">
|
||||
<div class="large-5 large-centered medium-7 medium-centered columns">
|
||||
<div class="logo-setup show-for-large-up">
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
<div class="client-error dr-notification-wrapper">
|
||||
<div class="dr-notification">
|
||||
<div class="dr-notification-image">
|
||||
<i class="fi-alert"></i>
|
||||
</div>
|
||||
<div class="dr-notification-content">
|
||||
<h3 class="dr-notification-title">Wallet Service Error</h3>
|
||||
<div class="dr-notification-text ellipsis">{{index.clientError.message || index.clientError}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<div class="offline dr-notification-wrapper">
|
||||
<div class="dr-notification">
|
||||
<div class="dr-notification-image">
|
||||
<i class="fi-alert"></i>
|
||||
</div>
|
||||
<div class="dr-notification-content">
|
||||
<h3 class="dr-notification-title">{{'Could not connect to Wallet Service'|translate}}</h3>
|
||||
<div class="dr-notification-text ellipsis animated infinite flash">{{'Trying to reconnnect...'|translate}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<nav ng-controller="topbarController as topbar" class="tab-bar animated fadeIn">
|
||||
<section class="left-small">
|
||||
<a class="p10" ng-show="!goBackToState && !closeToState && !index.noFocusedWallet"
|
||||
<a class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet"
|
||||
ng-click="index.openMenu()"><i class="fi-list size-24"></i>
|
||||
</a>
|
||||
<a ng-show="goBackToState"
|
||||
|
|
@ -10,11 +10,11 @@
|
|||
</section>
|
||||
|
||||
<section class="right-small" ng-show="index.isComplete && !goBackToState">
|
||||
<a ng-show="!closeToState" class="p10"
|
||||
<a ng-show="!closeToHome" class="p10"
|
||||
ng-click="topbar.openScanner()"><i class="fi-camera size-24"></i></a>
|
||||
<a ng-show="closeToState" class="p10"
|
||||
ng-click="$root.go(closeToState); closeToState = null">
|
||||
{{'Done'|translate}}
|
||||
<a ng-show="closeToHome"
|
||||
ng-click="topbar.goHome(); closeToHome = null">
|
||||
<span class="text-close">{{'Close'|translate}}</span>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
<div class="join m20t" ng-controller="joinController as join">
|
||||
<div ng-show="join.loading" class="text-center text-gray animated infinite flash" translate>Joining shared wallet...</div>
|
||||
<div class="content p20v" ng-controller="joinController as join">
|
||||
<div class="onGoingProcess" ng-show="join.loading" style="background-color:#222">
|
||||
<div class="spinner">
|
||||
<div class="rect1"></div>
|
||||
<div class="rect2"></div>
|
||||
<div class="rect3"></div>
|
||||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
<span translate>Joining Wallet...</span>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="!join.loading">
|
||||
<div class="large-12 columns">
|
||||
<form name="joinForm" ng-submit="join.join(joinForm)" novalidate>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="row m20t payment-uri" ng-controller="paymentUriController as payment">
|
||||
<div class="content p20v row payment-uri" ng-controller="paymentUriController as payment">
|
||||
<div class="large-12 columns" ng-init="uri = payment.checkBitcoinUri()">
|
||||
<div class="panel text-center" ng-show="!uri">
|
||||
<h1 translate>Bitcoin URI is NOT valid!</h1>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="preferences" ng-controller="preferencesController as preferences">
|
||||
<div class="content preferences" ng-controller="preferencesController as preferences">
|
||||
|
||||
<ul class="no-bullet m0 size-14">
|
||||
<h4 class="title m0" translate>{{index.walletName}} settings</h4>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="preferences" ng-controller="preferencesAltCurrencyController as prefAltCurrency">
|
||||
<div class="content preferences" ng-controller="preferencesAltCurrencyController as prefAltCurrency">
|
||||
<div ng-repeat="altCurrency in prefAltCurrency.alternativeOpts" ng-click="prefAltCurrency.save(altCurrency)" class="line-b p20 size-14">
|
||||
<span>{{altCurrency.name}}</span>
|
||||
<i class="fi-check size-16 right" ng-show="altCurrency.name == prefAltCurrency.selectedAlternative.name"></i>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="preferences m20t columns" ng-controller="preferencesBwsUrlController as prefBwsUrl">
|
||||
<div class="content preferences p20v columns" ng-controller="preferencesBwsUrlController as prefBwsUrl">
|
||||
<form name="settingsBwsUrlForm" ng-submit="prefBwsUrl.save()" class="m20t">
|
||||
<label>Bitcore Wallet Service URL</label>
|
||||
<input type="text" id="bwsurl" type="text" name="bwsurl" ng-model="prefBwsUrl.bwsurl">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="preferences" ng-controller="preferencesColorController as p">
|
||||
<div class="content preferences" ng-controller="preferencesColorController as p">
|
||||
<div ng-repeat="c in p.colorOpts" ng-click="p.save(c)" class="line-b p20 size-14">
|
||||
<span ng-style="{'color': c}">█</span>
|
||||
<i class="fi-check size-16 right" ng-show="p.color == c"></i>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="m20t" ng-controller="preferencesDeleteWalletController as preferences">
|
||||
<div class="content p20v" ng-controller="preferencesDeleteWalletController as preferences">
|
||||
<h4 class="text-warning text-center m0" translate> Warning! </h4>
|
||||
<div class="box-notification" ng-show="preferences.error" >
|
||||
<span class="text-warning size-14">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="preferences" ng-controller="preferencesLanguageController as prefLang">
|
||||
<div class="content preferences" ng-controller="preferencesLanguageController as prefLang">
|
||||
<div class="animated infinite flash text-center m20t text-gray" ng-show="prefLang.loading" translate>Applying changes</div>
|
||||
<div ng-show="!prefLang.loading"
|
||||
ng-repeat="lang in index.availableLanguages"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="preferences" ng-controller="preferencesUnitController as prefUnit">
|
||||
<div class="content preferences" ng-controller="preferencesUnitController as prefUnit">
|
||||
<div ng-repeat="unit in prefUnit.unitOpts" ng-click="prefUnit.save(unit)" class="line-b p20 size-14">
|
||||
<span>{{unit.shortName}}</span>
|
||||
<i class="fi-check size-16 right" ng-show="prefUnit.unitName == unit.shortName"></i>
|
||||
|
|
|
|||
|
|
@ -1,141 +0,0 @@
|
|||
<div class="send" ng-controller="sendController as send" ng-init="send.init()">
|
||||
<div ng-show="index.lockedBalance">
|
||||
<h4 class="title m0">
|
||||
<div class="left">
|
||||
<i class="fi-info size-36 m10r lh"></i>
|
||||
</div>
|
||||
<div class="size-12">
|
||||
<span class="db text-bold">
|
||||
<span translate>Available Balance</span>:
|
||||
{{index.availableBalanceStr }}
|
||||
</span>
|
||||
<span class="text-gray">
|
||||
{{index.lockedBalanceStr}}
|
||||
<span translate>in pending transactions</span>
|
||||
</span>
|
||||
</div>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="row m20t">
|
||||
<div class="large-12 large-centered columns">
|
||||
<div class="box-notification" ng-show="send.fetchingURL">
|
||||
<span class="text-secondary size-14" translate>
|
||||
Fetching Payment Information...
|
||||
</span>
|
||||
</div>
|
||||
<form ng-show="!send.fetchingURL" name="sendForm" ng-submit="send.submitForm(sendForm)" ng-disabled="send.blockUx" novalidate>
|
||||
<div class="box-notification" ng-show="send.error" ng-click="send.resetError()">
|
||||
<span class="text-warning">
|
||||
{{send.error|translate}}
|
||||
</span>
|
||||
<a class="close-notification text-warning">×</a>
|
||||
</div>
|
||||
|
||||
<div ng-hide="send._paypro || send.hideAddress">
|
||||
<div class="row collapse">
|
||||
|
||||
<label for="address" class="left" >
|
||||
<span translate>To</span>
|
||||
</label>
|
||||
|
||||
<span ng-hide="sendForm.address.$pristine">
|
||||
<span class="has-error right size-12" ng-show="sendForm.address.$invalid && _address">
|
||||
<span class="icon-input">
|
||||
<i class="fi-x"></i>
|
||||
</span>
|
||||
<span translate>Not valid</span>
|
||||
</span>
|
||||
<small class="icon-input right" ng-show="!sendForm.address.$invalid">
|
||||
<i class="fi-check"></i>
|
||||
</small>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<input type="text" id="address" name="address" ng-disabled="send.blockUx || send.lockAddress" ng-attr-placeholder="{{'Bitcoin address'|translate}}" ng-model="_address" valid-address required ng-focus="send.formFocus('address')" ng-blur="send.formFocus(false)">
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="send._paypro && !send.hideAddress">
|
||||
<div class="row collapse" ng-click="send.openPPModal(send._paypro)">
|
||||
|
||||
<label for="domain">
|
||||
<span translate>Payment to</span>
|
||||
</label>
|
||||
|
||||
<div class="input block">
|
||||
<input class="p45li" type="text" id="domain" name="domain" ng-model="send._paypro.domain" ng-disabled="1">
|
||||
<i ng-show="send._paypro.verified" class="fi-lock color-greeni"></i>
|
||||
<i ng-show="!send._paypro.verified" class="fi-unlock color-yellowi"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-init="showAlternative = false" ng-hide="send.hideAmount">
|
||||
<div class="large-12 medium-12 columns">
|
||||
<div class="m5b right" ng-hide="sendForm.amount.$pristine">
|
||||
<span class="has-error right size-12" ng-show="sendForm.amount.$invalid">
|
||||
<span class="icon-input"><i class="fi-x"></i></span>
|
||||
<span translate>Not valid</span>
|
||||
</span>
|
||||
<small class="icon-input right" ng-show="!sendForm.amount.$invalid">
|
||||
<i class="fi-check"></i>
|
||||
</small>
|
||||
</div>
|
||||
<div ng-show="!showAlternative">
|
||||
<label for="amount">
|
||||
<span translate>Amount</span>
|
||||
</label>
|
||||
|
||||
<div class="input">
|
||||
<input type="number" id="amount" ng-disabled="send.blockUx || send.lockAmount" name="amount" ng-attr-placeholder="{{'Amount'|translate}}" ng-minlength="0.00000001" ng-maxlength="10000000000" ng-model="_amount" valid-amount required autocomplete="off" ng-focus="send.formFocus('amount')" ng-blur="send.formFocus(false)">
|
||||
<a class="postfix" ng-click="showAlternative = true">{{send.unitName}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="showAlternative">
|
||||
<label for="alternative"><span translate>Amount in</span> {{ send.alternativeName }}
|
||||
</label>
|
||||
<div class="input">
|
||||
<input type="number" id="alternative" ng-disabled="send.blockUx || !send.isRateAvailable || send.lockAmount" name="alternative" ng-attr-placeholder="{{'Amount'|translate}}" ng-model="_alternative" requiredautocomplete="off" ng-focus="send.formFocus('amount')" ng-blur="send.formFocus(false)">
|
||||
<a class="postfix" ng-click="showAlternative = false"> {{ send.alternativeIsoCode }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="comment"><span translate>Note</span>
|
||||
<small translate ng-hide="!sendForm.comment.$pristine">optional</small>
|
||||
<small translate class="has-error" ng-show="sendForm.comment.$invalid && !sendForm.comment.$pristine">too long!</small>
|
||||
</label>
|
||||
<div class="input">
|
||||
<textarea id="comment" ng-disabled="send.blockUx" name="comment"
|
||||
ng-maxlength="100" ng-model="_comment" ng-focus="send.formFocus('msg')"
|
||||
ng-blur="send.formFocus(false)"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="send.onGoingProcess" class="text-gray text-center m10t">
|
||||
<span class="animated infinite flash">{{send.onGoingProcess|translate}}...</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" ng-show="!send.onGoingProcess">
|
||||
<div class="large-6 medium-6 small-6 columns" ng-show="!send.blockUx && (send._paypro || send.lockAddress)">
|
||||
<a ng-click="send.resetForm(sendForm)" class="button expand outline dark-gray" translate>Cancel</a>
|
||||
</div>
|
||||
<div class="columns" ng-class="{'small-6 medium-6 large-6':(send._paypro || send.lockAddress)}">
|
||||
<button type="submit" class="button black radius expand" ng-disabled="sendForm.$invalid || send.blockUx"
|
||||
ng-style="{'background-color':index.backgroundColor}" translate>
|
||||
Send
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end of row -->
|
||||
</div>
|
||||
<div class="extra-margin-bottom"></div>
|
||||
|
|
@ -1,116 +1,151 @@
|
|||
<div ng-controller="walletHomeController as home">
|
||||
<div id="walletHome" class="walletHome tab-view tab-in">
|
||||
<div class="oh" ng-show="!index.noFocusedWallet">
|
||||
<div class="amount" ng-style="{'background-color':index.backgroundColor}">
|
||||
<div ng-if="!index.anyOnGoingProcess && !index.notAuthorized">
|
||||
<div ng-show="index.updateError" ng-click='index.openWallet()'>
|
||||
<span translate>Could not update Wallet</span>
|
||||
<br><span translate>Tap to retry</span>
|
||||
</div>
|
||||
|
||||
<div ng-show="index.walletScanStatus == 'error'" ng-click='index.retryScan()'>
|
||||
<span translate>Scan status finished with error</span>
|
||||
<br><span translate>Tap to retry</span>
|
||||
</div>
|
||||
<div class="row columns m20tp" ng-show="index.noFocusedWallet">
|
||||
<div class="text-center text-warning m20b">
|
||||
<i class="fi-alert"></i> <span translate>You do not have any wallet</span>
|
||||
</div>
|
||||
<button class="button black expand" ng-click="$root.go('add')" translate>Create</button>
|
||||
</div>
|
||||
|
||||
<div ng-show="!index.updateError && index.walletScanStatus != 'error'">
|
||||
<strong class="size-36">{{index.totalBalanceStr}}</strong>
|
||||
<div class="size-14"
|
||||
ng-if="index.totalBalanceAlternative">
|
||||
{{index.totalBalanceAlternative}} {{index.alternativeIsoCode}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="onGoingProcess" ng-show="index.isOffline" style="background-color:#222">
|
||||
<div class="spinner">
|
||||
<div class="rect1"></div>
|
||||
<div class="rect2"></div>
|
||||
<div class="rect3"></div>
|
||||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
<span translate>Reconnecting to Wallet Service...</span>
|
||||
</div>
|
||||
|
||||
<div ng-if="index.anyOnGoingProcess">
|
||||
<div class="size-36">
|
||||
<strong>...</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="onGoingProcess" ng-show="index.anyOnGoingProcess && !index.isOffline" ng-style="{'background-color':index.backgroundColor}">
|
||||
<div class="spinner">
|
||||
<div class="rect1"></div>
|
||||
<div class="rect2"></div>
|
||||
<div class="rect3"></div>
|
||||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
<span translate ng-show="
|
||||
index.onGoingProcessName == 'openingWallet'
|
||||
|| index.onGoingProcessName == 'updatingStatus'
|
||||
|| index.onGoingProcessName == 'updatingBalance'
|
||||
"> Updating Wallet... </span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'scanning'">Scanning Wallet funds...</span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'recreating'">Recreating Wallet...</span>
|
||||
</div>
|
||||
|
||||
<div class="onGoingProcess" ng-show="home.onGoingProcess && !index.anyOnGoingProcess">
|
||||
<div class="spinner">
|
||||
<div class="rect1"></div>
|
||||
<div class="rect2"></div>
|
||||
<div class="rect3"></div>
|
||||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
{{home.onGoingProcess|translate}}...
|
||||
</div>
|
||||
|
||||
<div class="oh" ng-show="!index.noFocusedWallet">
|
||||
|
||||
<div id="walletHome" class="walletHome tab-view tab-in">
|
||||
<div class="oh">
|
||||
<div class="amount" ng-style="{'background-color':index.backgroundColor}">
|
||||
<div ng-if="!index.anyOnGoingProcess && !index.notAuthorized">
|
||||
<div ng-show="index.updateError" ng-click='index.openWallet()'>
|
||||
<span translate>Could not update Wallet</span>
|
||||
<br><span translate>Tap to retry</span>
|
||||
</div>
|
||||
<div class="pr columns line-b">
|
||||
<div class="avatar-wallet left"
|
||||
ng-style="{'background-color':index.backgroundColor}">{{index.walletName | limitTo: 1}}</div>
|
||||
<div class="right">
|
||||
<a ng-click="$root.go('preferences')" class="button outline light-gray tiny m0">
|
||||
<i class="fi-widget size-18 vm"></i>
|
||||
<span class="show-for-medium-up" translate>Preferences</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="wallet-info" ng-click="openCopayersModal(index.copayers, index.copayerId)">
|
||||
<p class="m0">
|
||||
{{index.m}} <span translate>of</span> {{index.n}}
|
||||
</p>
|
||||
<div class="size-12 text-gray">
|
||||
<span ng-if="index.n > 1" translate>Multisignature wallet </span>
|
||||
<span ng-if="index.n == 1" translate>Personal Wallet</span>
|
||||
<span ng-if="index.network != 'livenet'"> - Testnet</span>
|
||||
</div>
|
||||
|
||||
<div ng-show="index.walletScanStatus == 'error'" ng-click='index.retryScan()'>
|
||||
<span translate>Scan status finished with error</span>
|
||||
<br><span translate>Tap to retry</span>
|
||||
</div>
|
||||
|
||||
<div ng-show="!index.updateError && index.walletScanStatus != 'error'">
|
||||
<strong class="size-36">{{index.totalBalanceStr}}</strong>
|
||||
<div class="size-14"
|
||||
ng-if="index.totalBalanceAlternative">
|
||||
{{index.totalBalanceAlternative}} {{index.alternativeIsoCode}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="onGoingProcess" ng-show="index.anyOnGoingProcess" ng-style="{'background-color':index.backgroundColor}">
|
||||
<div class="spinner">
|
||||
<div class="rect1"></div>
|
||||
<div class="rect2"></div>
|
||||
<div class="rect3"></div>
|
||||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
<span translate ng-show="index.onGoingProcessName == 'openingWallet'"> Updating Wallet... </span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'updatingStatus'"> Updating Status...</span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'updatingBalance'">Updating Wallet... </span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'updatingPendingTxps'">Updating Wallet...</span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'scanning'">Scanning Wallet funds...</span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'recreating'">Recreating Wallet...</span>
|
||||
</div>
|
||||
|
||||
<div class="m20t" ng-show="index.notAuthorized">
|
||||
<div class="text-center text-warning">
|
||||
<i class="fi-alert"></i>
|
||||
<span translate>
|
||||
WARNING: Wallet not registered
|
||||
</span>
|
||||
</div>
|
||||
<div class="text-center text-gray m15r m15l" translate>
|
||||
This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information.
|
||||
</div>
|
||||
<div class="text-center m10t ">
|
||||
<span class="button outline dark-gray tiny"
|
||||
ng-click="index.recreate()">
|
||||
<span translate>Recreate</span>
|
||||
</span>
|
||||
<div ng-if="index.anyOnGoingProcess">
|
||||
<div class="size-36">
|
||||
<strong>...</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- amount -->
|
||||
|
||||
|
||||
<div ng-show="index.requiresMultipleSignatures && index.txps[0]">
|
||||
<h4 class="title m0" translate>Spend proposals</h4>
|
||||
<div class="last-transactions pr" ng-repeat="tx in index.txps"
|
||||
ng-include="'views/includes/transaction.html'">
|
||||
</div>
|
||||
|
||||
<div class="text-gray text-center size-12 p10t"
|
||||
ng-show="index.lockedBalance && !index.updatingStatus">
|
||||
<span translate>Total Locked Balance</span>:
|
||||
<b>{{index.lockedBalance}} {{index.unitName}} </b>
|
||||
<span> {{index.lockedBalanceAlternative}}
|
||||
{{index.alternativeIsoCode}} </span>
|
||||
</div>
|
||||
|
||||
<div class="pr" ng-if="!index.txps[0]">
|
||||
<p translate>No pending spend proposals at the moment.</p>
|
||||
</div>
|
||||
<div class="pr columns line-b">
|
||||
<div class="avatar-wallet left"
|
||||
ng-style="{'background-color':index.backgroundColor}">{{index.walletName | limitTo: 1}}
|
||||
</div>
|
||||
|
||||
<div ng-if="!index.requiresMultipleSignatures && index.txps[0]">
|
||||
<h4 class="title m0" translate>Unsent transactions</h4>
|
||||
<div class="last-transactions pr" ng-repeat="tx in index.txps"
|
||||
ng-include="'views/includes/transaction.html'">
|
||||
<div class="right">
|
||||
<a ng-click="$root.go('preferences')" class="button outline light-gray tiny m0">
|
||||
<i class="fi-widget size-18 vm"></i>
|
||||
<span class="show-for-medium-up" translate>Preferences</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="wallet-info" ng-click="openCopayersModal(index.copayers, index.copayerId)">
|
||||
<p class="m0">
|
||||
{{index.m}} <span translate>of</span> {{index.n}}
|
||||
</p>
|
||||
<div class="size-12 text-gray">
|
||||
<span ng-if="index.n > 1" translate>Multisignature wallet </span>
|
||||
<span ng-if="index.n == 1" translate>Personal Wallet</span>
|
||||
<span ng-if="index.network != 'livenet'"> - Testnet</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- oh -->
|
||||
|
||||
|
||||
<div class="m20t" ng-show="index.notAuthorized && ! index.anyOnGoingProcess">
|
||||
<div class="text-center text-warning">
|
||||
<i class="fi-alert"></i>
|
||||
<span translate>
|
||||
WARNING: Wallet not registered
|
||||
</span>
|
||||
</div>
|
||||
<div class="text-center text-gray m15r m15l" translate>
|
||||
This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information.
|
||||
</div>
|
||||
<div class="text-center m10t ">
|
||||
<span class="button outline dark-gray tiny"
|
||||
ng-click="index.recreate()">
|
||||
<span translate>Recreate</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="index.requiresMultipleSignatures && index.txps[0]">
|
||||
<h4 class="title m0" translate>Spend proposals</h4>
|
||||
<div class="last-transactions pr" ng-repeat="tx in index.txps"
|
||||
ng-include="'views/includes/transaction.html'">
|
||||
</div>
|
||||
|
||||
<div class="text-gray text-center size-12 p10t"
|
||||
ng-show="index.lockedBalance && !index.updatingStatus">
|
||||
<span translate>Total Locked Balance</span>:
|
||||
<b>{{index.lockedBalance}} {{index.unitName}} </b>
|
||||
<span> {{index.lockedBalanceAlternative}}
|
||||
{{index.alternativeIsoCode}} </span>
|
||||
</div>
|
||||
|
||||
<div class="pr" ng-if="!index.txps[0]">
|
||||
<p translate>No pending spend proposals at the moment.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="!index.requiresMultipleSignatures && index.txps[0]">
|
||||
<h4 class="title m0" translate>Unsent transactions</h4>
|
||||
<div class="last-transactions pr" ng-repeat="tx in index.txps"
|
||||
ng-include="'views/includes/transaction.html'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
|
||||
|
|
@ -174,7 +209,7 @@
|
|||
<div class="row m20t" ng-if="home.addr">
|
||||
<div class="large-12 columns">
|
||||
<button class="button black expand radius" ng-click="home.newAddress()"
|
||||
ng-style="{'background-color':index.backgroundColor}" ng-disabled="home.generatingAddress" translate>
|
||||
ng-style="{'background-color':index.backgroundColor}" ng-disabled="home.blockUx || index.isOffline" translate>
|
||||
Generate new address
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -209,12 +244,7 @@
|
|||
</div>
|
||||
<div class="row m20t">
|
||||
<div class="large-12 large-centered columns">
|
||||
<div class="box-notification" ng-show="home.fetchingURL">
|
||||
<span class="text-secondary size-14" translate>
|
||||
Fetching Payment Information...
|
||||
</span>
|
||||
</div>
|
||||
<form ng-show="!home.fetchingURL" name="sendForm" ng-submit="home.submitForm(sendForm)" ng-disabled="home.blockUx" novalidate>
|
||||
<form ng-show="!home.onGoingProcess" name="sendForm" ng-submit="home.submitForm()" ng-disabled="home.blockUx" novalidate>
|
||||
<div class="box-notification" ng-show="home.error" ng-click="home.resetError()">
|
||||
<span class="text-warning">
|
||||
{{home.error|translate}}
|
||||
|
|
@ -306,18 +336,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="home.onGoingProcess" class="text-gray text-center m10t">
|
||||
<span class="animated infinite flash">{{home.onGoingProcess|translate}}...</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" ng-show="!home.onGoingProcess">
|
||||
<div class="large-6 medium-6 small-6 columns" ng-show="!home.blockUx && (home._paypro || home.lockAddress)">
|
||||
<a ng-click="home.resetForm(sendForm)" class="button expand outline dark-gray" translate>Cancel</a>
|
||||
</div>
|
||||
<div class="columns" ng-class="{'small-6 medium-6 large-6':(home._paypro || home.lockAddress)}">
|
||||
<button type="submit" class="button black radius expand" ng-disabled="sendForm.$invalid || home.blockUx"
|
||||
<button type="submit" class="button black radius expand" ng-disabled="sendForm.$invalid || home.blockUx || index.isOffline"
|
||||
ng-style="{'background-color':index.backgroundColor}" translate>
|
||||
Send
|
||||
</button>
|
||||
|
|
@ -336,14 +360,12 @@ history
|
|||
|
||||
-->
|
||||
<div id="history" class="history tab-view">
|
||||
<div class="row m20t" ng-show="!index.txHistory[0]">
|
||||
<div class="row m20t" ng-show="!index.txHistory[0] && !index.updatingTxHistory">
|
||||
<div class="large-12 columns">
|
||||
<div class="oh text-center">
|
||||
<span ng-if="index.updatingTxHistory" class="text-gray animated flash infinite" translate>Getting transactions...</span>
|
||||
<span ng-if="!index.updatingTxHistory">
|
||||
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.openWallet()'>
|
||||
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.updateTxHistory()'>
|
||||
<span translate>Could not fetch transaction history</span>
|
||||
<br> [<span translate>Tap to retry</span>]
|
||||
<br> <span translate>Tap to retry</span>
|
||||
</span>
|
||||
<span ng-if="!index.txHistoryError" translate>
|
||||
No transactions yet
|
||||
|
|
@ -386,30 +408,23 @@ history
|
|||
</div>
|
||||
<div class="m20t row">
|
||||
<div class="columns">
|
||||
<button class="outline light-gray small expand" ng-disabled="index.updatingTxHistory"
|
||||
ng-click="index.updateTxHistory(index.skipHistory)" ng-show="index.txHistoryPaging">
|
||||
<span ng-show="!index.updatingTxHistory">
|
||||
<span translate>More</span> <i class="icon-arrow-down4 ng-scope"></i>
|
||||
</span>
|
||||
<span ng-show="index.updatingTxHistory" translate>
|
||||
Getting transactions...
|
||||
|
||||
<button class="outline light-gray small expand"
|
||||
ng-disabled="index.updatingTxHistory"
|
||||
ng-click="index.updateTxHistory(index.skipHistory)"
|
||||
ng-show="index.txHistoryPaging || index.updatingTxHistory"
|
||||
>
|
||||
<span ng-show="!index.updatingTxHistory">
|
||||
<span translate>More</span> <i class="icon-arrow-down4 ng-scope"></i>
|
||||
</span>
|
||||
<span translate ng-show="index.updatingTxHistory">Loading...</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- END -->
|
||||
<div class="row columns m20tp" ng-show="index.noFocusedWallet">
|
||||
<div class="text-center text-warning m20b">
|
||||
<i class="fi-alert"></i> <span translate>You do not have any wallet</span>
|
||||
</div>
|
||||
<button class="button black expand" ng-click="$root.go('add')" translate>Create</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="extra-margin-bottom"></div>
|
||||
|
|
|
|||
|
|
@ -145,6 +145,15 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill, inpu
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
width:100%;
|
||||
position: absolute;
|
||||
top: 46px;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
.logo-setup {
|
||||
text-align: center;
|
||||
margin: 0 0 0.1rem 0;
|
||||
|
|
@ -355,6 +364,7 @@ ul.manage li {
|
|||
.p70l {padding-left: 70px;}
|
||||
.p5h {padding: 0 5px;}
|
||||
.p20h {padding: 0 20px;}
|
||||
.p20v {padding: 20px 0;}
|
||||
.p25l {padding-left: 25px;}
|
||||
.p15 {padding:15px;}
|
||||
.p20 {padding:20px;}
|
||||
|
|
@ -1108,12 +1118,12 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
|
|||
.onGoingProcess {
|
||||
background: #213140;
|
||||
text-align: center;
|
||||
max-width: 14.5rem;
|
||||
max-width: 16.5rem;
|
||||
max-height: 3.5rem;
|
||||
top:auto;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:90px;
|
||||
bottom:170px;
|
||||
margin: auto;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
|
|
@ -1180,3 +1190,4 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
|
|||
-webkit-transform: scaleY(1.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -560,6 +560,7 @@ a.pin-button:active {
|
|||
top: 0;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.modal.fade,
|
||||
|
|
@ -688,8 +689,9 @@ a.pin-button:active {
|
|||
width:100%;
|
||||
position: absolute;
|
||||
top: 46px;
|
||||
bottom: 80px;
|
||||
bottom: 70px;
|
||||
overflow: auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.tab-in {
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.alternativeBalanceAvailable = false;
|
||||
self.totalBalanceAlternative = null;
|
||||
self.notAuthorized = false;
|
||||
self.clientError = null;
|
||||
self.txHistory = [];
|
||||
self.txHistoryPaging = false;
|
||||
self.pendingTxProposalsCountForUs = null;
|
||||
|
||||
$timeout(function() {
|
||||
self.hasProfile = true;
|
||||
|
|
@ -214,14 +214,18 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
|
||||
self.updateTxHistory = function(skip) {
|
||||
var fc = profileService.focusedClient;
|
||||
if (!fc.isComplete()) return;
|
||||
|
||||
if (!skip) {
|
||||
self.txHistory = [];
|
||||
}
|
||||
self.skipHistory = skip || 0;
|
||||
$log.debug('Updating Transaction History');
|
||||
self.txHistoryError = false;
|
||||
self.updatingTxHistory = true;
|
||||
self.txHistoryPaging = false;
|
||||
$timeout(function() {
|
||||
$log.debug('Updating Transaction History');
|
||||
self.txHistoryError = false;
|
||||
self.updatingTxHistory = true;
|
||||
$rootScope.$apply();
|
||||
fc.getTxHistory({
|
||||
skip: self.skipHistory,
|
||||
limit: self.limitHistory + 1
|
||||
|
|
@ -411,17 +415,27 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
};
|
||||
|
||||
|
||||
self.clientError = function (err) {
|
||||
if (isCordova) {
|
||||
navigator.notification.confirm(
|
||||
err,
|
||||
function() {},
|
||||
'Wallet Server Error', ['OK']
|
||||
);
|
||||
} else {
|
||||
alert(err);
|
||||
}
|
||||
};
|
||||
|
||||
self.recreate = function(cb) {
|
||||
var fc = profileService.focusedClient;
|
||||
self.setOngoingProcess('recreating', true);
|
||||
self.clientError = null;
|
||||
fc.recreateWallet(function(err) {
|
||||
self.notAuthorized = false;
|
||||
self.setOngoingProcess('recreating', false);
|
||||
|
||||
if (err) {
|
||||
self.clientError = 'Could not recreate wallet:' + err;
|
||||
self.clientError('Could not recreate wallet:' + err);
|
||||
$rootScope.$apply();
|
||||
return;
|
||||
}
|
||||
|
|
@ -458,7 +472,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
if (err) {
|
||||
if (self.walletId == walletId)
|
||||
self.setOngoingProcess('scanning', false);
|
||||
self.clientError = 'Could not scan wallet:' + err;
|
||||
self.clientError('Could not scan wallet:' + err);
|
||||
$rootScope.$apply();
|
||||
}
|
||||
});
|
||||
|
|
@ -522,7 +536,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
$rootScope.$on(eventName, function(event) {
|
||||
$log.debug('### Online event');
|
||||
self.isOffline = false;
|
||||
self.clientError = null;
|
||||
self.updateAll();
|
||||
self.updateTxHistory();
|
||||
});
|
||||
|
|
@ -531,6 +544,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
$rootScope.$on('Local/Offline', function(event) {
|
||||
$log.debug('Offline event');
|
||||
self.isOffline = true;
|
||||
$timeout(function(){
|
||||
$rootScope.$apply();
|
||||
});
|
||||
});
|
||||
|
||||
$rootScope.$on('Local/BackupDone', function(event) {
|
||||
|
|
@ -544,7 +560,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
});
|
||||
|
||||
$rootScope.$on('Local/BWSNotFound', function(event) {
|
||||
self.clientError = 'Could not access to Bitcore Wallet Service: Service not found';
|
||||
self.clientError('Could not access Wallet Service: Not found');
|
||||
$rootScope.$apply();
|
||||
});
|
||||
|
||||
|
|
@ -557,7 +573,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
} else if (err.code === 'ETIMEDOUT') {
|
||||
$log.debug('Time out:', err);
|
||||
} else {
|
||||
self.clientError = err;
|
||||
self.clientError(err && err.message ? 'Error at Wallet Service:' + err.message : err);
|
||||
}
|
||||
$rootScope.$apply();
|
||||
});
|
||||
|
|
@ -627,7 +643,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
$timeout(function() {
|
||||
self.hasProfile = true;
|
||||
self.noFocusedWallet = true;
|
||||
self.clientError = null;
|
||||
self.isComplete = null;
|
||||
self.walletName = null;
|
||||
go.addWallet();
|
||||
|
|
|
|||
|
|
@ -124,4 +124,8 @@ angular.module('copayApp.controllers').controller('topbarController', function($
|
|||
}
|
||||
};
|
||||
|
||||
this.goHome = function() {
|
||||
go.walletHome();
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -40,9 +40,12 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
self.getAddress();
|
||||
});
|
||||
|
||||
var disableFocusListener = $rootScope.$on('Local/NewFocusedWallet', function() {
|
||||
self.resetForm();
|
||||
});
|
||||
|
||||
var disableTabListener = $rootScope.$on('Local/TabChanged', function(e,tab){
|
||||
switch(tab) {
|
||||
var disableTabListener = $rootScope.$on('Local/TabChanged', function(e, tab) {
|
||||
switch (tab) {
|
||||
case 'send':
|
||||
self.resetError();
|
||||
self.setInputs();
|
||||
|
|
@ -57,6 +60,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
disableScannerListener();
|
||||
disablePaymentUriListener();
|
||||
disableTabListener();
|
||||
disableFocusListener();
|
||||
$rootScope.hideMenuBar = false;
|
||||
});
|
||||
|
||||
|
|
@ -279,14 +283,12 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
this.newAddress = function() {
|
||||
var fc = profileService.focusedClient;
|
||||
self.generatingAddress = true;
|
||||
self.error = null;
|
||||
self.setOngoingProcess('Generating Address');
|
||||
fc.createAddress(function(err, addr) {
|
||||
self.generatingAddress = false;
|
||||
self.setOngoingProcess();
|
||||
if (err) {
|
||||
$log.debug('Creating address ERROR:', err);
|
||||
$scope.$emit('Local/ClientError', err);
|
||||
self.error = 'Could not generate address';
|
||||
} else {
|
||||
self.addr = addr.address;
|
||||
storageService.storeLastAddress(fc.credentials.walletId, addr.address, function() {});
|
||||
|
|
@ -434,16 +436,27 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
this.setOngoingProcess = function(name) {
|
||||
var self = this;
|
||||
$timeout(function() {
|
||||
self.onGoingProcess = name;
|
||||
$rootScope.$apply();
|
||||
})
|
||||
self.blockUx = !!name;
|
||||
|
||||
if (isCordova) {
|
||||
if (name) {
|
||||
window.plugins.spinnerDialog.show(null, name + '...', true);
|
||||
} else {
|
||||
window.plugins.spinnerDialog.hide();
|
||||
}
|
||||
} else {
|
||||
$timeout(function() {
|
||||
self.onGoingProcess = name;
|
||||
$rootScope.$apply();
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
this.submitForm = function(form) {
|
||||
this.submitForm = function() {
|
||||
var fc = profileService.focusedClient;
|
||||
var unitToSat = this.unitToSatoshi;
|
||||
|
||||
var form = $scope.sendForm;
|
||||
if (form.$invalid) {
|
||||
this.error = 'Unable to send transaction proposal';
|
||||
return;
|
||||
|
|
@ -452,18 +465,12 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
if (fc.isPrivKeyEncrypted()) {
|
||||
profileService.unlockFC(function(err) {
|
||||
if (err) return self.setError(err);
|
||||
return self.submitForm(form);
|
||||
return self.submitForm();
|
||||
});
|
||||
return;
|
||||
};
|
||||
|
||||
self.blockUx = true;
|
||||
self.setOngoingProcess('Sending');
|
||||
|
||||
if (isCordova) {
|
||||
window.plugins.spinnerDialog.show(null, 'Creating transaction...', true);
|
||||
}
|
||||
|
||||
self.setOngoingProcess('Sending transaction');
|
||||
$timeout(function() {
|
||||
var comment = form.comment.$modelValue;
|
||||
var paypro = self._paypro;
|
||||
|
|
@ -481,24 +488,16 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
self.setOngoingProcess();
|
||||
if (err) {
|
||||
profileService.lockFC();
|
||||
if (isCordova) {
|
||||
window.plugins.spinnerDialog.hide();
|
||||
}
|
||||
self.blockUx = false;
|
||||
return self.setError(err);
|
||||
}
|
||||
|
||||
self.signAndBroadcast(txp, function(err) {
|
||||
self.setOngoingProcess();
|
||||
if (isCordova) {
|
||||
window.plugins.spinnerDialog.hide();
|
||||
}
|
||||
self.blockUx = false;
|
||||
profileService.lockFC();
|
||||
if (err) {
|
||||
profileService.lockFC();
|
||||
return self.setError(err);
|
||||
}
|
||||
self.resetForm(form);
|
||||
self.resetForm();
|
||||
});
|
||||
});
|
||||
}, 100);
|
||||
|
|
@ -507,7 +506,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
this.signAndBroadcast = function(txp, cb) {
|
||||
var fc = profileService.focusedClient;
|
||||
self.setOngoingProcess('Signing');
|
||||
self.setOngoingProcess('Signing transaction');
|
||||
fc.signTxProposal(txp, function(err, signedTx) {
|
||||
profileService.lockFC();
|
||||
self.setOngoingProcess();
|
||||
|
|
@ -515,7 +514,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
if (err) return cb(err);
|
||||
|
||||
if (signedTx.status == 'accepted') {
|
||||
self.setOngoingProcess('Broadcasting');
|
||||
self.setOngoingProcess('Broadcasting transaction');
|
||||
fc.broadcastTxProposal(signedTx, function(err, btx) {
|
||||
self.setOngoingProcess();
|
||||
if (err) {
|
||||
|
|
@ -570,9 +569,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
|
||||
|
||||
this.resetForm = function(form) {
|
||||
this.resetForm = function() {
|
||||
this.resetError();
|
||||
this.fetchingURL = null;
|
||||
this._paypro = null;
|
||||
|
||||
this.lockAddress = false;
|
||||
|
|
@ -580,6 +578,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
this._amount = this._address = null;
|
||||
|
||||
var form = $scope.sendForm;
|
||||
if (form && form.amount) {
|
||||
form.amount.$pristine = true;
|
||||
form.amount.$setViewValue('');
|
||||
|
|
@ -623,7 +622,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
});
|
||||
};
|
||||
|
||||
this.setFromPayPro = function(uri, form) {
|
||||
this.setFromPayPro = function(uri) {
|
||||
var fc = profileService.focusedClient;
|
||||
if (isChromeApp) {
|
||||
this.error = 'Payment Protocol not supported on Chrome App';
|
||||
|
|
@ -631,22 +630,19 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
}
|
||||
|
||||
var satToUnit = 1 / this.unitToSatoshi;
|
||||
this.fetchingURL = uri;
|
||||
this.blockUx = true;
|
||||
var self = this;
|
||||
self.setOngoingProcess('Fetching Payment Informantion');
|
||||
|
||||
$log.debug('Fetch PayPro Request...', uri);
|
||||
$timeout(function() {
|
||||
fc.fetchPayPro({
|
||||
payProUrl: uri,
|
||||
}, function(err, paypro) {
|
||||
$log.debug(paypro);
|
||||
self.blockUx = false;
|
||||
self.fetchingURL = null;
|
||||
self.setOngoingProcess();
|
||||
|
||||
if (err) {
|
||||
$log.warn(err);
|
||||
self.resetForm(form);
|
||||
self.resetForm();
|
||||
var msg = err.toString();
|
||||
if (msg.match('HTTP')) {
|
||||
msg = 'Could not fetch payment information';
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ angular.module('copayApp.directives')
|
|||
return {
|
||||
require: 'ngModel',
|
||||
link: function(scope, elem, attrs, ctrl) {
|
||||
var networkName = profileService.focusedClient.credentials.network;
|
||||
var URI = bitcore.URI;
|
||||
var Address = bitcore.Address
|
||||
var validator = function(value) {
|
||||
var networkName = profileService.focusedClient.credentials.network;
|
||||
// Regular url
|
||||
if (/^https?:\/\//.test(value)) {
|
||||
ctrl.$setValidity('validAddress', true);
|
||||
|
|
@ -51,6 +51,7 @@ angular.module('copayApp.directives')
|
|||
return;
|
||||
}
|
||||
|
||||
console.log('[directives.js.53]', value, networkName); //TODO
|
||||
// Regular Address
|
||||
ctrl.$setValidity('validAddress', Address.isValid(value, networkName));
|
||||
return value;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ Profile.fromString = function(str) {
|
|||
};
|
||||
|
||||
Profile.prototype.toObj = function() {
|
||||
console.log('[profile.js.37:this:]',this); //TODO
|
||||
return JSON.stringify(this);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ angular
|
|||
templateUrl: 'views/includes/topbar.html',
|
||||
controller: function($scope) {
|
||||
$scope.titleSection = 'Preferences';
|
||||
$scope.closeToState = 'walletHome';
|
||||
$scope.closeToHome = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -347,7 +347,7 @@ angular
|
|||
templateUrl: 'views/includes/topbar.html',
|
||||
controller: function($scope) {
|
||||
$scope.titleSection = 'Add wallet';
|
||||
$scope.goBackToState = 'walletHome';
|
||||
$scope.closeToHome = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,13 +67,6 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
|
|||
});
|
||||
};
|
||||
|
||||
root.home = function() {
|
||||
if ($rootScope.iden)
|
||||
root.walletHome();
|
||||
else
|
||||
root.path('signin');
|
||||
};
|
||||
|
||||
root.addWallet = function() {
|
||||
$state.go('add');
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue