Fix DEADBEEF account bug

pull/2/head
Marat Subkhankulov 7 years ago
parent 469ab29b9d
commit 51295b9ede
  1. 6
      app/src/main/java/com/wallet/crypto/trustapp/controller/Controller.java
  2. 3
      app/src/main/java/com/wallet/crypto/trustapp/views/TransactionListActivity.java

@ -147,9 +147,11 @@ public class Controller {
mCurrentAddress = null;
if (mAccounts.size() > 0) {
mCurrentAddress = mPreferences.getString(PREF_CURRENT_ADDRESS, null);
if (mCurrentAddress == null) {
String cachedAddress = mPreferences.getString(PREF_CURRENT_ADDRESS, null);
if (getAccount(cachedAddress) == null) {
setCurrentAddress(mAccounts.get(0).getAddress());
} else {
setCurrentAddress(cachedAddress);
}
}

@ -111,9 +111,6 @@ public class TransactionListActivity extends AppCompatActivity {
if (account != null) {
mAddress = account.getAddress();
Log.d(TAG, "Address: %s, Balance: %s".format(mAddress, account.getBalance().toString()));
} else {
mAddress ="0xDEADBEEF";
account = new VMAccount(mAddress, "0");
}
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);

Loading…
Cancel
Save