Skip to content

Commit

Permalink
Merge pull request #59 from WalletConnect/zerion-changes
Browse files Browse the repository at this point in the history
add didUpdate session to server delegate
  • Loading branch information
Andrey Scherbovich authored Jul 9, 2021
2 parents c73e66d + 566b694 commit 76bd8b6
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 76bd8b6

Please sign in to comment.