-
Notifications
You must be signed in to change notification settings - Fork 34
feat/reduce_calls_for_cookies #314
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
Changes from all commits
5eb92af
27acd84
3bd98e5
b65aeeb
378e2ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
from grpc.aio import Channel | ||
|
||
from pyinjective.core.network import CookieAssistant | ||
from pyinjective.proto.injective.tokenfactory.v1beta1 import ( | ||
query_pb2 as token_factory_query_pb, | ||
query_pb2_grpc as token_factory_query_grpc, | ||
|
@@ -11,10 +12,10 @@ | |
|
||
|
||
class ChainGrpcTokenFactoryApi: | ||
def __init__(self, channel: Channel, metadata_provider: Callable): | ||
def __init__(self, channel: Channel, cookie_assistant: CookieAssistant): | ||
self._query_stub = token_factory_query_grpc.QueryStub(channel) | ||
self._tx_stub = token_factory_tx_grpc.MsgStub(channel) | ||
self._assistant = GrpcApiRequestAssistant(metadata_provider=metadata_provider) | ||
self._assistant = GrpcApiRequestAssistant(cookie_assistant=cookie_assistant) | ||
Comment on lines
+15
to
+18
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. Tip Codebase Verification The verification process aimed to identify instances of Given this information, it can be concluded that the only instance requiring modification to comply with the updated Based on the verification process and the results obtained, the appropriate tag for this response is , as the review comment is validated by the evidence from the codebase, identifying a specific issue that needs to be addressed. Analysis chainThe Scripts ExecutedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for instances of ChainGrpcTokenFactoryApi being instantiated without cookie_assistant.
rg --type py "ChainGrpcTokenFactoryApi\(" | grep -v "cookie_assistant"
Length of output: 157 Script: #!/bin/bash
# View the instantiation of ChainGrpcTokenFactoryApi in pyinjective/async_client.py
fd async_client.py --exec cat {}
Length of output: 145365 Script: #!/bin/bash
# Perform a more nuanced search for ChainGrpcTokenFactoryApi instantiation to catch any instances missed due to syntax variations
rg --type py "ChainGrpcTokenFactoryApi\(" | grep -v "cookie_assistant" | grep -v "async_client.py"
Length of output: 96 |
||
|
||
async def fetch_module_params(self) -> Dict[str, Any]: | ||
request = token_factory_query_pb.QueryParamsRequest() | ||
|
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.
The term "low level API components" is correctly used in the context of software development. However, when used as a compound adjective before a noun, it's typically hyphenated. Consider revising for clarity.