Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kroggen committed Dec 1, 2023
1 parent fbd9f9d commit 3120a69
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions account/key/aergo_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions account/key/badgerdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion account/key/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down

0 comments on commit 3120a69

Please sign in to comment.