Skip to content

Commit

Permalink
[BUGFIX] Fix sendingInProgress flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
e00dan committed Aug 2, 2018
1 parent 1c2599f commit 0b0145a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Wallet/Wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export class Wallet {
};
}

let receipt;
let returnValue;
try {
if (!this.walletStates[from]) {
this.walletStates[from] = {} as AccountState;
Expand All @@ -274,22 +274,23 @@ export class Wallet {

const hash = await this.sendRawTransaction(signedTx);

receipt = await this.getTransactionReceipt(hash, from);
returnValue = await this.getTransactionReceipt(hash, from);
} catch (error) {
if (this.logger) {
this.logger.debug(error);
} else {
console.log(error);
}
return {

returnValue = {
from,
error: TxSendErrors.UNKNOWN_ERROR
};
} finally {
this.walletStates[from].sendingTxInProgress = false;
}

return receipt;
return returnValue;
}

public getAccounts() {
Expand Down

0 comments on commit 0b0145a

Please sign in to comment.