sushiswap / sushi-data

A utility to query for data on SushiSwap.
MIT License
81 stars 115 forks source link

observePairs issue #47

Open aadito123 opened 3 years ago

aadito123 commented 3 years ago

Subscribing to the the observePairs observable in typings/exchange.d.ts gives the "next" function a Pair[] as the argument but it is typed as just Pair. When consoling logging the output, it shows up properly but it doesn't let you individually access and filter the data. Changing it to Pair[] fixes that issue.

export function observePairs(): { subscribe({ next, error, complete }: { next(data: Pair): any; error?(error: any): any; complete?: Function; }): any; };

is basically changed to

export function observePairs(): { subscribe({ next, error, complete }: { next(data: Pair[]): any; error?(error: any): any; complete?: Function; }): any; };

This makes it much easier to use.