Skip to content

Commit

Permalink
Feat/btc socket (#258)
Browse files Browse the repository at this point in the history
* fix: pair btc

* fix: parse pair

* fix: unsubcribe when unmount
  • Loading branch information
quangdz1704 authored May 2, 2024
1 parent 38557aa commit ed5e38e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/oraidex-common-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-common-ui",
"version": "1.0.17",
"version": "1.0.18",
"files": [
"dist/"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ export const useChartSocket = ({ currentPair, period, socketConfig }) => {
method: "SUBSCRIBE",
params: [`${currentPair.info}@${period}`]
});

return () => {
sendJsonMessage({
id: 1,
method: "UNSUBSCRIBE",
params: [`${currentPair.info}@${period}`]
});
};
}
}, [sendJsonMessage, currentPair, period]);

Expand Down

0 comments on commit ed5e38e

Please sign in to comment.