From 7f49f67cdae51134e311d3534ffcd233b7f85f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 11 May 2017 17:31:06 +0200 Subject: [PATCH] Adjust README.md --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 354798f..dbfbb7d 100644 --- a/README.md +++ b/README.md @@ -75,13 +75,10 @@ const tx = driver.Transaction.makeCreateTransaction( const txSigned = driver.Transaction.signTransaction(tx, alice.privateKey); // send it off to BigchainDB -driver.Connection - .postTransaction(txSigned, API_PATH) - .then((res) => { - // request the status of the transaction - driver.Connection - .getStatus(txSigned.id, API_PATH) - .then((res) => console.log('Transaction status:', res.status))}); +let conn = driver.Connection(PATH); +conn.postTransaction(txSigned) + .then(() => conn.getStatus(txSigned.id)) + .then((res) => console.log('Transaction status:', res.status)); ``` You may also be interested in some [long-form tutorials with actual code](https://github.com/bigchaindb/kyber).