Browse Source

revert change to example for ApiPromise in types/README.md

Mokhtar Naamani 4 years ago
parent
commit
122b09371e
1 changed files with 1 additions and 3 deletions
  1. 1 3
      types/README.md

+ 1 - 3
types/README.md

@@ -26,9 +26,7 @@ async function main() {
   const provider = new WsProvider('ws://127.0.0.1:9944')
 
   // Create the API and wait until ready
-  const api = new ApiPromise({ provider, types })
-
-  await api.isReady
+  const api = await ApiPromise.create({ provider, types })
 
   // Retrieve the chain & node information information via rpc calls
   const [chain, nodeName, nodeVersion] = await Promise.all([