Skip to content

Commit

Permalink
feat(Release): Change those based on pre-demo
Browse files Browse the repository at this point in the history
  • Loading branch information
W3-Mimo committed Apr 3, 2020
1 parent 130d8fa commit 3ce5c0f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public interface PayLibConstant {
interface END_POINT_TYPE {
int ETH_ROPSTEN = 1;
int ETC_KOTTI = 2;
int TETH_PRIVATE = 5;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void setEndPointMode(int mode) {
}

public int getEndpointMode() {
return readInt(ENDPOINT_MODE, PayLibConstant.END_POINT_TYPE.ETC_KOTTI);
return readInt(ENDPOINT_MODE, PayLibConstant.END_POINT_TYPE.TETH_PRIVATE);
}

}
14 changes: 9 additions & 5 deletions viper/src/main/java/com/w3engineers/mesh/util/Util.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
package com.w3engineers.mesh.util;

import android.content.Context;
import android.text.TextUtils;

import com.w3engineers.eth.data.constant.PayLibConstant;
import com.w3engineers.eth.data.helper.PreferencesHelperPaylib;
import com.w3engineers.mesh.R;
import com.w3engineers.mesh.application.data.local.db.DatabaseService;
import com.w3engineers.mesh.application.data.local.db.message.Message;
import com.w3engineers.mesh.application.data.local.purchase.PurchaseConstants;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.IOException;
import java.util.Locale;
import java.util.concurrent.ExecutionException;

public class Util {

Expand Down Expand Up @@ -193,7 +189,15 @@ public static String getCurrencyTypeMessage(String message) {

public static String getEndPointCurrency() {
int endPoint = PreferencesHelperPaylib.onInstance(MeshApp.getContext()).getEndpointMode();
return endPoint == PayLibConstant.END_POINT_TYPE.ETH_ROPSTEN ? MeshApp.getContext().getString(R.string.eth) : MeshApp.getContext().getString(R.string.etc);
if (endPoint == PayLibConstant.END_POINT_TYPE.ETH_ROPSTEN) {
return MeshApp.getContext().getString(com.w3engineers.mesh.R.string.eth);
} else if (endPoint == PayLibConstant.END_POINT_TYPE.ETC_KOTTI) {
return MeshApp.getContext().getString(com.w3engineers.mesh.R.string.etc);
} else if (endPoint == PayLibConstant.END_POINT_TYPE.TETH_PRIVATE) {
return MeshApp.getContext().getString(com.w3engineers.mesh.R.string.teth);
} else {
return MeshApp.getContext().getString(com.w3engineers.mesh.R.string.teth);
}
}

public static void isConnected(ConnectionCheck connectionCheck) {
Expand Down
1 change: 1 addition & 0 deletions viper/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<string name="my_node">My node</string>
<string name="eth">ETH</string>
<string name="etc">ETC</string>
<string name="teth">TETH</string>

<string name="different_network_data_for_seller">You have earning in different network.</string>
<string name="different_network_data_for_buyer">You have purchase in different network.</string>
Expand Down

0 comments on commit 3ce5c0f

Please sign in to comment.