This commit is contained in:
2026-04-23 08:58:45 -05:00
parent 5861bb4e72
commit 8837f56540
+6 -5
View File
@@ -47,14 +47,15 @@ export class TetherClient {
mutation_id: mutation_id mutation_id: mutation_id
})); }));
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.websocketHandler.onMutation = (mutation_id, data) => { const timeoutId = setTimeout(() => {
if (mutation_id === mutation_id) { reject(new Error('Mutation timeout'));
}, 10000);
this.websocketHandler.onMutation = (incoming_id, data) => {
if (incoming_id === mutation_id) {
clearTimeout(timeoutId);
resolve(data); resolve(data);
} }
}; };
setTimeout(() => {
reject(new Error('Mutation timeout'));
}, 10000);
}); });
}; };
} }