This repository was archived by the owner on Oct 30, 2023. It is now read-only.
Allow multiple accounts to coexist #165
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As I tried to work with multiple Binance accounts, I noticed, with the code following :
Situtation 1 : First account valid, second account incorrect
Both requests returns informations from the first, valid, account
The second account is considered as valid (call.execute() line 53 in BinanceApiServiceGenerator returns true for both cases)
Situation 2 : First account incorrect, second account valid
Behaves as intended, the first one throws an exception, the second one returns the balance present on the account
Situation 3 : Both accounts valid but from different Binance accounts
Not tested
The modifications I propose allows the above code to detect an invalid account no matter the order its called.
I tried to read and understand the code as much as I could but I might have done something wrong, in this case I'm curious to know what and why.
Hope I'll hear news from you.