Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Commit 9f684ba

Browse files
authored
Merge pull request #53 from kinecosystem/update_migration_module_version_to_1.0.2
Update migration module version
2 parents 7d56d58 + 615d0aa commit 9f684ba

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

kin-devplatform-sdk/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ android {
1919
dependencies {
2020

2121
implementation project(':kin-devplatform-core')
22-
implementation 'com.github.kinecosystem:kin-migration-module-android:1.0.1'
22+
implementation 'com.github.kinecosystem:kin-migration-module-android:1.0.2'
2323
implementation 'com.github.kinecosystem.kin-ecosystem-android-sdk:recovery:d73ef56'
2424
api 'com.github.kinecosystem:kin-utils-android:1.1'
2525
implementation devDependencies.appCompat_v7

kin-devplatform-sdk/src/main/java/kin/devplatform/ConfigurationLocal.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class ConfigurationLocal implements Configuration.Local {
1616
private static final String NEW_BLOCKCHAIN_NETWORK_URL_KEY = "new_blockchain_network_url";
1717
private static final String NEW_BLOCKCHAIN_PASSPHRASE_KEY = "new_blockchain_passphrase";
1818
private static final String OLD_BLOCKCHAIN_ISSUER_KEY = "old_blockchain_issuer";
19+
private static final String MIGRATION_SERVICE_URL_KEY = "migration_service_url";
1920
private static final String ECOSYSTEM_SERVER_URL_KEY = "ecosystem_server_url";
2021
private static final String ECOSYSTEM_WEB_FRONT_URL_KEY = "ecosystem_web_front_url";
2122
private static final String BI_URL_KEY = "bi_url";
@@ -47,6 +48,7 @@ public KinEnvironment getEnvironment() {
4748
final String newBlockchainNetworkUrl = configurationSharedPreferences.getString(NEW_BLOCKCHAIN_NETWORK_URL_KEY, null);
4849
final String newBlockchainPassphrase = configurationSharedPreferences.getString(NEW_BLOCKCHAIN_PASSPHRASE_KEY, null);
4950
final String issuer = configurationSharedPreferences.getString(OLD_BLOCKCHAIN_ISSUER_KEY, null);
51+
final String migrationServiceUrl = configurationSharedPreferences.getString(MIGRATION_SERVICE_URL_KEY, null);
5052
final String ecosystemServerUrl = configurationSharedPreferences.getString(ECOSYSTEM_SERVER_URL_KEY, null);
5153
final String ecosystemWebFrontUrl = configurationSharedPreferences.getString(ECOSYSTEM_WEB_FRONT_URL_KEY, null);
5254
final String biUrl = configurationSharedPreferences.getString(BI_URL_KEY, null);
@@ -55,7 +57,7 @@ public KinEnvironment getEnvironment() {
5557
return null;
5658
} else {
5759
return new Environment(oldBlockchainNetworkUrl, oldBlockchainPassphrase, newBlockchainNetworkUrl, newBlockchainPassphrase,
58-
issuer, ecosystemServerUrl, ecosystemWebFrontUrl, biUrl);
60+
issuer, migrationServiceUrl, ecosystemServerUrl, ecosystemWebFrontUrl, biUrl);
5961
}
6062

6163
}
@@ -68,6 +70,7 @@ public void setEnvironment(@NonNull KinEnvironment kinEnvironment) {
6870
editor.putString(NEW_BLOCKCHAIN_NETWORK_URL_KEY, kinEnvironment.getNewBlockchainNetworkUrl());
6971
editor.putString(NEW_BLOCKCHAIN_PASSPHRASE_KEY, kinEnvironment.getNewBlockchainPassphrase());
7072
editor.putString(OLD_BLOCKCHAIN_ISSUER_KEY, kinEnvironment.getOldBlockchainIssuer());
73+
editor.putString(MIGRATION_SERVICE_URL_KEY, kinEnvironment.getMigrationServiceUrl());
7174
editor.putString(ECOSYSTEM_SERVER_URL_KEY, kinEnvironment.getEcosystemServerUrl());
7275
editor.putString(ECOSYSTEM_WEB_FRONT_URL_KEY, kinEnvironment.getEcosystemWebFront());
7376
editor.putString(BI_URL_KEY, kinEnvironment.getBiUrl());

kin-devplatform-sdk/src/main/java/kin/devplatform/Environment.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,21 @@ public class Environment implements KinEnvironment {
1010
private final String oldBlockchainPassphrase;
1111
private final String newBlockchainPassphrase;
1212
private final String issuer;
13+
private final String migrationServiceUrl;
1314
private final String ecosystemServerUrl;
1415
private final String ecosystemWebFront;
1516
private final String biUrl;
1617

1718
public Environment(String oldBlockchainNetworkUrl, String oldBlockchainPassphrase, String newBlockchainNetworkUrl,
18-
String newBlockchainPassphrase, String oldBlockchainIssuer, String ecosystemServerUrl, String ecosystemWebFront,
19+
String newBlockchainPassphrase, String oldBlockchainIssuer, String migrationServiceUrl,
20+
String ecosystemServerUrl, String ecosystemWebFront,
1921
String biUrl) {
2022
this.oldBlockchainNetworkUrl = oldBlockchainNetworkUrl;
2123
this.newBlockchainNetworkUrl = newBlockchainNetworkUrl;
2224
this.oldBlockchainPassphrase = oldBlockchainPassphrase;
2325
this.newBlockchainPassphrase = newBlockchainPassphrase;
2426
this.issuer = oldBlockchainIssuer;
27+
this.migrationServiceUrl = migrationServiceUrl;
2528
this.ecosystemServerUrl = ecosystemServerUrl;
2629
this.ecosystemWebFront = ecosystemWebFront;
2730
this.biUrl = biUrl;
@@ -52,6 +55,11 @@ public String getOldBlockchainIssuer() {
5255
return issuer;
5356
}
5457

58+
@Override
59+
public String getMigrationServiceUrl() {
60+
return migrationServiceUrl;
61+
}
62+
5563
@Override
5664
public String getEcosystemServerUrl() {
5765
return ecosystemServerUrl;
@@ -75,6 +83,7 @@ public static KinEnvironment getPlayground() {
7583
"http://horizon-testnet.kininfrastructure.com",
7684
"Kin Testnet ; December 2018",
7785
"GBC3SG6NGTSZ2OMH3FFGB7UVRQWILW367U4GSOOF4TFSZONV42UJXUH7",
86+
"https://migration-devplatform-playground.developers.kinecosystem.com/migrate?address=",
7887
"https://api.developers.kinecosystem.com/v1",
7988
"https://s3.amazonaws.com/assets.developers.kinecosystem.com/web-offers/cards-based/index.html",
8089
"https://kin-bi.appspot.com/devp_play_");
@@ -90,6 +99,7 @@ public static KinEnvironment getProduction() {
9099
"https://horizon.kinfederation.com",
91100
"Kin Mainnet ; December 2018",
92101
"GDF42M3IPERQCBLWFEZKQRK77JQ65SCKTU3CW36HZVCX7XX5A5QXZIVK",
102+
"https://migration-devplatform-production.developers.kinecosystem.com/migrate?address=",
93103
"https://api-prod.developers.kinecosystem.com/v1",
94104
"https://s3.amazonaws.com/assets.developers.kinecosystem.com/web-offers/cards-based/index.html",
95105
"https://kin-bi.appspot.com/devp_");

kin-devplatform-sdk/src/main/java/kin/devplatform/KinEcosystemInitiator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,14 @@ private MigrationManager getMigrationManager(Context context, String appId) {
163163
final String newNetworkUrl = kinEnvironment.getNewBlockchainNetworkUrl();
164164
final String newNetworkId = kinEnvironment.getNewBlockchainPassphrase();
165165
final String issuer = kinEnvironment.getOldBlockchainIssuer();
166+
final String migrationServiceUrl = kinEnvironment.getMigrationServiceUrl();
166167

167168
if (appId == null) {
168169
appId = BlockchainSourceLocal.getInstance(context).getAppId();
169170
}
170171

171172
MigrationNetworkInfo migrationNetworkInfo = new MigrationNetworkInfo(oldNetworkUrl, oldNetworkId,
172-
newNetworkUrl, newNetworkId, issuer);
173+
newNetworkUrl, newNetworkId, issuer, migrationServiceUrl);
173174

174175
MigrationManager migrationManager = new MigrationManager(context, appId, migrationNetworkInfo,
175176
new KinVersionProvider(appId),

kin-devplatform-sdk/src/main/java/kin/devplatform/KinEnvironment.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public interface KinEnvironment {
1212

1313
String getOldBlockchainIssuer();
1414

15+
String getMigrationServiceUrl();
16+
1517
String getEcosystemServerUrl();
1618

1719
String getEcosystemWebFront();

0 commit comments

Comments
 (0)