tools/setup/branded_token/mint.js
function() {
    const oThis = this
      , web3UcProvider = web3ProviderFactory.getProvider('utility', 'ws')
    ;

    return new Promise(async function(onResolve, onReject) {

      const beforeBalance = new BigNumber(await web3UcProvider.eth.getBalance(oThis.reserveAddr));

      logger.info('Balance of Reserve for Simple Token Prime before mint:', beforeBalance.toString(10));

      const getBalance = async function(){

        const afterBalance = new BigNumber(await web3UcProvider.eth.getBalance(oThis.reserveAddr));

        if((new BigNumber(afterBalance)).greaterThan(beforeBalance)){
          logger.info('Balance of Reserve for Simple Token Prime after mint:', afterBalance.toString(10));
          return onResolve();
        } else {
          setTimeout(getBalance, 5000);
        }
      };

      getBalance();
    });
  }
function() {
    const oThis = this
      , web3UcProvider = web3ProviderFactory.getProvider('utility', 'ws')
    ;

    return new Promise(async function(onResolve, onReject) {

      const beforeBalance = new BigNumber(await web3UcProvider.eth.getBalance(oThis.reserveAddr));

      logger.info('Balance of Reserve for Simple Token Prime before mint:', beforeBalance.toString(10));

      const getBalance = async function(){

        const afterBalance = new BigNumber(await web3UcProvider.eth.getBalance(oThis.reserveAddr));

        if((new BigNumber(afterBalance)).greaterThan(beforeBalance)){
          logger.info('Balance of Reserve for Simple Token Prime after mint:', afterBalance.toString(10));
          return onResolve();
        } else {
          setTimeout(getBalance, 5000);
        }
      };

      getBalance();
    });
  }
function ( ) { const oThis = this , web3UcProvider = web3ProviderFactory . getProvider ( 'utility' , 'ws' ) ; return new Promise ( async function ( onResolve , onReject ) { const beforeBalance = new BigNumber ( await web3UcProvider . eth . getBalance ( oThis . reserveAddr ) ) ; logger . info ( 'Balance of Reserve for Simple Token Prime before mint:' , beforeBalance . toString ( 10 ) ) ; const getBalance = async function ( ) { const afterBalance = new BigNumber ( await web3UcProvider . eth . getBalance ( oThis . reserveAddr ) ) ; if ( ( new BigNumber ( afterBalance ) ) . greaterThan ( beforeBalance ) ) { logger . info ( 'Balance of Reserve for Simple Token Prime after mint:' , afterBalance . toString ( 10 ) ) ; return onResolve ( ) ; } else { setTimeout ( getBalance , 5000 ) ; } } ; getBalance ( ) ; } ) ; }
Wait for Simple Token Prime mint

@return {promise}
@private
Wait for Simple Token Prime mint