diff --git a/internal/service/hub/model/key.go b/internal/service/hub/model/key.go index e98d7cf..3a09b91 100644 --- a/internal/service/hub/model/key.go +++ b/internal/service/hub/model/key.go @@ -51,7 +51,10 @@ func KeyCreate(ctx context.Context, accountAddress common.Address, keyName strin } func KeyGetByID(ctx context.Context, keyID uint64, activeOnly bool, databaseClient *gorm.DB, controlClient *control.StateClientWriter) (*Key, bool, error) { - queryBase := databaseClient.WithContext(ctx).Model(&table.GatewayKey{}) + queryBase := databaseClient. + WithContext(ctx). + Model(&table.GatewayKey{}). + Preload("Account") if activeOnly { queryBase = queryBase.Unscoped()