Uniswap / interface

🦄 Open source interfaces for the Uniswap protocol
https://app.uniswap.org
GNU General Public License v3.0
4.95k stars 5.02k forks source link

Incomplete User Portfolio Display when Connected with Blocto Wallet(SCW) #7661

Open q20274982 opened 8 months ago

q20274982 commented 8 months ago

I encountered an issue when connecting Blocto wallet(smart contract wallet) to Uniswap through WalletConnect and hope to receive your assistance. Here are the details of the problem I encountered:

Below is the address I was using. The assets are correctly listed on BSC Scan: https://bscscan.com/address/0xA96dd65712c9DaDdBF40Dee83E3Ec11DDe404A49

wongzigii commented 7 months ago

We are facing the same issue using Loopring Smart Wallet.

wongzigii commented 7 months ago
curl 'https://interface.gateway.uniswap.org/v1/graphql' \
-X 'POST' \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'Sec-Fetch-Site: same-site' \
-H 'Accept-Language: zh-CN,zh-Hans;q=0.9' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Host: interface.gateway.uniswap.org' \
-H 'Origin: https://app.uniswap.org' \
-H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148' \
-H 'Referer: https://app.uniswap.org/' \
-H 'Content-Length: 1280' \
-H 'Connection: keep-alive' \
-H 'Sec-Fetch-Dest: empty' \
--data-binary '{"operationName":"PortfolioBalances","variables":{"ownerAddress":"0x505B73356fed1c03901889B1339E2674c2a1cF76","chains":["ETHEREUM","POLYGON","CELO","OPTIMISM","ARBITRUM","BNB","AVALANCHE","BASE"]},"query":"query PortfolioBalances($ownerAddress: String!, $chains: [Chain!]!) {\n  portfolios(ownerAddresses: [$ownerAddress], chains: $chains) {\n    id\n    tokensTotalDenominatedValue {\n      id\n      value\n      __typename\n    }\n    tokensTotalDenominatedValueChange(duration: DAY) {\n      absolute {\n        id\n        value\n        __typename\n      }\n      percentage {\n        id\n        value\n        __typename\n      }\n      __typename\n    }\n    tokenBalances {\n      ...PortfolioTokenBalanceParts\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment PortfolioTokenBalanceParts on TokenBalance {\n  id\n  quantity\n  denominatedValue {\n    id\n    currency\n    value\n    __typename\n  }\n  token {\n    id\n    chain\n    address\n    name\n    symbol\n    standard\n    decimals\n    __typename\n  }\n  tokenProjectMarket {\n    id\n    pricePercentChange(duration: DAY) {\n      id\n      value\n      __typename\n    }\n    tokenProject {\n      id\n      logoUrl\n      isSpam\n      __typename\n    }\n    __typename\n  }\n  __typename\n}"}'

Same Error ExternalAPIError here.

wongzigii commented 7 months ago

I'd like to fix this issue and submit a PR, can someone point me why the GraphQL in curl request in not valid?

The portfolios field can not query.

The type TokenBalance and Chain can not find.

image

Also check out https://github.com/Uniswap/v3-subgraph/blob/main/schema.graphql#L1 too.