Skip to content

Commit

Permalink
Merge pull request #5259 from WalletConnect/refactor/session-settle-r…
Browse files Browse the repository at this point in the history
…esponse

refactor: session settle response
  • Loading branch information
ganchoradkov authored Aug 12, 2024
2 parents 9818724 + b353122 commit 550bd80
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/sign-client/src/controllers/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1555,18 +1555,18 @@ export class Engine extends IEngine {
...(sessionProperties && { sessionProperties }),
...(sessionConfig && { sessionConfig }),
};
await this.sendResult<"wc_sessionSettle">({
id: payload.id,
topic,
result: true,
throwOnFailedPublish: true,
});
const target = engineEvent("session_connect");
const listeners = this.events.listenerCount(target);
if (listeners === 0) {
throw new Error(`emitting ${target} without any listeners 997`);
}
this.events.emit(engineEvent("session_connect"), { session });
await this.sendResult<"wc_sessionSettle">({
id: payload.id,
topic,
result: true,
throwOnFailedPublish: true,
});
} catch (err: any) {
await this.sendError({
id,
Expand Down

0 comments on commit 550bd80

Please sign in to comment.