@@ -375,7 +375,7 @@ async function runFinalizeCrowdsaleCommand (command, state) {
375
375
async function runAddPrivatePresalePaymentCommand ( command , state ) {
376
376
let { startTimestamp } = state . crowdsaleData ,
377
377
nextTimestamp = latestTime ( ) ,
378
- weiToSend = web3 . toWei ( command . eth , 'ether' ) ,
378
+ weiSent = web3 . toWei ( command . eth , 'ether' ) ,
379
379
account = gen . getAccount ( command . fromAccount ) ,
380
380
beneficiary = gen . getAccount ( command . beneficiaryAccount ) ,
381
381
hasZeroAddress = _ . some ( [ account , beneficiary ] , isZeroAddress ) ;
@@ -385,20 +385,20 @@ async function runAddPrivatePresalePaymentCommand (command, state) {
385
385
( account !== gen . getAccount ( state . owner ) ) ||
386
386
( state . crowdsaleFinalized ) ||
387
387
hasZeroAddress ||
388
- ( weiToSend === 0 ) ||
388
+ ( weiSent === 0 ) ||
389
389
( command . rate <= state . crowdsaleData . rate1 ) ;
390
390
391
391
try {
392
392
help . debug ( 'Adding presale private tokens for account:' , command . beneficiaryAccount , 'eth:' , command . eth , 'fromAccount:' , command . fromAccount , 'blockTimestamp:' , nextTimestamp ) ;
393
393
394
- const tx = await state . crowdsaleContract . addPrivatePresaleTokens ( beneficiary , weiToSend , command . rate , { from : account } ) ;
394
+ const tx = await state . crowdsaleContract . addPrivatePresaleTokens ( beneficiary , weiSent , command . rate , { from : account } ) ;
395
395
396
396
assert . equal ( false , shouldThrow , 'buyTokens should have thrown but it did not' ) ;
397
397
398
- state . totalSupply = state . totalSupply . plus ( weiToSend * command . rate ) ;
399
- state . totalPresaleWei = state . totalPresaleWei . plus ( weiToSend ) ;
398
+ state . totalSupply = state . totalSupply . plus ( weiSent * command . rate ) ;
399
+ state . weiRaised = state . weiRaised . plus ( weiSent ) ;
400
400
state . presalePurchases = _ . concat ( state . presalePurchases ,
401
- { rate : command . rate , wei : weiToSend , beneficiary : command . beneficiary , account : command . fromAccount }
401
+ { rate : command . rate , wei : weiSent , beneficiary : command . beneficiary , account : command . fromAccount }
402
402
) ;
403
403
state = decreaseEthBalance ( state , command . fromAccount , help . txGasCost ( tx ) ) ;
404
404
} catch ( e ) {
0 commit comments