@@ -462,7 +462,6 @@ async function runTransferCommand(command, state) {
462
462
463
463
assert . equal ( false , shouldThrow , 'transfer should have thrown but it did not' ) ;
464
464
465
- // TODO: take spent gas into account?
466
465
state . balances [ command . fromAccount ] = fromBalance . minus ( lifWei ) ;
467
466
state . balances [ command . toAccount ] = getBalance ( state , command . toAccount ) . plus ( lifWei ) ;
468
467
state = decreaseEthBalance ( state , command . fromAccount , help . txGasCost ( tx ) ) ;
@@ -500,7 +499,6 @@ async function runApproveCommand(command, state) {
500
499
501
500
assert . equal ( false , shouldThrow , 'approve should have thrown but it did not' ) ;
502
501
503
- // TODO: take spent gas into account?
504
502
setAllowance ( state , command . fromAccount , command . spenderAccount , lifWei ) ;
505
503
state = decreaseEthBalance ( state , command . fromAccount , help . txGasCost ( tx ) ) ;
506
504
} catch ( e ) {
@@ -530,7 +528,6 @@ async function runTransferFromCommand(command, state) {
530
528
531
529
assert . equal ( false , shouldThrow , 'transferFrom should have thrown but it did not' ) ;
532
530
533
- // TODO: take spent gas into account?
534
531
state . balances [ command . fromAccount ] = fromBalance . minus ( lifWei ) ;
535
532
state . balances [ command . toAccount ] = getBalance ( state , command . toAccount ) . plus ( lifWei ) ;
536
533
setAllowance ( state , command . senderAccount , command . fromAccount , allowance . minus ( lifWei ) ) ;
@@ -735,8 +732,8 @@ let getMVMMaxClaimableWei = function(state) {
735
732
}
736
733
} ;
737
734
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 ;
740
737
741
738
async function runMVMClaimWeiCommand ( command , state ) {
742
739
if ( state . MVM !== undefined ) {
0 commit comments