Change the insight serverUrl, to make it not a constant but selected by the app

master
hvarona 2018-09-05 23:45:03 -04:00
parent 8cfbb63f1c
commit e6350396be
1 changed files with 4 additions and 1 deletions

View File

@ -43,6 +43,8 @@ public class AccountActivityWatcher {
*/ */
private final Context mContext; private final Context mContext;
private final String mServerUrl;
/** /**
* Handles the address/transaction notification. * Handles the address/transaction notification.
* Then calls the GetTransactionData to get the info of the new transaction * Then calls the GetTransactionData to get the info of the new transaction
@ -53,7 +55,7 @@ public class AccountActivityWatcher {
try { try {
System.out.println("Receive accountActivtyWatcher " + os[0].toString() ); System.out.println("Receive accountActivtyWatcher " + os[0].toString() );
String txid = ((JSONObject) os[0]).getString(InsightApiConstants.sTxTag); String txid = ((JSONObject) os[0]).getString(InsightApiConstants.sTxTag);
new GetTransactionData(txid, mAccount, mContext).start(); new GetTransactionData(txid, mAccount, mServerUrl, mContext).start();
} catch (JSONException ex) { } catch (JSONException ex) {
Logger.getLogger(AccountActivityWatcher.class.getName()).log(Level.SEVERE, null, ex); Logger.getLogger(AccountActivityWatcher.class.getName()).log(Level.SEVERE, null, ex);
} }
@ -107,6 +109,7 @@ public class AccountActivityWatcher {
* @param mContext This app mContext * @param mContext This app mContext
*/ */
public AccountActivityWatcher(String serverUrl, GeneralCoinAccount mAccount, Context mContext) { public AccountActivityWatcher(String serverUrl, GeneralCoinAccount mAccount, Context mContext) {
this.mServerUrl = serverUrl;
this.mAccount = mAccount; this.mAccount = mAccount;
this.mContext = mContext; this.mContext = mContext;
try { try {