Skip to content

Commit

Permalink
Merge pull request #84 from mysteriumnetwork/better-fee-error
Browse files Browse the repository at this point in the history
Add error message when transactor fee > promised amount
  • Loading branch information
chompomonim authored May 1, 2020
2 parents f5ef8b6 + 797df82 commit cc4b2c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contracts/AccountantImplementation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ contract AccountantImplementation is FundsRecovery {
// Calculate amount of tokens to be claimed.
uint256 _unpaidAmount = _amount.sub(_channel.settled);
require(_unpaidAmount > 0, "amount to settle should be greater that already settled");
require(_transactorFee <= _unpaidAmount, "transactor fee should be equal to or less than _unpaidAmount");

// If signer has less tokens than asked to transfer, we can transfer as much as he has already
// and rest tokens can be transferred via same promise but in another tx
Expand Down

0 comments on commit cc4b2c9

Please sign in to comment.