fallen-icarus / p2p-wallet

A fully p2p desktop Cardano wallet with builtin DeFi support, and a transaction builder for executing multiple actions in one transaction.
Apache License 2.0
8 stars 0 forks source link

Adding a second paired wallet fails #3

Open TerminadaPool opened 1 week ago

TerminadaPool commented 1 week ago

I already have one paired wallet working. However, when I try to add a second paired wallet (with staking), after completing the passphrase entry on my Trezor device for the payment key and staking key, the screen shows "Syncing wallet..." followed by the following error message:

"FailureResponse (Request {requestPath = (BaseUrl {baseUrlScheme = Https, baseUrlHost = \"api.koios.rest\", baseUrlPort = 443, baseUrlPath = \"api/v1\"},\"/drep_info\"), requestQueryString = fromList [(\"select\",Just \"drep_id%2Chas_script%2Cregistered%2Cdeposit%2Cactive%2Cexpires_epoch_no%2Camount%2Cmeta_url\")], requestBody = Just ((),application/json;charset=utf-8), requestAccept = fromList [application/json;charset=utf-8,application/json], requestHeaders = fromList [], requestHttpVersion = HTTP/1.1, requestMethod = \"POST\"}) (Response {responseStatusCode = Status {statusCode = 400, statusMessage = \"Bad Request\"}, responseHeaders = fromList [(\"transfer-encoding\",\"chunked\"),(\"date\",\"Wed, 20 Nov 2024 10:38:19 GMT\"),(\"content-type\",\"application/json; charset=utf-8\"),(\"x-frame-options\",\"DENY\")], responseHttpVersion = HTTP/1.1, responseBody = \"{\\"code\\":\\"42703\\",\\"details\\":null,\\"hint\\":null,\\"message\\":\\"column pgrst_call.meta_url does not exist\\"}\"})"

fallen-icarus commented 1 week ago

This error is when the p2p-wallet tries to look up the information for the DRep the stake address is delegated to. On testnet, Koios returns the DRep's url with the json key meta_url, but on mainnet the key is url. I didn't catch this before, but there is now an issue open on Koios about this - the networks should use the same json keys.

I will look to add a workaround until Koios standardizes the field name.

fallen-icarus commented 1 week ago

Koios just pushed a release that has a fix for the field names not being the same across the networks. It should take effect on Nov 29th. I'll leave this issue open until I can confirm it works.