Skip to content

Commit

Permalink
removed 0x prefix from eth private keys
Browse files Browse the repository at this point in the history
  • Loading branch information
dan13ram committed Oct 4, 2023
1 parent e979cba commit b071e5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app

import (
"os"
"strings"

log "github.com/sirupsen/logrus"

Expand Down Expand Up @@ -66,6 +67,9 @@ func validateConfig() {
if Config.Ethereum.PrivateKey == "" {
log.Fatal("[CONFIG] Ethereum.PrivateKey is required")
}
if strings.HasPrefix(Config.Ethereum.PrivateKey, "0x") {
Config.Ethereum.PrivateKey = Config.Ethereum.PrivateKey[2:]
}
if Config.Ethereum.WrappedPocketAddress == "" {
log.Fatal("[CONFIG] Ethereum.WrappedPocketAddress is required")
}
Expand Down

0 comments on commit b071e5f

Please sign in to comment.