Skip to content

Commit

Permalink
Merge pull request #1406 from WalletConnect/reorder-propose-response-…
Browse files Browse the repository at this point in the history
…and-settle-request

Reorder propose response and settle request
  • Loading branch information
llbartekll authored Aug 23, 2024
2 parents b9246a5 + f4d4ba4 commit c15347b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Sources/WalletConnectSign/Engine/Common/ApproveEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,19 @@ final class ApproveEngine {

do {
let session: WCSession = try await settleRequestTask
eventsClient.saveTraceEvent(SessionApproveExecutionTraceEvents.sessionSettleSuccess)
logger.debug("Session settle request has been successfully processed")

do {
_ = try await proposeResponseTask
eventsClient.saveTraceEvent(SessionApproveExecutionTraceEvents.responseApproveSent)
} catch {
eventsClient.saveTraceEvent(ApproveSessionTraceErrorEvents.sessionSettleFailure)
throw error
}

sessionStore.setSession(session)

Task {
removePairing(pairingTopic: pairingTopic)
}
Expand Down

0 comments on commit c15347b

Please sign in to comment.