You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.
Code v Configuration v Environment v Human v Unknown
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 Reproduce
Just send GET-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:
:<|> "wallets"
:> "externally-owned"
:> Summary "Returns a list of the available wallets."
...
:> Get '[ValidJSON] (APIResponse [EosWallet])
This tells us that if the path is /api/v1/wallets/externally-owned and the HTTP verb GET, the server should route the request to the listEosWallets handler. However, before that, we have another endpoint defined as:
:<|> "wallets" :> CaptureWalletId
:> Summary "Returns the Wallet identified by the given walletId."
:> Get '[ValidJSON] (APIResponse Wallet)
Which tells us that, if a request is made to /api/v1/wallets/{walletId} and the HTTP verb is GET, then we should the request through the getWallet handler, capturing whatever {walletId} is provided in the path.
So, externally-owned in the path is interpreted as-if it was the {walletId} from the getWallet endpoint. But this isn't a valid wallet id, hence the WalletNotFound error.
Context
GET
-request to/api/v1/wallets/externally-owned
endpoint should return the list of available EOS-wallets. However currently it always returnsWalletNotFound
error.Steps to Reproduce
GET
-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
The text was updated successfully, but these errors were encountered: