From c8318aaf5b9046ebb9b9db77ec1159e181faa4df Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 23 Jan 2018 19:59:19 -0400 Subject: [PATCH] Update the graphenej library Put the testnet chain id on the transaciton for the Send operation --- app/build.gradle | 2 +- .../agorise/crystalwallet/manager/BitsharesAccountManager.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 396043c..c79b2db 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -51,7 +51,7 @@ dependencies { compile 'com.neovisionaries:nv-websocket-client:1.30' compile 'org.tukaani:xz:1.6' compile 'com.jakewharton:butterknife:8.8.1' - compile 'com.github.bilthon:graphenej:0.4.6-alpha1' + compile 'com.github.bilthon:graphenej:0.4.6' compile 'com.google.zxing:core:3.3.1' compile 'me.dm7.barcodescanner:zxing:1.9.8' diff --git a/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java b/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java index 51de862..f50786c 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java @@ -54,6 +54,8 @@ import cy.agorise.graphenej.operations.TransferOperationBuilder; */ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetInfoRequestsListener { + private final static String BITSHARES_TESTNET_CHAIN_ID= "9cf6f255a208100d2bb275a3c52f4b1589b7ec9c9bfc2cb2a5fe6411295106d8"; + @Override public CryptoNetAccount createAccountFromSeed(CryptoNetAccount account, Context context) { if(account instanceof GrapheneAccount) { @@ -292,6 +294,7 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI ECKey privateKey = sendRequest.getSourceAccount().getActiveKey(sendRequest.getContext()); Transaction transaction = new Transaction(privateKey, null, operationList); + transaction.setChainId(BITSHARES_TESTNET_CHAIN_ID); ApiRequest transactionRequest = new ApiRequest(0, new ApiRequestListener() { @Override