mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
test - tx controller - fix promise handling
This commit is contained in:
parent
ab8bae421e
commit
f5de16c911
@ -270,7 +270,7 @@ describe('Transaction Controller', function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
it('does not overwrite set values', function (done) {
|
it('does not overwrite set values', function () {
|
||||||
this.timeout(15000)
|
this.timeout(15000)
|
||||||
const wrongValue = '0x05'
|
const wrongValue = '0x05'
|
||||||
|
|
||||||
@ -289,9 +289,7 @@ describe('Transaction Controller', function () {
|
|||||||
const pubStub = sinon.stub(txController.txProviderUtils, 'publishTransaction')
|
const pubStub = sinon.stub(txController.txProviderUtils, 'publishTransaction')
|
||||||
.callsArgWithAsync(1, null, originalValue)
|
.callsArgWithAsync(1, null, originalValue)
|
||||||
|
|
||||||
txController.approveTransaction(txMeta.id).then((err) => {
|
return txController.approveTransaction(txMeta.id).then(() => {
|
||||||
assert.ifError(err, 'should not error')
|
|
||||||
|
|
||||||
const result = txController.getTx(txMeta.id)
|
const result = txController.getTx(txMeta.id)
|
||||||
const params = result.txParams
|
const params = result.txParams
|
||||||
|
|
||||||
@ -303,7 +301,6 @@ describe('Transaction Controller', function () {
|
|||||||
priceStub.restore()
|
priceStub.restore()
|
||||||
signStub.restore()
|
signStub.restore()
|
||||||
pubStub.restore()
|
pubStub.restore()
|
||||||
done()
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user