mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2025-01-01 01:27:54 +01:00
Merge pull request #106 from michielmulders/basic-usage-example-fix-code
Small code change - fix
This commit is contained in:
commit
ad89f6f89c
@ -212,7 +212,7 @@ Bob is the new owner:
|
|||||||
|
|
||||||
.. code-block:: js
|
.. code-block:: js
|
||||||
|
|
||||||
console.log('Is Bob the owner?', tx['outputs'][0]['public_keys'][0] == bob.publicKey)
|
console.log('Is Bob the owner?', txTransferBobSigned['outputs'][0]['public_keys'][0] == bob.publicKey)
|
||||||
// Output: true
|
// Output: true
|
||||||
|
|
||||||
Alice is the former owner:
|
Alice is the former owner:
|
||||||
@ -347,11 +347,11 @@ Recap: Asset Creation & Transfer
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log('Response from BDB server:', res)
|
console.log('Response from BDB server:', res)
|
||||||
return conn.pollStatusAndFetchTransaction(txTransferBobSigned.id)
|
return conn.pollStatusAndFetchTransaction(res.id)
|
||||||
})
|
})
|
||||||
.then(tx => {
|
.then(tx => {
|
||||||
console.log('Is Bob the owner?', tx['outputs'][0]['public_keys'][0] == bob.publicKey)
|
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
|
// Search for asset based on the serial number of the bicycle
|
||||||
.then(() => conn.searchAssets('Bicycle Inc.'))
|
.then(() => conn.searchAssets('Bicycle Inc.'))
|
||||||
|
Loading…
Reference in New Issue
Block a user