Skip to content

Commit

Permalink
Fix failure notification code generated by `processor_batch_register_…
Browse files Browse the repository at this point in the history
…personal_info` (#732)
  • Loading branch information
purplesmoke05 authored Dec 12, 2024
1 parent 53efb5c commit 542663e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion batch/indexer_dvp_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ async def __sink_on_delivery_info_notification(
amount: int,
agent_address: str,
code: Literal[
Annotated[1, "deliveryConfirmed"], Annotated[2, "deliveryFinished"]
Annotated[0, "deliveryConfirmed"], Annotated[1, "deliveryFinished"]
],
):
notification = Notification()
Expand Down
2 changes: 1 addition & 1 deletion batch/processor_batch_register_personal_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ async def process(self):
await self.__sink_on_error_notification(
db_session=db_session,
issuer_address=_upload.issuer_address,
code=2,
code=1,
upload_id=_upload.upload_id,
error_registration_id=error_registration_id,
)
Expand Down
6 changes: 3 additions & 3 deletions tests/batch/test_processor_register_personal_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ async def test_error_2(
_notification.type
== NotificationType.BATCH_REGISTER_PERSONAL_INFO_ERROR
)
assert _notification.code == 2
assert _notification.code == 1
assert _notification.metainfo == {
"upload_id": batch_register_upload.upload_id,
"error_registration_id": [
Expand Down Expand Up @@ -958,7 +958,7 @@ async def test_error_3(
_notification.type
== NotificationType.BATCH_REGISTER_PERSONAL_INFO_ERROR
)
assert _notification.code == 2
assert _notification.code == 1
assert _notification.metainfo == {
"upload_id": batch_register_upload.upload_id,
"error_registration_id": [
Expand Down Expand Up @@ -1096,7 +1096,7 @@ async def test_error_4(
_notification.type
== NotificationType.BATCH_REGISTER_PERSONAL_INFO_ERROR
)
assert _notification.code == 2
assert _notification.code == 1
assert _notification.metainfo == {
"upload_id": batch_register_upload.upload_id,
"error_registration_id": [
Expand Down

0 comments on commit 542663e

Please sign in to comment.