Skip to content

Commit

Permalink
Fixes issue in mnemonic testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashy5000 committed Apr 10, 2024
1 parent 061d186 commit 7f56653
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mnemonic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ import "testing"
func TestGetMnemonic(t *testing.T) {
t.Run("It should return a non-empty string", func(t *testing.T) {
key := GetKey()
result := GetMnemonic(key)
result := GetMnemonic(*key.X)
if result == "" {
t.Errorf("GetMnemonic() = %v; want a mnemonic", result)
}
})
t.Run("It should return a reversible mnemonic", func(t *testing.T) {
key := GetKey()
mnemonic := GetMnemonic(key)
mnemonic := GetMnemonic(*key.X)
result := RestoreMnemonic(mnemonic)
if result.X.Cmp(key.X) != 0 {
if result.Cmp(key.X) != 0 {
t.Errorf("RestoreMnemonic(GetMnemonic()) = %v; want %v", result, key)
}
})
Expand Down

0 comments on commit 7f56653

Please sign in to comment.