refactor: remove PluginID custom type, use plain string#550
Conversation
Drop the PluginID custom type from the public types package and replace all usages with plain string throughout the codebase. Plugin ID constants (fees, recurring-sends) are moved to internal/types/registry.go. PluginVultisigPayroll_0000 is removed entirely; tests now use PluginVultisigRecurringSends. Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
WalkthroughMigrates plugin identifier representation from a typed Changes
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
gomesalexandre
left a comment
There was a problem hiding this comment.
CI green. Clean refactor - removing a type alias that was adding zero type safety (PluginID is just a string, no methods, no validation) while requiring type conversions all over. Plain string is correct here.
No fund-safety or auth concerns - the middleware that sets plugin_id in the Echo context now stores a plain string, and the type assertion .(string) is simpler and less surprising. The PluginVultisigFees move to internal types makes sense.
LGTM.
|
APPROVED — ready to merge @RaghavSood 🚀 |
|
APPROVED but DIRTY - @RaghavSood can you rebase when you get a chance? ty |
Summary
PluginIDcustom type (type PluginID string) from the publictypespackagestringinternal/types/registry.goas plain string constantsPluginVultisigPayroll_0000entirely; tests usePluginVultisigRecurringSendsinstead.String()calls, type conversions (PluginID(x)), and type assertions (.(PluginID)) that were only needed due to the custom typeTest plan
go build ./...passesgo vet ./...passes (no new warnings)go test ./...all tests pass🤖 Generated with Claude Code
Summary by CodeRabbit