File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {
1717
1818import { EventListener , EVENTS } from "../connection/EventListener" ;
1919import { ServerMessageEvent } from "../connection/ServerMessage" ;
20+ import { SessionConfig } from "../connection/SessionConfig" ;
2021import { WalletSDKConnection } from "../connection/WalletSDKConnection" ;
2122import { ScopedLocalStorage } from "../lib/ScopedLocalStorage" ;
2223import { WalletUI , WalletUIOptions } from "../provider/WalletUI" ;
@@ -122,6 +123,19 @@ export class WalletSDKRelay extends WalletSDKRelayAbstract {
122123 this . eventListener ,
123124 ) ;
124125
126+ this . subscriptions . add (
127+ this . connection . sessionConfig$ . subscribe ( {
128+ next : sessionConfig => {
129+ this . onSessionConfigChanged ( sessionConfig ) ;
130+ } ,
131+ error : ( ) => {
132+ this . eventListener ?. onEvent ( EVENTS . GENERAL_ERROR , {
133+ message : "error while invoking session config callback" ,
134+ } ) ;
135+ } ,
136+ } ) ,
137+ ) ;
138+
125139 this . subscriptions . add (
126140 this . connection . incomingEvent$
127141 . pipe ( filter ( m => m . event === "Web3Response" ) )
@@ -1166,4 +1180,6 @@ export class WalletSDKRelay extends WalletSDKRelayAbstract {
11661180 break ;
11671181 }
11681182 }
1183+
1184+ protected onSessionConfigChanged ( _nextSessionConfig : SessionConfig ) : void { }
11691185}
You can’t perform that action at this time.
0 commit comments