Skip to content

Commit

Permalink
🐛 fix volumes update when received an event from bigmap
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin Burg committed Sep 5, 2023
1 parent fa693fc commit 78c6d1a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions batcher-ui/src/commands/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,16 @@ export const newEventCmd = (event: BigMapEvent) => {
}
if (eventData.path === 'batch_set.batches') {
console.log('🚀 ~ file: events.ts:67 ~ eventData:', eventData);
const data = eventData.content.value as Batch;
dispatch(getBatcherStatus());
dispatch(
updateVolumes(
toVolumes(data.volumes, {
buyDecimals: parseInt(data.pair.decimals_1, 10),
sellDecimals: parseInt(data.pair.decimals_0, 10),
})
)
);
return Promise.resolve();
}
if (eventData.path === 'user_batch_ordertypes') {
Expand Down

0 comments on commit 78c6d1a

Please sign in to comment.