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

Missing API call #24

Open
denuoweb opened this issue Dec 6, 2021 · 2 comments
Open

Missing API call #24

denuoweb opened this issue Dec 6, 2021 · 2 comments

Comments

@denuoweb
Copy link

denuoweb commented Dec 6, 2021

Expected Behavior
The Qtum Web Wallet has an API call URL pointing to a .../qrc20/${contractAddress} [1], I should be able to find this URL call in this package file, qtuminfo-api/app/router.js [2]

[1] - https://github.com/qtumproject/qtum-web-wallet/blob/9a5f2405ae6a30ab2c493074abd3b2a99b028a68/src/libs/nodes/qtumInfo.js#L31

[2] - https://github.com/qtumproject/qtuminfo-api/blob/master/app/router.js

Current Behavior
The current explorer has access to the missing API call code. [3] But the code can not be found in the github.

[3] - https://qtum.info/api/qrc20/5a4b7889cad562d6c099bf877c8f5e3d66d579f8

Steps to Reproduce
Read links 1 and 2, deploy qtuminfo-api(etc) and find that the call is missing.

Context (Environment)
I'm trying to reproduce the qtum explorer and api calls.

Detailed Description
The GET /qrc/:contract end-point is not represented in the github code. The GET /contract/:contract was the original call that was replaced but the code never made it to this github project.

@denuoweb
Copy link
Author

denuoweb commented Dec 6, 2021

#6

^ @nickpater in issue 6 could use the qrc20/${contractAddress} call if he knew it existed.

@denuoweb
Copy link
Author

I was able to produce a workaround. The problem that this causes is when running the web wallet on the info api rather than the insight api, a user is not able to add a custom token to send. I was able to produce a workaround by sending that getTokenInfo command to the insight api in qtumInfo.js by adding
const _getOld = async url => {
return (await axios.get('https://explorer.qtum.org/insight-api' + url)).data
}
and modifying
async getTokenInfo(contractAddress) {
return (await _getOld(/erc20/${contractAddress}))
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant