-
Notifications
You must be signed in to change notification settings - Fork 1
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
Separate functions that are not related to the issuer #664
Conversation
if DVP_AGENT_FEATURE_ENABLED: | ||
app.include_router(settlement_agent.router) | ||
|
||
if BC_EXPLORER_ENABLED: | ||
app.include_router(bc_explorer.router) | ||
|
||
if FREEZE_LOG_FEATURE_ENABLED: | ||
app.include_router(freeze_log.router) |
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.
APIs are loaded according to the environment variable settings.
issuer_address: str = Header(...), | ||
): | ||
"""List of DVP delivery""" | ||
stmt = select(IDXDelivery).where( | ||
IDXDelivery.exchange_address == exchange_address, | ||
stmt = ( | ||
select(IDXDelivery) | ||
.join(Token, Token.token_address == IDXDelivery.token_address) | ||
.where( | ||
and_( | ||
IDXDelivery.exchange_address == exchange_address, | ||
Token.issuer_address == issuer_address, | ||
) | ||
) |
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.
Filter only data related to tokens issued by the issuer set in the header.
From the Agent's perspective, there was a problem with referencing the delivery list, so a new API was added. |
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.
LGTM
1. Change to store issuer-related and unrelated APIs in separate directories
app > routers > issuer | misc
2. Add environment variables
FREEZE_LOG_FEATURE_ENABLED
: Set if you want to use FRREZE-LOG features.DVP_AGENT_FEATURE_ENABLED
: Set if you want to use DVP Paying Agent features.3. Change to DVP-related APIs
app.routers.issuer.settlement_issuer.py
app.routers.misc.settlement_agent.py
GET: /settlement/dvp/{exchange_address}/deliveries
GET: /settlement/dvp/{exchange_address}/delivery/{delivery_id}