Merge pull request #303 from ERCdEX/ercdex/send_transaction_return_txhash

_sendTransactionAsync should return txHash string
This commit is contained in:
Leonid
2018-01-03 11:53:37 +01:00
committed by GitHub

View File

@@ -238,7 +238,7 @@ export class LedgerSubprovider extends Subprovider {
this._ledgerClientIfExists = undefined; this._ledgerClientIfExists = undefined;
this._connectionLock.signal(); this._connectionLock.signal();
} }
private async _sendTransactionAsync(txParams: PartialTxParams): Promise<Web3.JSONRPCResponsePayload> { private async _sendTransactionAsync(txParams: PartialTxParams): Promise<string> {
await this._nonceLock.wait(); await this._nonceLock.wait();
try { try {
// fill in the extras // fill in the extras
@@ -252,7 +252,7 @@ export class LedgerSubprovider extends Subprovider {
}; };
const result = await this.emitPayloadAsync(payload); const result = await this.emitPayloadAsync(payload);
this._nonceLock.signal(); this._nonceLock.signal();
return result; return result.result;
} catch (err) { } catch (err) {
this._nonceLock.signal(); this._nonceLock.signal();
throw err; throw err;