You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When putting order on HyperDex for example 3.77 Morty to KMD it hits status code 500(Internal server error) with message in the developer tools -> "Access to fetch at 'http://127.0.0.1:49933/' from origin 'app://-' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
I can put an order of 3 (Integer number), also can put an order of 3.7, but with more precise numbers like 3.77 and 3.777 it gets the error.
HyperDEX Nightly 0.0.0-c2d7531-19.7.24.1745
Electron 5.0.8
win32 10.0.10586
Locale: en-US
The text was updated successfully, but these errors were encountered:
Thanks for the detailed report @SvetJordanov, I'm able to reproduce this.
Unfortunately we can't read the error response due to a bug in marketmaker (see here), that's what's causing the cryptic CORS error.
However reproducing the issue and grabbing the exact request as cURL in devtools and then re-playing in a shell shows the error:
$ curl 'http://127.0.0.1:56497/' -H 'Referer: http://localhost:8080/dev.html' -H 'Origin: http://localhost:8080' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) HyperDEX/0.4.0 Chrome/73.0.3683.121 Electron/5.0.2 Safari/537.36' -H 'Content-Type: text/plain;charset=UTF-8' --data-binary '{"method":"buy","gtc":1,"base":"MORTY","rel":"RICK","price":2.1,"volume":3.7777,"userpass":"<redacted>"}' --compressed
{"error":"rpc:229] lp_ordermatch:598] The amount 7.93317000 is larger than available 5.77440600, balance: 5.774406, locked by swaps: 0.00000000"}
You can see volume is clearly set as "volume":3.7777, however marketmaker seems to interpret this as 7.93317000 for some reason. This is throwing an error because the value that marketmaker is interpreting is larger than the available balance (at least in my case).
@artemii235 are you aware of this issue? Possibly an overflow/rounding error inside marketmaker?
When putting order on HyperDex for example 3.77 Morty to KMD it hits status code 500(Internal server error) with message in the developer tools -> "Access to fetch at 'http://127.0.0.1:49933/' from origin 'app://-' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
I can put an order of 3 (Integer number), also can put an order of 3.7, but with more precise numbers like 3.77 and 3.777 it gets the error.
HyperDEX Nightly 0.0.0-c2d7531-19.7.24.1745
Electron 5.0.8
win32 10.0.10586
Locale: en-US
The text was updated successfully, but these errors were encountered: