From 566b694f82acd41d18a135a2818e607e88ce0ca0 Mon Sep 17 00:00:00 2001 From: Andrey Scherbovich Date: Fri, 9 Jul 2021 16:30:28 +0200 Subject: [PATCH] add didUpdate session to server delegate --- Sources/PublicInterface/Server.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/PublicInterface/Server.swift b/Sources/PublicInterface/Server.swift index f35b7d7e..dc23ce7d 100644 --- a/Sources/PublicInterface/Server.swift +++ b/Sources/PublicInterface/Server.swift @@ -23,6 +23,9 @@ public protocol ServerDelegate: AnyObject { /// Called only when the session is disconnect with intention of the dApp or the Wallet. func server(_ server: Server, didDisconnect session: Session) + + /// Called only when the session is updated with intention of the dAppt. + func server(_ server: Server, didUpdate session: Session) } open class Server: WalletConnect { @@ -202,6 +205,7 @@ extension Server: UpdateSessionHandlerDelegate { var updatedSesson = session updatedSesson.walletInfo = updatedInfo communicator.addOrUpdateSession(updatedSesson) + delegate?.server(self, didUpdate: updatedSesson) } } }