mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
refactor: use RawPublicKey instead of PublicKey in macaroon issuer
This commit is contained in:
@@ -15,7 +15,7 @@ var fourYears = time.Hour * 24 * 365 * 4
|
||||
// IssueAdminMacaroon creates a macaroon with the specified parameters.
|
||||
func (k Keeper) IssueAdminMacaroon(sdkctx sdk.Context, controller didtypes.ControllerI) (*macaroon.Macaroon, error) {
|
||||
// Derive the root key by hashing the shared MPC public key
|
||||
rootKey := sha256.Sum256([]byte(controller.PublicKey()))
|
||||
rootKey := sha256.Sum256([]byte(controller.RawPublicKey()))
|
||||
// Create the macaroon
|
||||
m, err := macaroon.New(rootKey[:], []byte(controller.SonrAddress()), controller.ChainID(), macaroon.LatestVersion)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user