Closed skullnbonesdao closed 2 years ago
....[update]
So I found the GmOrderbookService class by now which should do exactly what i want.
But trying to implement it gives me the following error:
Uncaught (in promise) TypeError: anchor_1.Wallet is not a constructor
GmEventService GmEventService.ts:48
GmOrderbookService GmOrderbookService.ts:46
CodeSandbox:
I can confirm I have the same exact error with GmOrderbookService
Hi @skullnbonesdao @redspatula - we're taking a look into this. Thanks for the report!
Quick update on this is that it appears that this issue is specific to the browser environment. Running the service inside of a Node.js server, for example, with the same code linked above works just fine.
Obviously this is a client side package though so we should expect it to work properly in the browser, so we'll keep digging :+1:
Don't really know if this is the exact issue here but it seems like its related (since a import gets converted into a require when running npm build
) maybe this helps:
There seems to be also a update in the anchor
package since there is an issue with that exact import/require statement:
"@project-serum/anchor": "^0.24.2" => 0.25.0
Hope this helps :pray:
Thanks for the update. I no longer have that bug. Site is up and running now again =D
Awesome, thanks for the confirmation @redspatula. Closing this issue as completed for now but feel free to re-flag if anyone else is still experiencing it.
Problem
Get all open orders for assets at once. Cause running
getOpenOrdersForAssets
in a loop causes to many request and my current solution is using a rate-limit.Solution
where
Alternatives Considered
rate limiting?
Notes
If there is already a way please let me know. Thanks S&B