-
Notifications
You must be signed in to change notification settings - Fork 3
🐛 Small bug fixes for fees #131
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,11 @@ | ||||||||||||||||||
| { | ||||||||||||||||||
| "verifier": { | ||||||||||||||||||
| "url": "verifier:8080" | ||||||||||||||||||
| }, | ||||||||||||||||||
|
Comment on lines
+2
to
+4
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Verifier configuration restructured consistently. The new verifier configuration section aligns with the code changes in Apply this diff to complete the verifier configuration: "verifier": {
- "url": "verifier:8080"
+ "url": "verifier:8080",
+ "token": "example-token",
+ "party_prefix": "server"
},📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| "server": { | ||||||||||||||||||
| "host": "localhost", | ||||||||||||||||||
| "port": 8080, | ||||||||||||||||||
| "encryption_secret": "test123", | ||||||||||||||||||
| "verifier_url": "http://host.docker.internal:8080" | ||||||||||||||||||
| "encryption_secret": "test123" | ||||||||||||||||||
| }, | ||||||||||||||||||
| "database": { | ||||||||||||||||||
| "dsn": "postgres://myuser:mypassword@plugin-db:5432/vultisig-fee?sslmode=disable" | ||||||||||||||||||
|
|
@@ -15,7 +17,7 @@ | |||||||||||||||||
| "password": "password" | ||||||||||||||||||
| }, | ||||||||||||||||||
| "block_storage": { | ||||||||||||||||||
| "host": "http://localhost:9100", | ||||||||||||||||||
| "host": "http://minio-plugin:9000", | ||||||||||||||||||
| "region": "us-east-1", | ||||||||||||||||||
| "access_key": "minioadmin", | ||||||||||||||||||
| "secret": "minioadmin", | ||||||||||||||||||
|
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,6 +9,7 @@ import ( | |||||||||||||||||
| "github.com/google/uuid" | ||||||||||||||||||
| "github.com/hibiken/asynq" | ||||||||||||||||||
| "github.com/sirupsen/logrus" | ||||||||||||||||||
| "github.com/vultisig/plugin/internal/keysign" | ||||||||||||||||||
| vcommon "github.com/vultisig/verifier/common" | ||||||||||||||||||
| "github.com/vultisig/verifier/plugin" | ||||||||||||||||||
| "github.com/vultisig/verifier/tx_indexer" | ||||||||||||||||||
|
|
@@ -34,6 +35,7 @@ var _ plugin.Plugin = (*FeePlugin)(nil) | |||||||||||||||||
| type FeePlugin struct { | ||||||||||||||||||
| vaultService *vault.ManagementService | ||||||||||||||||||
| vaultStorage *vault.BlockStorageImp | ||||||||||||||||||
| signer *keysign.Signer | ||||||||||||||||||
| db storage.DatabaseStorage | ||||||||||||||||||
| eth *evm.SDK | ||||||||||||||||||
| logger logrus.FieldLogger | ||||||||||||||||||
|
|
@@ -46,6 +48,7 @@ type FeePlugin struct { | |||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| func NewFeePlugin(db storage.DatabaseStorage, | ||||||||||||||||||
| signer *keysign.Signer, | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add nil validation for the signer parameter. Consider adding validation to ensure the signer parameter is not nil, similar to the existing validation for + if signer == nil {
+ return nil, fmt.Errorf("signer cannot be nil")
+ }
+
if db == nil {
return nil, fmt.Errorf("database storage cannot be nil")
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| logger logrus.FieldLogger, | ||||||||||||||||||
| baseConfigPath string, | ||||||||||||||||||
| vaultStorage *vault.BlockStorageImp, | ||||||||||||||||||
|
|
@@ -55,6 +58,7 @@ func NewFeePlugin(db storage.DatabaseStorage, | |||||||||||||||||
| feeConfig *FeeConfig, | ||||||||||||||||||
| encryptionSecret string, | ||||||||||||||||||
| verifierUrl string) (*FeePlugin, error) { | ||||||||||||||||||
|
|
||||||||||||||||||
| if db == nil { | ||||||||||||||||||
| return nil, fmt.Errorf("database storage cannot be nil") | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
@@ -93,6 +97,7 @@ func NewFeePlugin(db storage.DatabaseStorage, | |||||||||||||||||
| return &FeePlugin{ | ||||||||||||||||||
| db: db, | ||||||||||||||||||
| eth: evm.NewSDK(ethEvmChainID, rpcClient, rpcClient.Client()), | ||||||||||||||||||
| signer: signer, | ||||||||||||||||||
| logger: logger.WithField("plugin", "fees"), | ||||||||||||||||||
| config: feeConfig, | ||||||||||||||||||
| verifierApi: verifierApi, | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this overlaps with another verifier config - non-blocking, largely up to you on how you want to handle this, but maybe worth checking later