Skip to content

Commit

Permalink
Names refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Jun 14, 2017
1 parent ee3d27f commit b9c0b92
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ div.dialog-delegate-registration(aria-label='Vote for delegates')
md-button.md-secondary(ng-disabled='loading', ng-click='cancel(delegateRegistrationForm)') {{ 'Cancel' }}
span(flex)
fee(data-fee='form.fee')
md-button.md-raised.md-primary.register-button(ng-disabled='!delegateRegistrationForm.$valid || loading || form.fee | notEnoughBalance', type='submit') {{ loading ? 'Registering...' : 'Register' }}
md-button.md-raised.md-primary.register-button(ng-disabled='!delegateRegistrationForm.$valid || loading || form.fee | fundsInsufficiency', type='submit') {{ loading ? 'Registering...' : 'Register' }}
6 changes: 3 additions & 3 deletions src/components/fee/fee.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ app.component('fee', {
controller: class fee {
constructor($scope, Account, lsk, $element) {
this.account = Account;
const notEnoughtLSK = lsk.normalize(this.account.get().balance) < this.fee;
const insufficientFunds = lsk.normalize(this.account.get().balance) < this.fee;

this.text = notEnoughtLSK ?
this.text = insufficientFunds ?
`Not enough LSK to pay ${this.fee} LSK fee` :
`Fee: ${this.fee} LSK`;

if (notEnoughtLSK) {
if (insufficientFunds) {
$element.addClass('error-message');
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/main/secondPass.pug
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ div.dialog-second(aria-label='Generate a second passphrase for your account', da
md-button.md-secondary(ng-disabled='$ctrl.loading', ng-click='cancel()') Cancel
span(flex)
fee(data-fee='$ctrl.fee')
md-button.md-raised.md-primary.submit-button.next-button(ng-click='$ctrl.step = 1', ng-disabled='$ctrl.fee | notEnoughBalance') Next
md-button.md-raised.md-primary.submit-button.next-button(ng-click='$ctrl.step = 1', ng-disabled='$ctrl.fee | fundsInsufficiency') Next
section(data-ng-if='$ctrl.step === 1')
passphrase(data-on-save='onSave', data-label='Register', data-fee='{{$ctrl.fee}}')
File renamed without changes.
2 changes: 1 addition & 1 deletion src/liskNano.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import './services/notification';

import './filters/lsk';
import './filters/liskNumber';
import './filters/notEnoughBalance';
import './filters/fundsInsufficiency';

import './run';
import './states';

0 comments on commit b9c0b92

Please sign in to comment.