Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(core-api): prevent cold wallet response #1955
I will test if the bug is also present on v2 today, I would like to get a review on whether this makes sense. All tests were done incrementally, initially the response (without account.publicKey === null) check was that of an empty cold wallet; now it simply returns an error "Account not found" (as wanted).
Types of changes
left a comment
Another solution I would prefer is to simply check wether the wallet manager has a specific address before trying to get one.
Though the comment seems to be wrong, since the WalletManager has no such function.
This way there's no need to change anything in the endpoint methods as they can
@@ Coverage Diff @@ ## develop #1955 +/- ## ========================================== - Coverage 38.61% 38.6% -0.01% ========================================== Files 354 354 Lines 7762 7764 +2 Branches 1143 1172 +29 ========================================== Hits 2997 2997 - Misses 4751 4753 +2 Partials 14 14
The method needs to be removed here https://github.com/ArkEcosystem/core/blob/develop/packages/core-transaction-pool/src/pool-wallet-manager.ts#L45 as the pool manager extends the wallet manager.