Merge pull request #3465 from matiu/bug/signature-fail-msg

hide delete is n=1, show err if sign failed
This commit is contained in:
Gustavo Maximiliano Cortez 2015-11-14 18:51:41 -03:00
commit 4ccee4c9a2
2 changed files with 5 additions and 1 deletions

View file

@ -156,7 +156,7 @@
</div>
</div>
<div class="columns text-center m20t" ng-if="tx.canBeRemoved">
<div class="columns text-center m20t" ng-if="tx.canBeRemoved && isShared">
<div class="text-gray size-12 m20b" ng-if="!tx.isGlidera" translate>
* A payment proposal can be deleted if 1) you are the creator, and no other copayer has signed, or 2) 24 hours have passed since the proposal was created.
</div>

View file

@ -271,6 +271,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.canSign = fc.canSign() || fc.isPrivKeyExternal();
$scope.loading = null;
$scope.color = fc.backgroundColor;
$scope.isShared = fc.credentials.n > 1;
// ToDo: use tx.customData instead of tx.message
if (tx.message === 'Glidera transaction' && isGlidera) {
@ -951,6 +952,9 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
profileService.signTxProposal(txp, function(err, signedTx) {
self.setOngoingProcess();
if (err) {
if (!lodash.isObject(err)) {
err = { message: err};
}
err.message = bwsError.msg(err, gettextCatalog.getString('The payment was created but could not be signed. Please try again from home screen'));
return cb(err);
}