Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move accounts to separate package #360

Merged
merged 5 commits into from
Sep 26, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename acc to acct for clarity
  • Loading branch information
divan committed Sep 26, 2017
commit 91689049ad9de541b30a8453a73b7ce5259d463e
4 changes: 2 additions & 2 deletions cmd/statusd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,14 @@ func testCreateChildAccount(t *testing.T) bool {
address, pubKey, mnemonic := createAccountResponse.Address, createAccountResponse.PubKey, createAccountResponse.Mnemonic
t.Logf("Account created: {address: %s, key: %s, mnemonic:%s}", address, pubKey, mnemonic)

acc, err := common.ParseAccountString(address)
acct, err := common.ParseAccountString(address)
if err != nil {
t.Errorf("can not get account from address: %v", err)
return false
}

// obtain decrypted key, and make sure that extended key (which will be used as root for sub-accounts) is present
_, key, err := keyStore.AccountDecryptedKey(acc, TestConfig.Account1.Password)
_, key, err := keyStore.AccountDecryptedKey(acct, TestConfig.Account1.Password)
if err != nil {
t.Errorf("can not obtain decrypted account key: %v", err)
return false
Expand Down
4 changes: 2 additions & 2 deletions cmd/statusd/wnodecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,12 @@ func injectAccountIntoWhisper(address, password string) error {
return err
}

acc, err := common.ParseAccountString(address)
acct, err := common.ParseAccountString(address)
if err != nil {
return account.ErrAddressToAccountMappingFailure
}

_, accountKey, err := keyStore.AccountDecryptedKey(acc, password)
_, accountKey, err := keyStore.AccountDecryptedKey(acct, password)
if err != nil {
return fmt.Errorf("%s: %v", account.ErrAccountToKeyMappingFailure.Error(), err)
}
Expand Down
4 changes: 2 additions & 2 deletions geth/api/backend_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ func (s *BackendTestSuite) TestCreateChildAccount() {
require.NoError(err)
s.T().Logf("Account created: {address: %s, key: %s, mnemonic:%s}", address, pubKey, mnemonic)

acc, err := common.ParseAccountString(address)
acct, err := common.ParseAccountString(address)
require.NoError(err, "can not get account from address")

// obtain decrypted key, and make sure that extended key (which will be used as root for sub-accounts) is present
_, key, err := keyStore.AccountDecryptedKey(acc, TestConfig.Account1.Password)
_, key, err := keyStore.AccountDecryptedKey(acct, TestConfig.Account1.Password)
require.NoError(err, "can not obtain decrypted account key")
require.NotNil(key.ExtendedKey, "CKD#2 has not been generated for new account")

Expand Down