@hashgraph/hedera-wallet-connect 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/lib/dapp/index.js +12 -3
- package/package.json +1 -1
@@ -114,15 +114,24 @@ export class DAppConnector {
|
|
114
114
|
this.walletConnectClient.on('session_delete', (pairing) => {
|
115
115
|
console.log(pairing);
|
116
116
|
this.signers = this.signers.filter((signer) => signer.topic !== pairing.topic);
|
117
|
-
this.disconnect(pairing.topic);
|
118
117
|
// Session was deleted -> reset the dapp state, clean up from user session, etc.
|
118
|
+
try {
|
119
|
+
this.disconnect(pairing.topic);
|
120
|
+
}
|
121
|
+
catch (e) {
|
122
|
+
console.error(e);
|
123
|
+
}
|
119
124
|
console.log('Dapp: Session deleted by wallet!');
|
120
125
|
});
|
121
126
|
this.walletConnectClient.core.pairing.events.on('pairing_delete', (pairing) => {
|
122
|
-
// Session was deleted
|
123
127
|
console.log(pairing);
|
124
128
|
this.signers = this.signers.filter((signer) => signer.topic !== pairing.topic);
|
125
|
-
|
129
|
+
try {
|
130
|
+
this.disconnect(pairing.topic);
|
131
|
+
}
|
132
|
+
catch (e) {
|
133
|
+
console.error(e);
|
134
|
+
}
|
126
135
|
console.log(`Dapp: Pairing deleted by wallet!`);
|
127
136
|
// clean up after the pairing for `topic` was deleted.
|
128
137
|
});
|