Support multiple instances
Opened this issue · 2 comments
sterlu commented
Currently, it doesn't seem possible to instantiate the package for multiple networks within the same execution context. I wanted to move the routing packages and logic to the backend and provide a service that routes a swap on a given network/rpc, but I believe re-initing the curve package if 2+ requests come in simultaneously might create an issue. Perhaps it would be better to export the whole class rather that a singleton instance? I understand this would require a refactor since the curve
instance is imported directly from the module, but it might be worth considering?
Macket commented
Make sense. Maybe will implement later
olivbau commented
Any news on this issue?
Is there a workaround?