Set fees in preferences. First step for advanced send

This commit is contained in:
Gustavo Maximiliano Cortez 2015-07-28 10:42:11 -03:00
commit e7a98d44f9
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
10 changed files with 82 additions and 64 deletions

View file

@ -6,7 +6,7 @@
</section>
<section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-style="{'color':color}" translate>
Bitcoin Network Fee Policy
Advanced Send
</h1>
</section>
</nav>
@ -14,12 +14,9 @@
<div class="modal-content fix-modals-touch">
<ul class="no-bullet m0 size-14">
<h4 class="title m0" translate>Fee level</h4>
<h4 class="title m0" translate>Fee Policy</h4>
<li ng-repeat="fee in (network == 'livenet' ? feeLevels.livenet : feeLevels.testnet)" ng-click="save(fee.level)" class="line-b p20">
<span ng-show="fee.level == 'priority'" translate>Priority</span>
<span ng-show="fee.level == 'normal'" translate>Normal</span>
<span ng-show="fee.level == 'economy'" translate>Economy</span>
<span class="size-12 text-light" translate>{{fee.feePerKBUnit}} per kB</span>
<span class="text-capitalize">{{fee.level|translate}}</span>
<i class="fi-check size-16 right" ng-show="currentFeeLevel == fee.level"></i>
</li>
</ul>
@ -27,13 +24,8 @@
<div class="row column m20t">
<div class="text-gray size-12 text-center" ng-repeat="fee in (network == 'livenet' ? feeLevels.livenet :
feeLevels.testnet)" ng-if="fee.level == currentFeeLevel">
<span translate>Average confirmation time: {{fee.nbBlocks * 10}} minutes</span>
</div>
</div>
<div class="row column m20t">
<div class="text-gray size-12 text-center" translate>
Bitcoin transactions may include a fee collected by miners on the network. The higher the fee, the greater the incentive a miner has to include that transaction in a block.
<span translate>Average confirmation time: {{fee.nbBlocks * 10}} minutes</span>.
<span class="size-12 text-light" translate>Current fee rate for this policy: {{fee.feePerKBUnit}}/kiB</span>
</div>
</div>

View file

@ -77,8 +77,13 @@
{{preferences.selectedAlternative.name}}
</span>
</li>
<li class="line-b p20" ng-click="$root.go('preferencesFee')">
<span translate>Bitcoin Network Fee Policy</span>
<span class="right text-gray">
<i class="icon-arrow-right3 size-24 right"></i>
<span class="text-capitalize">{{index.currentFeeLevel}}</span>
</span>
</li>
<li class="line-b p20" ng-click="$root.go('preferencesBwsUrl')">
<span>Bitcore Wallet Service</span>
<span class="text-gray db">

View file

@ -0,0 +1,30 @@
<div
class="topbar-container"
ng-include="'views/includes/topbar.html'"
ng-init="titleSection='Bitcoin Network Fee Policy'; goBackToState = 'preferences'; noColor = true">
</div>
<div class="content preferences" ng-controller="preferencesFeeController as prefFee">
<ul class="no-bullet m0 size-14">
<li ng-repeat="fee in (index.network == 'livenet' ? index.feeLevels.livenet : index.feeLevels.testnet)"
ng-click="prefFee.save(fee.level)" class="line-b p20">
<span class="text-capitalize">{{fee.level}}</span>
<i class="fi-check size-16 right" ng-show="index.currentFeeLevel == fee.level"></i>
</li>
</ul>
<div class="row column m20t">
<div class="text-gray size-12 text-center" ng-repeat="fee in (index.network == 'livenet' ? index.feeLevels.livenet :
index.feeLevels.testnet)" ng-if="fee.level == index.currentFeeLevel">
<span translate>Average confirmation time: {{fee.nbBlocks * 10}} minutes</span>.
<span class="size-12 text-light" translate>Current fee rate for this policy: {{fee.feePerKBUnit}}/kiB</span>
</div>
</div>
<div class="row column m20t">
<div class="text-gray size-12 text-center" translate>
Bitcoin transactions may include a fee collected by miners on the network. The higher the fee, the greater the incentive a miner has to include that transaction in a block. Actual fees are determined based on network load and the selected policy.
</div>
</div>
</div>
<div class="extra-margin-bottom"></div>

View file

@ -398,16 +398,6 @@
</div>
</div>
</div>
<div class="text-right size-12 m20b" ng-if="index.feeLevels.livenet && index.feeLevels.testnet">
<span ng-repeat="fee in (index.network == 'livenet' ? index.feeLevels.livenet : index.feeLevels.testnet)"
ng-show="index.currentFeeLevel == fee.level" class="pointer" ng-click="home.openFeeLevelsModal(index.feeLevels, index.currentFeeLevel)">
<span translate>Fee level: {{fee.level}}</span>
<span class="text-gray">({{fee.feePerKBUnit}}/KB)</span>
<i class="fi-pencil"></i>
</span>
</div>
<div class="row">
<div class="large-12 columns">
<label for="comment"><span translate>Note</span>