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 b5859ba..249d443 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java @@ -60,9 +60,9 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI GrapheneAccount grapheneAccount = (GrapheneAccount) account; boolean created = BitsharesFaucetApiGenerator.registerBitsharesAccount(grapheneAccount.getName(), - new Address(grapheneAccount.getOwnerKey(context),"BTS").toString(), - new Address(grapheneAccount.getActiveKey(context),"BTS").toString(), - new Address(grapheneAccount.getMemoKey(context),"BTS").toString(),GrapheneApiGenerator.faucetUrl); + new Address(ECKey.fromPublicOnly(grapheneAccount.getOwnerKey(context).getPubKey()),"BTS").toString(), + new Address(ECKey.fromPublicOnly(grapheneAccount.getActiveKey(context).getPubKey()),"BTS").toString(), + new Address(ECKey.fromPublicOnly(grapheneAccount.getMemoKey(context).getPubKey()),"BTS").toString(),GrapheneApiGenerator.faucetUrl); if(created) { GrapheneAccount fetch = this.getAccountInfoByName(grapheneAccount.getName()); diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/GrapheneAccount.java b/app/src/main/java/cy/agorise/crystalwallet/models/GrapheneAccount.java index c89f639..1e82f65 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/GrapheneAccount.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/GrapheneAccount.java @@ -75,7 +75,7 @@ public class GrapheneAccount extends CryptoNetAccount { new ChildNumber(0, true)); DeterministicKey address = HDKeyDerivation.deriveChildKey(permission, new ChildNumber(0, false)); - return address; + return ECKey.fromPrivate(address.getPrivKeyBytes()); } } @@ -98,8 +98,9 @@ public class GrapheneAccount extends CryptoNetAccount { new ChildNumber(0, true)); DeterministicKey permission = HDKeyDerivation.deriveChildKey(accountIndexKey, new ChildNumber(1, true)); - return HDKeyDerivation.deriveChildKey(permission, - new ChildNumber(0, true)); //TODO implement multiple Address and accounts + DeterministicKey address = HDKeyDerivation.deriveChildKey(permission, + new ChildNumber(0, false)); //TODO implement multiple Address and accounts + return ECKey.fromPrivate(address.getPrivKeyBytes()); } } @@ -122,8 +123,9 @@ public class GrapheneAccount extends CryptoNetAccount { new ChildNumber(0, true)); DeterministicKey permission = HDKeyDerivation.deriveChildKey(accountIndexKey, new ChildNumber(3, true)); - return HDKeyDerivation.deriveChildKey(permission, - new ChildNumber(0, true)); //TODO implement multiple Address and accounts + DeterministicKey address = HDKeyDerivation.deriveChildKey(permission, + new ChildNumber(0, false)); //TODO implement multiple Address and accounts + return ECKey.fromPrivate(address.getPrivKeyBytes()); } } }