olas-operate-middleware 0.10.2__py3-none-any.whl → 0.10.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: olas-operate-middleware
3
- Version: 0.10.2
3
+ Version: 0.10.3
4
4
  Summary:
5
5
  Author: David Vilela
6
6
  Author-email: dvilelaf@gmail.com
@@ -5,7 +5,7 @@ operate/bridge/bridge_manager.py,sha256=sUfhB1pZvBrF-kBfDOfFVoNeesCe7wd4_YahUF3F
5
5
  operate/bridge/providers/lifi_provider.py,sha256=FpAlBAA_gOt-oOHKhGaOQhhTZIL-hgYYo4IIw1FN7mo,14153
6
6
  operate/bridge/providers/native_bridge_provider.py,sha256=gG8bSyxUoAVEF6_J9tn1qKRv1PnXuMJdMwUAVJ4GJz8,24647
7
7
  operate/bridge/providers/provider.py,sha256=i54RL7m4wMSADM_D_V_quQump_ipPTmByUc-c-AOLPQ,19687
8
- operate/bridge/providers/relay_provider.py,sha256=U_l7qP8jCbGYvPaoUf82MAS8V8OoizqSLTuJs763JGY,17075
8
+ operate/bridge/providers/relay_provider.py,sha256=L7D-PKepsuBadarJmrNneZk0bsrh88u05uD6_2MSss4,17341
9
9
  operate/cli.py,sha256=EalpBA15TXX5i3tD-2KIQOxkFwEOqOEiGMbjh36cOHw,51168
10
10
  operate/constants.py,sha256=syGWEVyw07zK50gPS4OSSwyAbt9R6P8IttDimDt9vCY,2746
11
11
  operate/data/README.md,sha256=jGPyZTvg2LCGdllvmYxmFMkkkiXb6YWatbqIkcX3kv4,879
@@ -86,8 +86,8 @@ operate/utils/gnosis.py,sha256=CS07ZqvrO7uelkFe09VMyPBcLzKONUI1ZqFvi41BDhc,17924
86
86
  operate/utils/ssl.py,sha256=O5DrDoZD4T4qQuHP8GLwWUVxQ-1qXeefGp6uDJiF2lM,4308
87
87
  operate/wallet/__init__.py,sha256=NGiozD3XhvkBi7_FaOWQ8x1thZPK4uGpokJaeDY_o2w,813
88
88
  operate/wallet/master.py,sha256=MGXynIV0LQU3n28AceK7RlaxAtfsVowsXzisesG4iJM,30760
89
- olas_operate_middleware-0.10.2.dist-info/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
90
- olas_operate_middleware-0.10.2.dist-info/METADATA,sha256=iAiNiOd6z_2UBlOwzgIZ_iXWw7C9iaHhQrVICBZv7tU,2034
91
- olas_operate_middleware-0.10.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
92
- olas_operate_middleware-0.10.2.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
93
- olas_operate_middleware-0.10.2.dist-info/RECORD,,
89
+ olas_operate_middleware-0.10.3.dist-info/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
90
+ olas_operate_middleware-0.10.3.dist-info/METADATA,sha256=0kyC2FK8gU3XWWtXMKZwSNJ-0LLB6UEQj1v3UhVLy4g,2034
91
+ olas_operate_middleware-0.10.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
92
+ olas_operate_middleware-0.10.3.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
93
+ olas_operate_middleware-0.10.3.dist-info/RECORD,,
@@ -103,6 +103,7 @@ RELAY_DEFAULT_GAS = {
103
103
  }
104
104
 
105
105
 
106
+ # https://docs.relay.link/guides/bridging#status-values
106
107
  class RelayExecutionStatus(str, enum.Enum):
107
108
  """Relay execution status."""
108
109
 
@@ -366,7 +367,6 @@ class RelayProvider(Provider):
366
367
  provider_request.status = ProviderRequestStatus.EXECUTION_FAILED
367
368
  return
368
369
 
369
- relay_status = RelayExecutionStatus.WAITING
370
370
  url = "https://api.relay.link/requests/v2"
371
371
  headers = {"accept": "application/json"}
372
372
  params = {
@@ -384,11 +384,16 @@ class RelayProvider(Provider):
384
384
  "status", str(RelayExecutionStatus.WAITING)
385
385
  )
386
386
  execution_data.message = str(relay_status)
387
+ else:
388
+ provider_request.status = ProviderRequestStatus.EXECUTION_UNKNOWN
389
+ return
387
390
  response.raise_for_status()
388
391
  except Exception as e:
389
392
  self.logger.error(
390
393
  f"[RELAY PROVIDER] Failed to update status for request {provider_request.id}: {e}"
391
394
  )
395
+ provider_request.status = ProviderRequestStatus.EXECUTION_UNKNOWN
396
+ return
392
397
 
393
398
  if relay_status == RelayExecutionStatus.SUCCESS:
394
399
  self.logger.info(
@@ -422,6 +427,7 @@ class RelayProvider(Provider):
422
427
  elif relay_status in (
423
428
  RelayExecutionStatus.PENDING,
424
429
  RelayExecutionStatus.DELAYED,
430
+ RelayExecutionStatus.WAITING,
425
431
  ):
426
432
  provider_request.status = ProviderRequestStatus.EXECUTION_PENDING
427
433
  else: