Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions api/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ package api

import (
"encoding/hex"
"encoding/json"
"fmt"
"net/http"
"os"
"path/filepath"
"strings"

gtypes "github.com/ethereum/go-ethereum/core/types"
Expand Down Expand Up @@ -185,28 +182,6 @@ func (s *Server) DeletePluginPolicyById(c echo.Context) error {
})
}

func (s *Server) GetPolicySchema(c echo.Context) error {
pluginID := c.Request().Header.Get("plugin_id") // this is a unique identifier; this won't be needed once the DCA and Payroll are separate services
if pluginID == "" {
return c.JSON(http.StatusBadRequest, NewErrorResponse("missing required header: plugin_id"))
}

// TODO: need to deal with both DCA and Payroll plugins
keyPath := filepath.Join("plugin", pluginID, "dcaPluginUiSchema.json")
jsonData, err := os.ReadFile(keyPath)
if err != nil {
return c.JSON(http.StatusInternalServerError, NewErrorResponse("failed to read plugin schema"))
}

var data map[string]interface{}
jsonErr := json.Unmarshal(jsonData, &data)
if jsonErr != nil {
s.logger.WithError(jsonErr).Error("Failed to parse plugin schema")
return c.JSON(http.StatusInternalServerError, NewErrorResponse("failed to parse plugin schema"))
}
return c.JSON(http.StatusOK, data)
}

func (s *Server) GetRecipeSpecification(c echo.Context) error {
recipeSpec, err := s.plugin.GetRecipeSpecification()
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ type Server struct {
policyService service.Policy
plugin plugin.Spec
logger *logrus.Logger
mode string
}

// NewServer returns a new server.
Expand Down
1 change: 0 additions & 1 deletion config-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ server:
verifier_url: "http://localhost:8081"
base_config_path: /etc/vultisig
vaults_file_path: test/vaults
mode: plugin
plugin:
type: fees

Expand Down