@Override public ListenableFuture<ByteString> paymentIncrease(Coin by, Coin to, ByteString info) { log.info("Client {} paid increased payment by {} for a total of " + to.toString(), clientAddress, by); return null; }
public static String getBitcoinAmount(final String s) { String ret; BitcoinURI uri; try { uri = new BitcoinURI(s); if (uri.getAmount() != null) { ret = uri.getAmount().toString(); } else { ret = "0.0000"; } } catch (BitcoinURIParseException bupe) { ret = null; } return ret; }
BigInteger txOutputTotalNum = new BigInteger(txOutputTotal.toString()); txOutputTotalNum = txOutputTotalNum.multiply(new BigInteger(txOwnedInputsTotal.toString())); txOutputTotalNum = txOutputTotalNum.divide(new BigInteger(txInputsTotal.toString())); txOutputTotal = Coin.valueOf(txOutputTotalNum.longValue());
BigInteger txOutputTotalNum = new BigInteger(txOutputTotal.toString()); txOutputTotalNum = txOutputTotalNum.multiply(new BigInteger(txOwnedInputsTotal.toString())); txOutputTotalNum = txOutputTotalNum.divide(new BigInteger(txInputsTotal.toString())); txOutputTotal = Coin.valueOf(txOutputTotalNum.longValue());
BigInteger txOutputTotalNum = new BigInteger(txOutputTotal.toString()); txOutputTotalNum = txOutputTotalNum.multiply(new BigInteger(txOwnedInputsTotal.toString())); txOutputTotalNum = txOutputTotalNum.divide(new BigInteger(txInputsTotal.toString())); txOutputTotal = Coin.valueOf(txOutputTotalNum.longValue());
BigInteger txOutputTotalNum = new BigInteger(txOutputTotal.toString()); txOutputTotalNum = txOutputTotalNum.multiply(new BigInteger(txOwnedInputsTotal.toString())); txOutputTotalNum = txOutputTotalNum.divide(new BigInteger(txInputsTotal.toString())); txOutputTotal = Coin.valueOf(txOutputTotalNum.longValue());
@Test public void testGetRecommendedFee() throws Exception { System.out.println(bitcoinCryptoNoP.getRecommendedFee().toString()); }
log.debug("Adding a transaction output amount, total bitcoin is now {}", totalAmountIncludingTransactionAndClientFee.toString()); } else { log.debug("Skipping a transaction output as it is the change address"); log.debug("Added the transaction fee, bitcoin total is now {}", totalAmountIncludingTransactionAndClientFee.toString()); localAmount = BigDecimal.ZERO; log.debug("Total transaction bitcoin amount = {}, calculated fiat amount {}", totalAmountIncludingTransactionAndClientFee.toString(), localAmount.toString()); return true; } catch (ScriptException e) {
if (transactionData.getMiningFee() != null && transactionData.getMiningFee().isPresent()) { columns[10] = transactionData.getMiningFee().get().toString(); if (transactionData.getClientFee() != null && transactionData.getClientFee().isPresent()) { columns[11] = transactionData.getClientFee().get().toString();
/** * Handles a simple amount * * @throws BitcoinURIParseException * If something goes wrong */ @Test public void testGood_Amount() throws BitcoinURIParseException { // Test the decimal parsing testObject = new BitcoinURI(MAINNET, BITCOIN_SCHEME + ":" + MAINNET_GOOD_ADDRESS + "?amount=6543210.12345678"); assertEquals("654321012345678", testObject.getAmount().toString()); // Test the decimal parsing testObject = new BitcoinURI(MAINNET, BITCOIN_SCHEME + ":" + MAINNET_GOOD_ADDRESS + "?amount=.12345678"); assertEquals("12345678", testObject.getAmount().toString()); // Test the integer parsing testObject = new BitcoinURI(MAINNET, BITCOIN_SCHEME + ":" + MAINNET_GOOD_ADDRESS + "?amount=6543210"); assertEquals("654321000000000", testObject.getAmount().toString()); }
columns[11] = MBHDPaymentRequestData.getPaidAmountCoin() == null ? "" : MBHDPaymentRequestData.getPaidAmountCoin().toString();