chore: remove checking color id (#3651)

* remove checking color id

* bump version
This commit is contained in:
frank 2023-06-21 21:24:53 +08:00 committed by GitHub
parent 1d5ffc0ba0
commit 7da1ed38d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -1 +1 @@
0.159.3
0.159.4

View File

@ -700,7 +700,6 @@ func TestLoginWithKey(t *testing.T) {
activeAccount, err := b.GetActiveAccount()
require.NoError(t, err)
require.NotNil(t, activeAccount.ColorHash)
require.NotZero(t, activeAccount.ColorID)
}
func TestVerifyDatabasePassword(t *testing.T) {

View File

@ -399,7 +399,7 @@ func (b *GethStatusBackend) startNodeWithKey(acc multiaccounts.Account, password
return err
}
if acc.ColorHash == nil || acc.ColorID == 0 {
if acc.ColorHash == nil {
multiAccount, err := b.updateAccountColorHashAndColorID(acc.KeyUID, accountsDB)
if err != nil {
return err
@ -475,7 +475,7 @@ func (b *GethStatusBackend) updateAccountColorHashAndColorID(keyUID string, acco
if err != nil {
return nil, err
}
if multiAccount.ColorHash == nil || multiAccount.ColorID == 0 {
if multiAccount.ColorHash == nil {
keypair, err := accountsDB.GetKeypairByKeyUID(keyUID)
if err != nil {
return nil, err
@ -612,7 +612,7 @@ func (b *GethStatusBackend) startNodeWithAccount(acc multiaccounts.Account, pass
return err
}
if acc.ColorHash == nil || acc.ColorID == 0 {
if acc.ColorHash == nil {
multiAccount, err := b.updateAccountColorHashAndColorID(acc.KeyUID, accountsDB)
if err != nil {
return err