class OpenTipBotUserService {

    public void createNewOpenTipBotUser(OpenTipBotUser opentipbotUser) throws OpenTipBotServiceException {

        //generate new coin address and corresponding QR code pic
        opentipbotUser.setCoinAddress(bitcoinService.getNewAdress(opentipbotUser.getUserName()));
        opentipbotUser.setCoinAddressQRCode(bitcoinService.generateAdressQRCodeImage(opentipbotUser.getCoinAddress()));

        //check if user already has pending tips
        double pendingTips = bitcoinService.getPendingBalance(opentipbotUser.getUserName());
        if (pendingTips > 0){
            bitcoinService.sendTip(opentipbotUser.getUserName() + env.getProperty("opentipbot.bitcoin.pendingAccountSuffix"),
                    opentipbotUser.getUserName(), pendingTips);
        }
        //follow new user
        twitterTemplate.friendOperations().follow(opentipbotUser.getUserName());


        opentipbotUserRepository.save(opentipbotUser);
    }

}