After setting up the hardware wallet we run our app within the test environment and we use RPCurl “rinkeby”. The Samsung Blockchain Wallet returns the 2 accounts for the hardware wallet. All works fine and there is no problem for triggering the transaction and the UI part with transaction details,
restoreAccounts: Traverses addresses in your Wallet’s HD paths sequentially one by one and saves the account into the account repo at sharedPreferences only if:
the address balance is NON Zero, I mean there’s some balance.
the address has transaction count/nonce.
In the sequence, once there is any address that doesn’t meet this requirement, the loop breaks.
generateAccounts: generateAccounts API calls the restoreAccounts API internally. After restoration, it creates a new account on the next HD path and stores that account on the account repo at sharedPreferences.
getAccounts: Returns all the accounts from account repo at sharedPreferences.
In your case, what we guess happened is: Your Wallet has two addresses that have balance or transaction count in the “rinkeby” test network. Thus restoreAccount stores those 2 accounts on repo and getAccounts return those 2 accounts.
But in the case of mainnet, we guess your Wallet may have no addresses that have balance or transaction count, thus that restores nothing and returns nothing at get. So, please utilize the generateAccount API for such cases, then get the account.
Hope this helps, Best Regards,
Armaan Ul Islam
Samsung Developer Program