pokt-network / wallet

A simple web wallet to handle your Pocket Network accounts.
wallet-three-orpin.vercel.app
MIT License
8 stars 14 forks source link

[BUG REPORT] Wallet shows 0 balance #412

Closed fredteumer closed 1 year ago

fredteumer commented 1 year ago

Describe the bug After upgrading some regions to V2, the RPC connection to the POKT Network appears fragmented and

To Reproduce Steps to reproduce the behavior:

  1. Go to https://wallet.pokt.network/
  2. Click on Import
  3. Login with your preferred method (private key or keyfile)
  4. See that your previous balance is now 0

Expected behavior Instead, upon logging into the wallet it should show the correct balance as in when querying direct to the pokt blockchain.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context This seems to be an issue related to the recent deployment of V2 Portal and the ability to process RPC on the POKT Network

fredteumer commented 1 year ago

Current GATEWAY_BASE_URL per the code: https://github.com/pokt-foundation/wallet/blob/95b45a6c47b4190a9106ab46c6a3c8e0f54231ea/.github/workflows/production.yml#L46

fredteumer commented 1 year ago

nslookup mainnet.gateway.pokt.network

curl --location 'http://mainnet.gateway.pokt.network/v1/lb/60a2ac11b1747c6552385c61/' \
--header 'User-Agent: pocket-debug' \
--header 'Content-Type: application/json' \
--data '{                                  
    "address": "0845e5c90c16ce28ade84d7560597e19070d3338",
    "height": 86311                                       
}'

versus middleware.us-west2-prod.v2.pokt.network

curl --location 'https://mainnet.middleware.us-west2-prod.v2.pokt.network/v1/lb/6244818c00b9f0003ad1b619' \
--header 'User-Agent: pocket-debug' \
--header 'Content-Type: application/json' \
--data '{
    "address": "0845e5c90c16ce28ade84d7560597e19070d3338",
    "height": 86311
}'
{"jsonrpc":"2.0","id":"0","error":{"code":-32603,"message":"error processing the request: Error parsing relay: Invalid relay data length: 0"}}%
fredteumer commented 1 year ago

We've isolated the issue that it is a middleware issue with V2. V2 has a strict parsing on JSON-RPC standard which is causing the non-JSON-RPC compliant Pocket Network calls to fail.

fredteumer commented 1 year ago

Issue was temporarily solved by rolling back V2. Waiting on patch to loosen JSON-RPC validations for the POKT network

fredteumer commented 1 year ago

Issue is solved in V2 with this PR: https://github.com/pokt-foundation/portal-middleware/pull/289. Closing this bug :bug: