supportxmr-gui icon indicating copy to clipboard operation
supportxmr-gui copied to clipboard

API differences?

Open kic0 opened this issue 5 years ago • 6 comments

I was testing the new UI and changed the source api in script_min.js from https://supportxmr.com/api/ to https://api.xmrpool.net/ and now doesn't load block info or network and pool Hashrates, are there differences between Snipa "reference" code and sxmr API's that could explain the missing data?

By the way I was testing it over tor and the original works fine but not with Snipas pool

http://pool.xmkwypann4ly64gh.onion/

Thanks in advance

kic0 avatar Sep 25 '19 14:09 kic0

are you sure that the requests are not being blocked by your browser or a plugin like ublock?

On Wed., Sep. 25, 2019, 4:09 p.m. kic0, [email protected] wrote:

I was testing the new UI and changed the source api in script_min.js from https://supportxmr.com/api/ to https://api.xmrpool.net/ and now doesn't load block info or network and pool Hashrates, are there differences between Snipa "reference" code and sxmr API's that could explain the missing data?

Thanks in advance

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/M5M400/supportxmr-gui/issues/6?email_source=notifications&email_token=AFOTSFZWN4OYLGNIJHKFH5LQLNWKPA5CNFSM4I2NLUC2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNTUVJQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AFOTSF6DYSXKXUN3CXI64OTQLNWKPANCNFSM4I2NLUCQ .

M5M400 avatar Sep 25 '19 14:09 M5M400

With SupportXmr api works fine just changed the url in the code to Snipas API and it only blocks part of the site strangely Payments for instance are shown ok

http://node.xmr.pt/

kic0 avatar Sep 25 '19 14:09 kic0

Screenshot from 2019-09-25 16-46-16

We just added two api endpoints (/network/chart/difficulty and /pool/motd). It seems /pool/motd is not yet avail on xmrpool.net - I wonder if it missing is breaking the js, but it should be unrelated.

@Thunderosa ?

M5M400 avatar Sep 25 '19 14:09 M5M400

Well, so there are some very specific data things happening with this UI that would be pretty sensitive to any API differences.

The motd error is self explainatory,...but eff and tme missing is something else. Without being able to see exactly where it's choking, I'm guessing something with the blocks endpoint specificially. I think you were on the Pool Blocks page when you got this error?

If so, for the first page of results the blocks in the list and the blocks in the chart are the same data source and then the blocks list starts using it's own lookup on page 2.

So that would mean your issue is probably in the 'block' mode of the data function (as opposed to 'blockhistory').

That section requires the following endpoints from the API: 'hash', 'height', 'value' (in atomic units), 'shares', 'diff' & 'valid'

$D['block'] being populated would be the object to check first.

Thunderosa avatar Sep 25 '19 16:09 Thunderosa

Nope, nevermind,...you found a good bug. It's because you haven't found a block within the window of time. I'll correct this for the next version.

For the motd error a quick fix would be to comment out the line: url = 'pool/motd'; If that url variable isn't set then it won't try to fix. If you decide you want the feature, you can setup the endpoint and restore the value.

Thunderosa avatar Sep 25 '19 16:09 Thunderosa

Awesome thanks for the help! I'll update and let you know :)

kic0 avatar Sep 25 '19 22:09 kic0