From 6caa84481c32b4d5badcd0db23ce8ed363687d64 Mon Sep 17 00:00:00 2001 From: hvarona Date: Sat, 18 Aug 2018 01:18:59 -0400 Subject: [PATCH] Change Server to point to bitshares main net --- .../apigenerator/BitsharesFaucetApiGenerator.java | 4 +++- .../crystalwallet/apigenerator/GrapheneApiGenerator.java | 4 ++-- .../agorise/crystalwallet/application/CrystalApplication.java | 4 ++-- .../crystalwallet/application/constant/BitsharesConstant.java | 4 +++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/BitsharesFaucetApiGenerator.java b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/BitsharesFaucetApiGenerator.java index 8aa4b56..10c2465 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/BitsharesFaucetApiGenerator.java +++ b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/BitsharesFaucetApiGenerator.java @@ -7,6 +7,7 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; +import io.reactivex.Observable; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.logging.HttpLoggingInterceptor; @@ -217,8 +218,9 @@ public abstract class BitsharesFaucetApiGenerator { public interface IWebService { @Headers({"Content-Type: application/json"}) - @POST("/api/v1/accounts") + @POST("/faucet/api/v1/accounts") Call getReg(@Body Map params); + } public class RegisterAccountResponse { diff --git a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/GrapheneApiGenerator.java b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/GrapheneApiGenerator.java index f5db1bf..d1bfc00 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/GrapheneApiGenerator.java +++ b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/GrapheneApiGenerator.java @@ -583,7 +583,7 @@ public abstract class GrapheneApiGenerator { public void onError(BaseResponse.Error error) { request.getListener().fail(request.getId()); } - }), BitsharesConstant.EQUIVALENT_URL); //todo change equivalent url for current server url + }), CryptoNetManager.getURL(CryptoNet.BITSHARES)); //todo change equivalent url for current server url thread.start(); } @@ -599,7 +599,7 @@ public abstract class GrapheneApiGenerator { for (BitsharesAsset quoteAsset : quoteAssets) { WebSocketThread thread = new WebSocketThread(new GetLimitOrders(baseAsset.getBitsharesId(), quoteAsset.getBitsharesId(), 10, new EquivalentValueListener(baseAsset, - quoteAsset, context)), BitsharesConstant.EQUIVALENT_URL); //todo change equivalent url for current server url + quoteAsset, context)), CryptoNetManager.getURL(CryptoNet.BITSHARES)); //todo change equivalent url for current server url thread.start(); } } diff --git a/app/src/main/java/cy/agorise/crystalwallet/application/CrystalApplication.java b/app/src/main/java/cy/agorise/crystalwallet/application/CrystalApplication.java index 238c515..b7776d1 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/application/CrystalApplication.java +++ b/app/src/main/java/cy/agorise/crystalwallet/application/CrystalApplication.java @@ -60,7 +60,7 @@ public class CrystalApplication extends Application { SqlScoutServer.create(this, getPackageName()); //Using Bitshares Agorise Testnet - CryptoNetManager.addCryptoNetURL(CryptoNet.BITSHARES,BITSHARES_TESTNET_URL); + //CryptoNetManager.addCryptoNetURL(CryptoNet.BITSHARES,BITSHARES_TESTNET_URL); //This is for testing the equivalent values on the testnet TODO remove if(db.bitsharesAssetDao().getBitsharesAssetInfoById(bitEURAsset.getBitsharesId())== null){ @@ -91,7 +91,7 @@ public class CrystalApplication extends Application { CryptoNetEvents.getInstance().addListener(crystalWalletNotifier); //Next line is for use the bitshares main net - //CryptoNetManager.addCryptoNetURL(CryptoNet.BITSHARES,BITSHARES_URL); + CryptoNetManager.addCryptoNetURL(CryptoNet.BITSHARES,BITSHARES_URL); GeneralSetting generalSettingPreferredLanguage = db.generalSettingDao().getSettingByName(GeneralSetting.SETTING_NAME_PREFERRED_LANGUAGE); diff --git a/app/src/main/java/cy/agorise/crystalwallet/application/constant/BitsharesConstant.java b/app/src/main/java/cy/agorise/crystalwallet/application/constant/BitsharesConstant.java index 9021c2f..0b807fa 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/application/constant/BitsharesConstant.java +++ b/app/src/main/java/cy/agorise/crystalwallet/application/constant/BitsharesConstant.java @@ -30,7 +30,9 @@ public abstract class BitsharesConstant { "http://185.208.208.147:11012", // Openledger node }; - public final static String FAUCET_URL = "http://185.208.208.147:5010"; + //testnet faucet + //public final static String FAUCET_URL = "http://185.208.208.147:5010"; + public final static String FAUCET_URL = "https://de.palmpay.io"; public final static String EQUIVALENT_URL = "wss://bitshares.openledger.info/ws"; public final static BitsharesAsset[] SMARTCOINS = new BitsharesAsset[]{