mirror of https://github.com/BTCPrivate/copay.git
commit
1aede751a9
|
@ -1,6 +1,6 @@
|
|||
<div class="ng-animate-disabled row collapse last-transactions-content line-b"
|
||||
ng-class="{'text-gray':!tx.pendingForUs}"
|
||||
ng-click="home.openTxpModal(tx, index.copayers)">
|
||||
ng-click="home.openTxpModal(tx, index.copayers, !!index.glideraStatus)">
|
||||
<div class="small-1 columns text-center" >
|
||||
<i class="icon-circle-active size-10" ng-show="tx.pendingForUs" ng-style="{'color':index.backgroundColor}" style="margin-top:8px;"></i>
|
||||
|
||||
|
|
|
@ -133,31 +133,31 @@
|
|||
</div>
|
||||
|
||||
<div class="text-center text-gray m20t" ng-show="tx.status != 'pending'">
|
||||
<div class="m10t size-12"
|
||||
ng-show="tx.status=='accepted'" translate>
|
||||
Payment accepted...
|
||||
</div>
|
||||
<div
|
||||
ng-show="!loading && tx.status!='broadcasted' && tx.status=='accepted' && tx.status!='rejected'">
|
||||
<div class="m10b size-12" translate>But not broadcasted. Try to send manually</div>
|
||||
<div ng-show="tx.status=='accepted' && !tx.isGlidera" >
|
||||
<div class="m10b size-12" translate>Payment accepted, but not yet broadcasted</div>
|
||||
|
||||
<button class="primary round"
|
||||
ng-click="broadcast(tx)"
|
||||
ng-disabled="loading"> <i class="fi-upload-cloud"></i>
|
||||
ng-disabled="loading"
|
||||
> <i class="fi-upload-cloud"></i>
|
||||
<span translate>Broadcast Payment</span>
|
||||
</button>
|
||||
</div>
|
||||
<div ng-show="tx.status=='accepted' && tx.isGlidera" >
|
||||
<div class="m10 size-12" translate>Payment accepted. It will be broadcasted by Glidera. It case there is a problem, it can be deleted after 6 hours it was created.</div>
|
||||
</div>
|
||||
<div class="text-success m10t"
|
||||
ng-show="tx.status=='broadcasted'" translate>
|
||||
Payment sent!
|
||||
Payment sent
|
||||
</div>
|
||||
<div class="text-center text-warning m10t"
|
||||
ng-show="tx.status=='rejected'" translate>
|
||||
Payment finally rejected
|
||||
Payment rejected
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row columns text-center m20t" ng-if="tx.canBeRemoved">
|
||||
<div class="text-gray size-12 m20b" show="tx.canBeRemoved" translate>
|
||||
<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>
|
||||
<button class="tiny round outline dark-gray warning" ng-click="remove(tx)"
|
||||
|
|
|
@ -839,6 +839,8 @@ console.log('[index.js:395]',txps); //TODO
|
|||
|
||||
self.initGlidera = function(accessToken) {
|
||||
if (self.isShared) return;
|
||||
self.glideraStatus = null;
|
||||
|
||||
glideraService.setCredentials(self.network);
|
||||
|
||||
var getToken = function(cb) {
|
||||
|
|
|
@ -30,8 +30,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
if (isChromeApp) {
|
||||
var animatedSlideUp = 'full';
|
||||
var animatedSlideRight = 'full';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
var animatedSlideUp = 'full animated slideInUp';
|
||||
var animatedSlideRight = 'full animated slideInRight';
|
||||
}
|
||||
|
@ -174,18 +173,30 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
});
|
||||
};
|
||||
|
||||
this.openTxpModal = function(tx, copayers) {
|
||||
var GLIDERA_LOCK_TIME = 6 * 60 * 60 ;
|
||||
// isGlidera flag is a security mesure so glidera status is not
|
||||
// only determined by the tx.message
|
||||
this.openTxpModal = function(tx, copayers, isGlidera) {
|
||||
var fc = profileService.focusedClient;
|
||||
var refreshUntilItChanges = false;
|
||||
var currentSpendUnconfirmed = $scope.currentSpendUnconfirmed;
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||
$scope.error = null;
|
||||
$scope.tx = tx;
|
||||
$scope.copayers = copayers
|
||||
$scope.copayerId = fc.credentials.copayerId;
|
||||
$scope.canSign = fc.canSign();
|
||||
$scope.loading = null;
|
||||
$scope.color = fc.backgroundColor;
|
||||
|
||||
// ToDo: use tx.customData instead of tx.message
|
||||
if (tx.message === 'Glidera transaction' && isGlidera) {
|
||||
tx.isGlidera = true;
|
||||
if (tx.canBeRemoved) {
|
||||
tx.canBeRemoved = (Date.now()/1000 - (tx.ts || tx.createdOn)) > GLIDERA_LOCK_TIME;
|
||||
}
|
||||
}
|
||||
$scope.tx = tx;
|
||||
|
||||
refreshUntilItChanges = false;
|
||||
$scope.currentSpendUnconfirmed = currentSpendUnconfirmed;
|
||||
|
||||
|
|
Loading…
Reference in New Issue