Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor TokenNetwork events fetching #1822

Merged
merged 3 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions raiden-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [#1690] Fix LockExpired with empty balanceHash verification
- [#1698] Fix estimateGas errors on channelOpen not properly being handled
- [#1761] Fix deposit error on openChannel not rejecting promise
- [#1787] Fix TokenNetwork monitoring losing events

### Added
- [#1374] Monitors MonitoringService contract and emit event when MS acts
Expand All @@ -25,6 +26,7 @@
- [#1657] Expose RaidenChannel's id,settleTimeout,openBlock as required properties
- [#1708] Expose RaidenTransfer's secret as optional property
- [#1705] All transfers become monitored per default to make receiving transfers safe
- [#1822] Refactor and optimize TokenNetwork events monitoring: one filter per Tokennetwork

[#837]: https://github.com/raiden-network/light-client/issues/837
[#1374]: https://github.com/raiden-network/light-client/issues/1374
Expand All @@ -44,6 +46,8 @@
[#1705]: https://github.com/raiden-network/light-client/issues/1705
[#1711]: https://github.com/raiden-network/light-client/pull/1711
[#1761]: https://github.com/raiden-network/light-client/issues/1761
[#1787]: https://github.com/raiden-network/light-client/issues/1787
[#1822]: https://github.com/raiden-network/light-client/pull/1822

## [0.9.0] - 2020-05-28
### Added
Expand Down
9 changes: 5 additions & 4 deletions raiden-ts/src/channels/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const tokenMonitored = createAction(
}),
t.partial({
fromBlock: t.number,
toBlock: t.number,
}),
]),
);
Expand Down Expand Up @@ -60,12 +61,12 @@ export namespace channelOpen {
}

/* Channel with meta:ChannelId + payload.id should be monitored */
export const channelMonitor = createAction(
'channel/monitor',
t.intersection([t.type({ id: t.number }), t.partial({ fromBlock: t.number })]),
export const channelMonitored = createAction(
'channel/monitored',
t.type({ id: t.number }),
ChannelId,
);
export interface channelMonitor extends ActionType<typeof channelMonitor> {}
export interface channelMonitored extends ActionType<typeof channelMonitored> {}

export const channelDeposit = createAsyncAction(
ChannelId,
Expand Down
Loading