mirror of
https://github.com/bigchaindb/site.git
synced 2024-11-22 09:46:57 +01:00
flatten promises
This commit is contained in:
parent
20dec18594
commit
26d651a52c
@ -153,7 +153,10 @@ function updateMileage(assetId, mileageValue) {
|
||||
return txList.filter((tx) => inputTransactions.indexOf(tx.id) === -1)
|
||||
})
|
||||
.then((tx) => {
|
||||
conn.getTransaction(tx[0].id)
|
||||
// As there is just one input
|
||||
return conn.getTransaction(tx[0].id)
|
||||
})
|
||||
|
||||
.then((txCreated) => {
|
||||
const createTranfer = BigchainDB.Transaction.makeTransferTransaction(
|
||||
txCreated, {
|
||||
@ -173,7 +176,6 @@ function updateMileage(assetId, mileageValue) {
|
||||
document.body.innerHTML += '<h3>Transfer Transaction created</h3>';
|
||||
document.body.innerHTML += res.id
|
||||
})
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user