class EthereumWalletService {

    public int getNumberOfConfirmations(String txHash) throws RuntimeException {
        StringValidator.requireNonBlank(txHash);
        int confirmations = -1;
        try {
            EthGetTransactionReceipt txResponse = web3j.ethGetTransactionReceipt(txHash).send();
            TransactionReceipt tx = getResultFrom(txResponse);
            if (tx != null) {
                BigInteger txBlockNumber = tx.getBlockNumber();
                EthBlockNumber blockNumberResponse = web3j.ethBlockNumber().send();
                String blockNumber = getResultFrom(blockNumberResponse);
                if (blockNumber != null) {
                    confirmations = Numeric.decodeQuantity(blockNumber).subtract(txBlockNumber).intValue();
                }
            }
        } catch (MessageDecodingException e) {
            log.warn(e.getMessage(), e, "txHash: " + txHash);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return confirmations;
    }

    @Inject public  EthereumWalletService(PropertiesHolder propertiesHolder, KeyStoreService keyStoreService, DexEthService dexEthService, UserErrorMessageDao userErrorMessageDao,
                                 DexBeanProducer dexBeanProducer);

}