1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-11-25 20:00:19 +01:00

Small code change - fix

This commit is contained in:
michielmulders 2017-09-27 14:21:09 +02:00
parent f2fbdc79ce
commit c939977c90

View File

@ -347,11 +347,11 @@ Recap: Asset Creation & Transfer
})
.then(res => {
console.log('Response from BDB server:', res)
return conn.pollStatusAndFetchTransaction(txTransferBobSigned.id)
return conn.pollStatusAndFetchTransaction(res.id)
})
.then(tx => {
console.log('Is Bob the owner?', tx['outputs'][0]['public_keys'][0] == bob.publicKey)
console.log('Was Alice the previous owner?', txTransferBobSigned['inputs'][0]['owners_before'][0] == alice.publicKey )
console.log('Was Alice the previous owner?', tx['inputs'][0]['owners_before'][0] == alice.publicKey )
})
// Search for asset based on the serial number of the bicycle
.then(() => conn.searchAssets('Bicycle Inc.'))