mirror of
https://github.com/alexgo-io/libbrc20-indexer.git
synced 2026-01-12 08:34:31 +08:00
fix: conf instead of const
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/unisat-wallet/libbrc20-indexer/conf"
|
||||
"github.com/unisat-wallet/libbrc20-indexer/constant"
|
||||
"github.com/unisat-wallet/libbrc20-indexer/model"
|
||||
"github.com/unisat-wallet/libbrc20-indexer/utils"
|
||||
@@ -114,12 +115,12 @@ func GenerateBRC20InputDataFromEvents(fname string) (brc20Datas []*model.Inscrip
|
||||
data.CreateIdxKey = key.String()
|
||||
|
||||
var pkScriptFrom, pkScriptTo string
|
||||
if pk, err := utils.GetPkScriptByAddress(e.AddressFrom, constant.GlobalNetParams); err != nil {
|
||||
if pk, err := utils.GetPkScriptByAddress(e.AddressFrom, conf.GlobalNetParams); err != nil {
|
||||
log.Printf("GenerateBRC20InputDataFromEvents [%d] pk invalid: %s", idx, err)
|
||||
} else {
|
||||
pkScriptFrom = string(pk)
|
||||
}
|
||||
if pk, err := utils.GetPkScriptByAddress(e.AddressTo, constant.GlobalNetParams); err != nil {
|
||||
if pk, err := utils.GetPkScriptByAddress(e.AddressTo, conf.GlobalNetParams); err != nil {
|
||||
pk, _ := hex.DecodeString(e.AddressTo)
|
||||
pkScriptTo = string(pk)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user