Open Nana-EC opened 3 years ago
Can you explain ?
I've updated the Hedera client and associated uses to ensure it's only created one (except for the admin apis where injecting a client into the Verticle is problematic unless we only have one instance of the admin vertical - which may be acceptable for low throughput admin requests)
I've also created a new constructor for the HederaClient which accepts all parameters as variables such that we can create one without a dependency on .env.
Although, seeing the code uses .env, isn't there value in supplying a test .env file in order to test all is well, rather than override and therefore skip those lines of code during testing ?
Is your feature request related to a problem? Please describe. Currently each call to
HederaClient.getClient()
creates a new SDK client and doesn't close it's connections Additionally the "clients" that interact with the network are classes that offer static methods to run single operations. There may be improvements that could be made to allow for easy referencing and potential performance gainsDescribe the solution you'd like
TokenClient
. Letcreate()
instead take extracted String contents. This should make it easier to testDescribe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context