do not low fee for certain fees

This commit is contained in:
Matias Alejo Garcia 2017-04-21 08:48:25 -03:00
parent 4fa427f2ab
commit 20fdeb9633
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
4 changed files with 29 additions and 4 deletions

View File

@ -0,0 +1,25 @@
'use strict';
angular.module('copayApp.directives')
/**
* Replaces img tag with its svg content to allow for CSS styling of the svg.
*/
.directive('noLowFee', function($log, $ionicHistory, configService, popupService) {
return {
restrict: 'A',
link: function(scope, elem, attrs, ctrl) {
elem.bind('click', function() {
configService.whenAvailable(function(config) {
if (config.wallet.settings.feeLevel.match(/conomy/)) {
$log.debug('Economy Fee setting... disabling link:' + elem.text());
popupService.showAlert('Low Fee Error', 'Please change your Bitcoin Network Fee Policy setting to Normal or higher to use this service', function() {
$ionicHistory.goBack();
});
}
});
});
}
}
});

View File

@ -15,7 +15,7 @@
</div>
<div class="integration-onboarding-description">Gift Cards are only redeemable on Amazon.com (US website). Cards never expire and can be redeemed towards millions of items.</div>
<div class="integration-onboarding-cta" ng-show="!showOauthForm">
<button class="button button-standard button-primary" ui-sref="tabs.giftcards.amazon.amount">Buy a Gift Card</button>
<button class="button button-standard button-primary" ui-sref="tabs.giftcards.amazon.amount" no-low-fee>Buy a Gift Card</button>
<button class="button button-standard button-secondary" ng-click="openExternalLink('https://www.amazon.com')">Visit Amazon.com &rarr;</button>
</div>
</div>
@ -33,7 +33,7 @@
<div class="m20t" ng-if="giftCards">
<div class="list card">
<a class="item item-icon-left item-icon-right" href
ui-sref="tabs.giftcards.amazon.amount">
ui-sref="tabs.giftcards.amazon.amount" no-low-fee>
<i class="icon ion-ios-pricetags-outline"></i>
Buy Gift Card
<i class="icon bp-arrow-right"></i>

View File

@ -23,7 +23,7 @@
<a class="button button-primary button-small m5t size-14"
style="padding: 0.5em 1em;"
ui-sref="tabs.bitpayCard.amount({nextStep: 'tabs.bitpayCard.topup'})">
ui-sref="tabs.bitpayCard.amount({nextStep: 'tabs.bitpayCard.topup'})" no-low-fee>
<i class="icon ion-plus m10r" style="vertical-align: baseline;"></i>
{{'Add Funds'|translate}}
</a>

View File

@ -75,7 +75,7 @@
</a>
<a class="item item-icon-right"
ng-show="account.status.userCanSell"
href ui-sref="tabs.buyandsell.glidera.amount({nextStep: 'tabs.buyandsell.glidera.sell', currency: currency})">
href ui-sref="tabs.buyandsell.glidera.amount({nextStep: 'tabs.buyandsell.glidera.sell', currency: currency})" no-low-fee>
<img src="img/sell-bitcoin.svg" alt="buy bitcoin" width="25" class="item-img-sell">
Sell Bitcoin
<span class="item-note" ng-show="account.price.sell">