This commit is contained in:
r8zavetr8v 2024-05-29 01:56:24 +03:00
parent 05802514f5
commit 1993292898
2 changed files with 5 additions and 1 deletions

View File

@ -39,7 +39,7 @@ func main() {
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "chain-api-url", Name: "chain-api-url",
Value: "http://localhost:3000", Value: "http://localhost:3000/api",
}, },
// rest // rest

View File

@ -264,6 +264,10 @@ func (i *chainInteractor) PubKey(ctx context.Context, user *models.User) ([]byte
pubKeyStr := string(respBody)[2:] pubKeyStr := string(respBody)[2:]
if pubKeyStr == "" {
return nil, fmt.Errorf("error empty public key")
}
return common.Hex2Bytes(pubKeyStr), nil return common.Hex2Bytes(pubKeyStr), nil
} }