Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to visit YOK page #1574

Closed
Keith-CY opened this issue Jan 4, 2024 · 2 comments
Closed

Fail to visit YOK page #1574

Keith-CY opened this issue Jan 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Keith-CY
Copy link
Member

Keith-CY commented Jan 4, 2024

https://v1.gwscan.com/tokens/native

Visit YOK detail and get an error by request

curl 'https://api.v1.gwscan.com/graphql' \
  -H 'authority: api.v1.gwscan.com' \
  -H 'accept: application/json' \
  -H 'accept-language: en,de;q=0.9,zh-CN;q=0.8,zh;q=0.7,am;q=0.6' \
  -H 'content-type: application/json' \
  -H 'dnt: 1' \
  -H 'origin: https://v1.gwscan.com' \
  -H 'referer: https://v1.gwscan.com/' \
  -H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
  --data-raw '{"query":"\n  query ($id: Int) {\n    token: udt(input: { id: $id }) {\n      id\n      name\n      symbol\n      icon\n      type\n      bridge_account_id\n      eth_type\n      decimal\n      official_site\n      description\n      supply\n      holders_count\n      contract_address_hash\n      token_exchange_rate {\n        exchange_rate\n        symbol\n        timestamp\n      }\n    }\n  }\n","variables":{"id":133}}' \
  --compressed

The response is 500 Internal Server Error

@Keith-CY Keith-CY added the bug Something isn't working label Jan 4, 2024
@zmcNotafraid
Copy link
Member

The reason was exchange_rate returns 1 but in graphql the exchange_rate type was decimal.So it caused error.
PR: #1577

@zmcNotafraid zmcNotafraid moved this to ✅ Done in Layer2 Explorer Jan 4, 2024
@Keith-CY
Copy link
Member Author

Keith-CY commented Jan 4, 2024

Verified

@Keith-CY Keith-CY closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants