From cf20525bd589f58a8e9821ab9c784aaa4cb925c4 Mon Sep 17 00:00:00 2001 From: pokkst Date: Tue, 18 Aug 2020 18:07:07 -0500 Subject: [PATCH] Ensure HTTPS for rest.bitcoin.com --- core/src/main/java/org/bitcoinj/kits/BIP47AppKit.java | 4 ++-- core/src/main/java/org/bitcoinj/kits/SlpBIP47AppKit.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/kits/BIP47AppKit.java b/core/src/main/java/org/bitcoinj/kits/BIP47AppKit.java index 15b3697e485..a393018bcde 100644 --- a/core/src/main/java/org/bitcoinj/kits/BIP47AppKit.java +++ b/core/src/main/java/org/bitcoinj/kits/BIP47AppKit.java @@ -183,7 +183,7 @@ private void grabNotificationAddressUtxos(final String cashAddr) { @Override public void run() { ArrayList txids = new ArrayList(); - String apiUrl = "http://rest.bitcoin.com/v2/address/utxo/" + cashAddr; + String apiUrl = "https://rest.bitcoin.com/v2/address/utxo/" + cashAddr; JSONObject utxosJson = getJSONObject(apiUrl); try { JSONArray utxos = utxosJson.getJSONArray("utxos"); @@ -204,7 +204,7 @@ public void run() { } private void grabTransactionAndProcessNotificationTransaction(String txid) { - String url = "http://rest.bitcoin.com/v2/rawtransactions/getRawTransaction/" + txid + "?verbose=true"; + String url = "https://rest.bitcoin.com/v2/rawtransactions/getRawTransaction/" + txid + "?verbose=true"; JSONObject txJson = getJSONObject(url); if(txJson != null) { diff --git a/core/src/main/java/org/bitcoinj/kits/SlpBIP47AppKit.java b/core/src/main/java/org/bitcoinj/kits/SlpBIP47AppKit.java index f04270ca8c2..c485b8938c8 100644 --- a/core/src/main/java/org/bitcoinj/kits/SlpBIP47AppKit.java +++ b/core/src/main/java/org/bitcoinj/kits/SlpBIP47AppKit.java @@ -543,7 +543,7 @@ private void grabNotificationAddressUtxos(final String cashAddr) { @Override public void run() { ArrayList txids = new ArrayList(); - String apiUrl = "http://rest.bitcoin.com/v2/address/utxo/" + cashAddr; + String apiUrl = "https://rest.bitcoin.com/v2/address/utxo/" + cashAddr; JSONObject utxosJson = getJSONObject(apiUrl); try { JSONArray utxos = utxosJson.getJSONArray("utxos"); @@ -564,7 +564,7 @@ public void run() { } private void grabTransactionAndProcessNotificationTransaction(String txid) { - String url = "http://rest.bitcoin.com/v2/rawtransactions/getRawTransaction/" + txid + "?verbose=true"; + String url = "https://rest.bitcoin.com/v2/rawtransactions/getRawTransaction/" + txid + "?verbose=true"; JSONObject txJson = getJSONObject(url); if(txJson != null) {