Conversation
WalkthroughA new Changes
Sequence DiagramsequenceDiagram
actor Client
participant Handler as gRPC Handler
participant Wallet as Wallet Service
participant Signer as Signer Infrastructure
Client->>Handler: SignMessage(message)
Handler->>Wallet: SignMessage(ctx, message)
Wallet->>Wallet: Hash message with chainhash.HashB
Wallet->>Signer: Sign hash with Schnorr key
Signer-->>Wallet: signature bytes
Wallet-->>Handler: signature bytes
Handler-->>Client: SignMessageResponse(signature)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 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)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/arkd-wallet/core/application/wallet/service_test.go (1)
37-46: Mark test helper functions witht.Helper().This improves assertion failure locations by attributing failures to callers instead of helper internals.
♻️ Suggested patch
func loadServiceFixtures(t *testing.T) *serviceFixtures { + t.Helper() data, err := os.ReadFile("fixtures/service_fixtures.json") require.NoError(t, err) @@ func getTestKey(t *testing.T, fixtures *serviceFixtures, keyName string) *btcec.PrivateKey { + t.Helper() for _, k := range fixtures.SignMessageTests.TestKeys {Also applies to: 48-59
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/arkd-wallet/core/application/wallet/service_test.go` around lines 37 - 46, Add t.Helper() at the start of test helper functions so failures attribute to the caller; specifically, update loadServiceFixtures(t *testing.T) to call t.Helper() as the first statement and do the same for the other helper function defined around lines 48-59 (the other helper's name in the diff) so all assertions inside those helpers point to the test that invoked them.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@pkg/arkd-wallet/core/application/wallet/service_test.go`:
- Around line 37-46: Add t.Helper() at the start of test helper functions so
failures attribute to the caller; specifically, update loadServiceFixtures(t
*testing.T) to call t.Helper() as the first statement and do the same for the
other helper function defined around lines 48-59 (the other helper's name in the
diff) so all assertions inside those helpers point to the test that invoked
them.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 62b4605c-d0f2-4235-badb-cbb21d5856e9
⛔ Files ignored due to path filters (3)
api-spec/protobuf/gen/signer/v1/service.pb.gois excluded by!**/*.pb.go,!**/gen/**api-spec/protobuf/gen/signer/v1/service.pb.rgw.gois excluded by!**/gen/**api-spec/protobuf/gen/signer/v1/service_grpc.pb.gois excluded by!**/*.pb.go,!**/gen/**
📒 Files selected for processing (9)
api-spec/openapi/swagger/signer/v1/service.openapi.jsonapi-spec/protobuf/signer/v1/service.protointernal/core/ports/signer.gointernal/infrastructure/signer/client.gopkg/arkd-wallet/core/application/types.gopkg/arkd-wallet/core/application/wallet/fixtures/service_fixtures.jsonpkg/arkd-wallet/core/application/wallet/service.gopkg/arkd-wallet/core/application/wallet/service_test.gopkg/arkd-wallet/interface/grpc/handlers/signer_handler.go
requested by: #904 (review)
Summary by CodeRabbit