Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Sep 30, 2020
1 parent fdc1d8a commit 985bd48
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const (
)

// VerifyMessage verifies a string and address against the provided signature and assumes Bitcoin Signed Message encoding
//
// Error will occur if verify fails or verification is not successful (no bool)
func VerifyMessage(address, signature, data string) error {
if len(address) == 0 {
return errors.New("address is missing")
Expand All @@ -28,8 +30,8 @@ func VerifyMessage(address, signature, data string) error {
if err != nil {
return err
}
for _, addr2 := range addresses {
if address == addr2 {
for _, testAddress := range addresses {
if address == testAddress {
return nil
}
}
Expand Down

0 comments on commit 985bd48

Please sign in to comment.