Fix Aplication url verification
This commit is contained in:
parent
272843843c
commit
c08ba24d32
3 changed files with 10 additions and 1 deletions
|
@ -91,7 +91,7 @@ public class CrystalApplication extends Application {
|
|||
//Next line is for use the bitshares main net
|
||||
// TODO fix, the following line accepts one string not an array it needs to accept an arrey
|
||||
// TODO and hoop over the urls if no connection can be established
|
||||
CryptoNetManager.addCryptoNetURL(CryptoNet.BITSHARES,BITSHARES_URL[2]);
|
||||
CryptoNetManager.addCryptoNetURL(CryptoNet.BITSHARES,BITSHARES_URL);
|
||||
|
||||
GeneralSetting generalSettingPreferredLanguage = db.generalSettingDao().getSettingByName(GeneralSetting.SETTING_NAME_PREFERRED_LANGUAGE);
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ public class BitsharesCryptoNetVerifier extends CryptoNetVerifier {
|
|||
@Override
|
||||
public void onError(BaseResponse.Error error) {
|
||||
//TODO handle error
|
||||
System.out.println("Bad server response " + url);
|
||||
}
|
||||
}),url);
|
||||
thread.start();
|
||||
|
|
|
@ -47,6 +47,14 @@ public abstract class CryptoNetManager {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public static void addCryptoNetUrls(CryptoNet crypto, String[] urls){
|
||||
for(String url: urls){
|
||||
addCryptoNetURL(crypto,url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void addCryptoNetURL(CryptoNet crypto, String url){
|
||||
if(!CryptoNetURLs.containsKey(crypto)){
|
||||
CryptoNetURLs.put(crypto,new HashSet<String>());
|
||||
|
|
Loading…
Reference in a new issue