forked from Galactic/galactic-bot
actually delete transaction once it's concluded
This commit is contained in:
parent
e63fc89c55
commit
87f7c08f8a
@ -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 = {}) {
|
||||
|
Loading…
Reference in New Issue
Block a user