Skip to content

Commit fee0c9b

Browse files
committed
Remove TODO: Add isMVMFinished test predicate
1 parent 90442f1 commit fee0c9b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/commands.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ async function runTransferCommand(command, state) {
462462

463463
assert.equal(false, shouldThrow, 'transfer should have thrown but it did not');
464464

465-
// TODO: take spent gas into account?
466465
state.balances[command.fromAccount] = fromBalance.minus(lifWei);
467466
state.balances[command.toAccount] = getBalance(state, command.toAccount).plus(lifWei);
468467
state = decreaseEthBalance(state, command.fromAccount, help.txGasCost(tx));
@@ -500,7 +499,6 @@ async function runApproveCommand(command, state) {
500499

501500
assert.equal(false, shouldThrow, 'approve should have thrown but it did not');
502501

503-
// TODO: take spent gas into account?
504502
setAllowance(state, command.fromAccount, command.spenderAccount, lifWei);
505503
state = decreaseEthBalance(state, command.fromAccount, help.txGasCost(tx));
506504
} catch(e) {
@@ -530,7 +528,6 @@ async function runTransferFromCommand(command, state) {
530528

531529
assert.equal(false, shouldThrow, 'transferFrom should have thrown but it did not');
532530

533-
// TODO: take spent gas into account?
534531
state.balances[command.fromAccount] = fromBalance.minus(lifWei);
535532
state.balances[command.toAccount] = getBalance(state, command.toAccount).plus(lifWei);
536533
setAllowance(state, command.senderAccount, command.fromAccount, allowance.minus(lifWei));
@@ -735,8 +732,8 @@ let getMVMMaxClaimableWei = function(state) {
735732
}
736733
};
737734

738-
// TODO: implement finished, returns false, but references state to make eslint happy
739-
let isMVMFinished = (state) => state && false;
735+
let isMVMFinished = (state) => state.MVM !== undefined &&
736+
state.MVMMonth >= state.MVMPeriods;
740737

741738
async function runMVMClaimWeiCommand(command, state) {
742739
if (state.MVM !== undefined) {

0 commit comments

Comments
 (0)