Skip to content

Commit

Permalink
Add changelog & make Raiden.state public
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevmatos committed Feb 18, 2020
1 parent c3c9538 commit 41069c3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions raiden-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]
### Added
- [#614] Implement state upgrades and migration
- [#613] Implement waiting for confirmation blocks on on-chain transactions (configurable)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion raiden-ts/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */
export { Raiden } from './raiden';
export { RaidenState } from './state';
export { RaidenState, encodeRaidenState } from './state';
export { RaidenEvent, RaidenAction } from './actions';
export { ShutdownReason } from './constants';
export { RaidenSentTransfer, RaidenSentTransferStatus } from './transfers/state';
Expand Down
13 changes: 9 additions & 4 deletions raiden-ts/src/raiden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ export class Raiden {
* <li>number index of a remote account loaded in provider
* (e.g. 0 for Metamask's loaded account)</li>
* </ul>
* @param storageOrState - Storage/localStorage-like synchronous object where to load and store
* current state or initial RaidenState-like object instead. In this case, user must listen
* state$ changes and update them on whichever persistency option is used
* @param storageOrState - Storage/localStorage-like object from where to load and store current
* state, initial RaidenState-like object, or a { storage; state? } object containing both.
* If a storage isn't provided, user must listen state$ changes on ensure it's persisted.
* @param contracts - Contracts deployment info
* @param config - Raiden configuration
* @param subkey - Whether to use a derived subkey or not
Expand Down Expand Up @@ -361,7 +361,12 @@ export class Raiden {
this.store.dispatch(raidenShutdown({ reason: ShutdownReason.STOP }));
}

private get state(): RaidenState {
/**
* Get current RaidenState object. Can be serialized safely with [[encodeRaidenState]]
*
* @returns Current Raiden state
*/
public get state(): RaidenState {
return this.store.getState();
}

Expand Down

0 comments on commit 41069c3

Please sign in to comment.