Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Reuse v6 juno_unsubscribe handler for v7 and v8 (starknet_unsubscribe) #2509

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hudem1
Copy link
Contributor

@hudem1 hudem1 commented Feb 17, 2025

rpc pkg cleanup according to #2437

As side notes:

  • reuse v6 (custom) juno_unsubscribe for v7 as well as for v8 (starknet_unsubscribe)
  • i had to rename v6 events_test.go's package name to rpcv6 instead of rpcv6_test in order to access handler.subscriptions in tests (as it was done in v8 subscriptions_test.go).

@hudem1 hudem1 mentioned this pull request Feb 17, 2025
23 tasks
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.82%. Comparing base (94071e4) to head (32dc1b7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2509      +/-   ##
==========================================
+ Coverage   73.65%   73.82%   +0.16%     
==========================================
  Files         137      137              
  Lines       16659    16620      -39     
==========================================
- Hits        12271    12270       -1     
+ Misses       3526     3490      -36     
+ Partials      862      860       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hudem1 hudem1 added RPC JSON RPC API Refactor labels Feb 17, 2025
@rianhughes rianhughes self-requested a review February 24, 2025 14:55
@hudem1 hudem1 requested a review from rodrigo-pino February 26, 2025 17:43
@@ -882,107 +882,6 @@ func TestSubscribePendingTxs(t *testing.T) {
})
}

func TestUnsubscribe(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests actually server the starknet_unsubscribe instead of juno_unsubscribe. I think we'll eventually deprecate juno_unsubscribe because it's not currently in v8, so we shouldn't move this test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor RPC JSON RPC API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants