Arnaud 7065718e09
feat(marketplace): indicate that slot is being repaired when trying to download (#1083)
* Indicate that slot is being repaired when trying to download

* Fix tests

* Apply nph

* Calculate the repair collateral when adding the item into the queue

* Add slotCollateral calculation with getRequest cache and remove populationItem function

* Update with pricePerByte

* Simplify StorageAsk parameter

* Minor fixes

* Move cache request to another PR

* Rename SlotQueueItem collateral and required in init

* Use override func to optimise calls when the slot state is known

* Remove unused code

* Cosmetic change

* Use raiseMarketError helper

* Add exceptions to async pragma

* Cosmetic change

* Use raiseMarketError helper

* Let slotCollateral determines the slot sate

* Use configSync to avoid async pragma in onStorageRequested

* Add loadConfig function

* Add CatchableError to async pragma

* Add missing pragma raises errors

* Move loadConfig

* Avoid swallow CancelledError

* Avoid swallowing CancelledError

* Avoid swallowing CancelledError

* Update error messages

* Except MarketError instead of CatchableError

* Fix merge issue

* Log fatal when configuration cannot be loaded

* Propagate MarketError in slotCollateral

* Remove useless configSync

* Use result with explicit error

* Fix syntax

---------

Signed-off-by: Arnaud <arnaud@status.im>
2025-02-27 16:58:23 +00:00
..
2025-01-21 20:54:46 +00:00
2025-01-21 20:54:46 +00:00
2025-01-21 20:54:46 +00:00
2025-01-21 20:54:46 +00:00
2025-02-24 21:01:23 +00:00
2025-01-21 20:54:46 +00:00
2023-12-22 13:04:01 +01:00
2024-01-11 08:45:23 -08:00
2025-01-21 20:54:46 +00:00
2025-01-21 20:54:46 +00:00
2025-02-24 21:01:23 +00:00
2024-02-09 21:40:30 +00:00
2025-01-21 20:54:46 +00:00
2022-06-14 09:19:35 -06:00
2025-01-21 20:54:46 +00:00
2025-01-21 20:54:46 +00:00
2025-01-21 20:54:46 +00:00