actually delete transaction once it's concluded

This commit is contained in:
Erik 2020-04-14 22:01:32 +03:00
parent e63fc89c55
commit 87f7c08f8a

View File

@ -15,12 +15,16 @@ class TransactionHandler {
_receive(message) {
if(!message.transactionID) return;
if(!message.transactionID) return undefined;
const transaction = this.transactions.get(message.transactionID);
if(!transaction) return undefined;
if(message.error) transaction.reject(message.message);
else transaction.resolve(message.result);
this.transactions.delete(message.transactionID);
}
_send(message, options = {}) {