From eb3beb6e9a53893a1ec4f601a8ba050dabb43eec Mon Sep 17 00:00:00 2001 From: henry Date: Sun, 1 Oct 2017 22:18:56 -0400 Subject: [PATCH] Graphene api import acount --- .../cryptonetinforequests/CryptoNetInfoRequest.java | 2 +- .../CryptoNetInfoRequestsListener.java | 2 +- .../ValidateImportBitsharesAccountRequest.java | 2 +- .../manager/BitsharesAccountManager.java | 11 ++++++++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/CryptoNetInfoRequest.java b/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/CryptoNetInfoRequest.java index 3fb44ba..24c11e9 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/CryptoNetInfoRequest.java +++ b/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/CryptoNetInfoRequest.java @@ -6,7 +6,7 @@ import cy.agorise.crystalwallet.enums.CryptoCoin; * Created by Henry Varona on 1/10/2017. */ -abstract class CryptoNetInfoRequest { +public abstract class CryptoNetInfoRequest { protected CryptoCoin coin; protected CryptoNetInfoRequestListener listener; diff --git a/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/CryptoNetInfoRequestsListener.java b/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/CryptoNetInfoRequestsListener.java index 1c16bf3..05efb5f 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/CryptoNetInfoRequestsListener.java +++ b/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/CryptoNetInfoRequestsListener.java @@ -4,6 +4,6 @@ package cy.agorise.crystalwallet.cryptonetinforequests; * Created by Henry Varona on 1/10/2017. */ -interface CryptoNetInfoRequestsListener { +public interface CryptoNetInfoRequestsListener { public void onNewRequest(CryptoNetInfoRequest request); } diff --git a/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/ValidateImportBitsharesAccountRequest.java b/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/ValidateImportBitsharesAccountRequest.java index bdae7cf..b6cde09 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/ValidateImportBitsharesAccountRequest.java +++ b/app/src/main/java/cy/agorise/crystalwallet/cryptonetinforequests/ValidateImportBitsharesAccountRequest.java @@ -6,7 +6,7 @@ import cy.agorise.crystalwallet.enums.CryptoCoin; * Created by Henry Varona on 1/10/2017. */ -class ValidateImportBitsharesAccountRequest extends CryptoNetInfoRequest { +public class ValidateImportBitsharesAccountRequest extends CryptoNetInfoRequest { private String accountName; private String mnemonic; 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 9d75dcc..7d66cce 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java @@ -1,12 +1,15 @@ package cy.agorise.crystalwallet.manager; +import cy.agorise.crystalwallet.cryptonetinforequests.CryptoNetInfoRequest; +import cy.agorise.crystalwallet.cryptonetinforequests.CryptoNetInfoRequestsListener; +import cy.agorise.crystalwallet.cryptonetinforequests.ValidateImportBitsharesAccountRequest; import cy.agorise.crystalwallet.models.CryptoNetAccount; /** * Created by henry on 26/9/2017. */ -public class BitsharesAccountManager implements CryptoAccountManager { +public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetInfoRequestsListener { @Override public CryptoNetAccount createAccountFromSeed(CryptoNetAccount account) { return null; @@ -21,4 +24,10 @@ public class BitsharesAccountManager implements CryptoAccountManager { public void loadAccountFromDB(CryptoNetAccount account) { } + + @Override + public void onNewRequest(CryptoNetInfoRequest request) { + if (request instanceof ValidateImportBitsharesAccountRequest){ + } + } }