I am developing tron mobile dapp with samsungblockchain.
I already created tron account using samsungblockchain wallet. But, the account I created on the wallet is not updated on my app. I get mAccountsList, but the lenght is 0.
I already tested aero wallet, and it is almost same code.
So, I should create new account. If I create account on my app, getAccount function shows my account address.
As a temporary soultion, I’m testing it by creating an address.
Why I can’t get the existed account info from samsungblockchain wallet?
@ReactMethod
public void getAccount(Promise successCallback) throws JSONException {
mAccountsList = accountManager.getAccounts(hardwareWallet.getWalletId(),
coinNetworkInfo.getCoinType(),
coinNetworkInfo.getNetworkType());
Gson g = new Gson();
WritableArray array = new WritableNativeArray();
for (Account co : mAccountsList) {
JSONObject jo = new JSONObject(g.toJson(co));
WritableMap wm = convertJsonToMap(jo);
array.pushMap(wm);
}
successCallback.resolve(array);
}
@ReactMethod
public void createAccount(Promise promise) {
ListenableFutureTask.Callback<Account> generatingNewAccountCallback =
new ListenableFutureTask.Callback<Account>() {
@Override
public void onSuccess(Account account) {
Log.i("Cryptomission", "Generated account address: " + account.getAddress());
}
…