diff --git a/account/key/aergo_storage_test.go b/account/key/aergo_storage_test.go index 35dbbf22c..b3348230f 100644 --- a/account/key/aergo_storage_test.go +++ b/account/key/aergo_storage_test.go @@ -29,7 +29,7 @@ func TestSaveAndLoadOnAergo(t *testing.T) { assert.FailNow(t, "Could not create private key", err) } - identity := crypto.GenerateAddress(&expected.PublicKey) + identity := crypto.GenerateAddress(expected.PubKey().ToECDSA()) password := "password" saved, err := storage.Save(identity, password, expected) if nil != err { @@ -57,7 +57,7 @@ func TestSaveAndListOnAergo(t *testing.T) { assert.FailNow(t, "Could not create private key", err) } - identity := crypto.GenerateAddress(&expected.PublicKey) + identity := crypto.GenerateAddress(expected.PubKey().ToECDSA()) password := "password" saved, err := storage.Save(identity, password, expected) if nil != err { diff --git a/account/key/badgerdb_test.go b/account/key/badgerdb_test.go index c51b7819f..0b3232521 100644 --- a/account/key/badgerdb_test.go +++ b/account/key/badgerdb_test.go @@ -26,7 +26,7 @@ func TestSaveAndLoadOnBadger(t *testing.T) { assert.FailNow(t, "Could not create private key", err) } - identity := crypto.GenerateAddress(&expected.PublicKey) + identity := crypto.GenerateAddress(expected.PubKey().ToECDSA()) password := "password" saved, err := storage.Save(identity, password, expected) if nil != err { @@ -52,7 +52,7 @@ func TestSaveAndListOnBadger(t *testing.T) { assert.FailNow(t, "Could not create private key", err) } - identity := crypto.GenerateAddress(&expected.PublicKey) + identity := crypto.GenerateAddress(expected.PubKey().ToECDSA()) password := "password" saved, err := storage.Save(identity, password, expected) if nil != err { diff --git a/account/key/store_test.go b/account/key/store_test.go index 7d4aacc1c..afff1c6eb 100644 --- a/account/key/store_test.go +++ b/account/key/store_test.go @@ -68,7 +68,7 @@ func TestImportKey(t *testing.T) { const testSize = 3 for i := 0; i < testSize; i++ { key, err := btcec.NewPrivateKey() - addr := crypto.GenerateAddress(&(key.PublicKey)) + addr := crypto.GenerateAddress(key.PubKey().ToECDSA()) if err != nil { t.Errorf("could not create key : %s", err.Error()) }