Skip to content

Commit

Permalink
add didUpdate session to server delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Scherbovich committed Jul 9, 2021
1 parent f2eefeb commit 566b694
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/PublicInterface/Server.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -202,6 +205,7 @@ extension Server: UpdateSessionHandlerDelegate {
var updatedSesson = session
updatedSesson.walletInfo = updatedInfo
communicator.addOrUpdateSession(updatedSesson)
delegate?.server(self, didUpdate: updatedSesson)
}
}
}

0 comments on commit 566b694

Please sign in to comment.