refactor: use RawPublicKey instead of PublicKey in macaroon issuer
This commit is contained in:
1 parent
6da6f2b97b
commit
a0a5f0c7e0
5 files changed
+19
-17
No files matched your search
@@ -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