Skip to content

Commit

Permalink
Fix hex string decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
violog committed Jun 20, 2024
1 parent 5789a6a commit e820b6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/service/handlers/join_program.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func JoinProgram(w http.ResponseWriter, r *http.Request) {
}

func calculateCountrySignature(key []byte, nullifier, country string) string {
bNull, err := hex.DecodeString(nullifier)
bNull, err := hex.DecodeString(nullifier[2:])
if err != nil {
panic(fmt.Errorf("nullifier was not properly validated as hex: %w", err))
}
Expand Down
2 changes: 1 addition & 1 deletion internal/service/handlers/verify_passport.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func getAndVerifyBalanceEligibility(
if errs = checkVerificationEligibility(r, balance); len(errs) > 0 {
return nil, errs
}
// for withdrawal
// for withdrawal and joining program
if proof == nil {
return balance, nil
}
Expand Down

0 comments on commit e820b6e

Please sign in to comment.