Skip to content

Async Calls

Compare
Choose a tag to compare
@YameenMalik YameenMalik released this 23 Mar 00:12
· 44 commits to main since this release
0f6ac97
  • Switched to using aiohttp in api_service.py for get/post/delete calls to exchange.
  • Removed async call to get_contract_addresses() method from exchange client constructor
  • Added a new async init() method to the client that must be invoked after creating a client instance.
  • Added a top-level module, all enums, constants, etc.. are now housed in firefly_exchange_client directory in site-packages. This implies that all imports must be made from firefly_exchange_client

Breaking Change:

  • The number of arguments to client initialization are reduced to 3. The last argument user_onboarding has been removed from the constructor and is now part of the new async initialization method called init()
  • After client construction, the client must be initialized using await client.init(), without this, the user is not onboarded on to exchange and the contract addresses are not fetched from server.