Hi guys.
I am with the following situation where the Channel
object I get from the Channel (...)
constructor is lost when user e.g refreshes an application page. I know that current state can be persisted by saving what state()
call returns. I would like to re acquire the same object for this already opened channel providing channel-id and state. Is this possible? It’s critical for transparent application reload/refresh.
Thanks.
Suppose in pseudo:
newChannel = await Channel ( ... ) ;
await Channel_is_open();
/* channel operations here
...
...
*/
newChannel = null; /* reference lost */
/* Want to reconnect */
newChannel = Channel ( channel-id, last_state )
await Channel_is_Open();
/* continue operations ... */
Thanks.
See: Reacquire an opened channel object without requiring leave/disconnect · Issue #651 · aeternity/aepp-sdk-js · GitHub for the related entry.