Closed denisshevchenko closed 5 years ago
Note: the doc has been successfully updated on develop
:wink:
https://input-output-hk.github.io/cardano-wallet/#tag/Externally-Owned-Wallets
lgtm :+1: I'll be adding more integration tests for listEosWallets in #331.
Context
`GET`-request to `/api/v1/wallets/externally-owned` endpoint should return the list of available EOS-wallets. However currently it _always_ returns `WalletNotFound` error. # Steps to ReproduceGET
-request to/api/v1/wallets/externally-owned
endpoint with any parameters.Expected behavior
Endpoint returns a list of available EOS-wallets.
Actual behavior
Endpoint always returns
WalletNotFound
error.Resolution Plan
So, look at
listEosWallets
definition:This tells us that if the path is
/api/v1/wallets/externally-owned
and the HTTP verbGET
, the server should route the request to thelistEosWallets
handler. However, before that, we have another endpoint defined as:Which tells us that, if a request is made to
/api/v1/wallets/{walletId}
and the HTTP verb isGET
, then we should the request through thegetWallet
handler, capturing whatever{walletId}
is provided in the path.So,
externally-owned
in the path is interpreted as-if it was the{walletId}
from thegetWallet
endpoint. But this isn't a valid wallet id, hence theWalletNotFound
error.PR
develop
QA