From baeaa2d8d0dda70ebf28d9a5944b8219cabd0ff0 Mon Sep 17 00:00:00 2001 From: hvarona Date: Thu, 6 Sep 2018 21:44:07 -0400 Subject: [PATCH] Change the insight serverUrl, to make it not a constant but selected by the app --- .../apigenerator/insightapi/BroadcastTransaction.java | 5 ++++- .../apigenerator/insightapi/GetTransactionByAddress.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/BroadcastTransaction.java b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/BroadcastTransaction.java index d2b44a9..1736b6a 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/BroadcastTransaction.java +++ b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/BroadcastTransaction.java @@ -31,6 +31,8 @@ public class BroadcastTransaction extends Thread implements Callback { */ private GeneralCoinAccount mAccount; + private String serverUrl; + /** * Basic Consturctor * @param RawTx The RawTX in Hex String @@ -38,6 +40,7 @@ public class BroadcastTransaction extends Thread implements Callback { * @param context This app context */ public BroadcastTransaction(String RawTx, GeneralCoinAccount account, String serverUrl, Context context){ + this.serverUrl = serverUrl; this.mServiceGenerator = new InsightApiServiceGenerator(serverUrl); this.mContext = context; this.mRawTx = RawTx; @@ -53,7 +56,7 @@ public class BroadcastTransaction extends Thread implements Callback { if (response.isSuccessful()) { //TODO invalidated send //TODO call getTransactionData - GetTransactionData trData = new GetTransactionData(response.body().txid,this.mAccount,this.mContext); + GetTransactionData trData = new GetTransactionData(response.body().txid,this.mAccount, this.serverUrl, this.mContext); trData.start(); } else { System.out.println("SENDTEST: not succesful " + response.message()); diff --git a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/GetTransactionByAddress.java b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/GetTransactionByAddress.java index 71ee3a4..8d92b39 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/GetTransactionByAddress.java +++ b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/GetTransactionByAddress.java @@ -42,6 +42,8 @@ public class GetTransactionByAddress extends Thread implements Callback