tools/setup/simple_token_prime/mint.js
function() {
    return new Promise(function(onResolve, onReject) {

      const getBalance = async function(){

        const getSTPBalanceResponse = await fundManager.getSTPrimeBalanceOf(utilityChainOwnerAddr);

        if(getSTPBalanceResponse.isSuccess() && (new BigNumber(getSTPBalanceResponse.data.balance)).greaterThan(0)){
          logger.info('* ST\' credited to utility chain owner');
          return onResolve(getSTPBalanceResponse);
        } else {
          logger.info('* Waiting for credit of ST\' to utility chain owner');
          setTimeout(getBalance, 60000);
        }
      };

      getBalance();
    });
  }
function() {
    return new Promise(function(onResolve, onReject) {

      const getBalance = async function(){

        const getSTPBalanceResponse = await fundManager.getSTPrimeBalanceOf(utilityChainOwnerAddr);

        if(getSTPBalanceResponse.isSuccess() && (new BigNumber(getSTPBalanceResponse.data.balance)).greaterThan(0)){
          logger.info('* ST\' credited to utility chain owner');
          return onResolve(getSTPBalanceResponse);
        } else {
          logger.info('* Waiting for credit of ST\' to utility chain owner');
          setTimeout(getBalance, 60000);
        }
      };

      getBalance();
    });
  }
function ( ) { return new Promise ( function ( onResolve , onReject ) { const getBalance = async function ( ) { const getSTPBalanceResponse = await fundManager . getSTPrimeBalanceOf ( utilityChainOwnerAddr ) ; if ( getSTPBalanceResponse . isSuccess ( ) && ( new BigNumber ( getSTPBalanceResponse . data . balance ) ) . greaterThan ( 0 ) ) { logger . info ( '* ST\' credited to utility chain owner' ) ; return onResolve ( getSTPBalanceResponse ) ; } else { logger . info ( '* Waiting for credit of ST\' to utility chain owner' ) ; setTimeout ( getBalance , 60000 ) ; } } ; getBalance ( ) ; } ) ; }
Wait for ST Prime mint

@return {promise}
@private
Wait for ST Prime mint