Skip to content

Commit

Permalink
Pairing peer metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
flypaper0 committed Dec 21, 2022
1 parent 8db3be7 commit bfc2778
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sources/WalletConnectSign/Engine/Common/ApproveEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ final class ApproveEngine {
throw Errors.relayNotFound
}

if let pairingTopic = try? sessionToPairingTopic.get(key: topic) {
pairingRegisterer.updateMetadata(pairingTopic, metadata: proposal.proposer.metadata)
}

// TODO: Test expiration times
let expiry = Date()
.addingTimeInterval(TimeInterval(WCSession.defaultTimeToLive))
Expand All @@ -137,7 +141,8 @@ final class ApproveEngine {
peerParticipant: proposal.proposer,
settleParams: settleParams,
requiredNamespaces: proposal.requiredNamespaces,
acknowledged: false)
acknowledged: false
)

logger.debug("Sending session settle request")

Expand Down Expand Up @@ -343,6 +348,7 @@ private extension ApproveEngine {
acknowledged: true
)
sessionStore.setSession(session)

Task(priority: .high) {
try await networkingInteractor.respondSuccess(topic: payload.topic, requestId: payload.id, protocolMethod: protocolMethod)
}
Expand Down

0 comments on commit bfc2778

Please sign in to comment.