Browse Source

ts: Fix local provider config (#286)

Armani Ferrante 4 years ago
parent
commit
b652f5f940
2 changed files with 3 additions and 3 deletions
  1. 1 1
      ts/package.json
  2. 2 2
      ts/src/provider.ts

+ 1 - 1
ts/package.json

@@ -18,7 +18,7 @@
     "lint:fix": "prettier src/** -w",
     "watch": "tsc -p tsconfig.cjs.json --watch",
     "prepublishOnly": "yarn build",
-    "docs": "typedoc --excludePrivate --out ../docs/src/.vuepress/dist/ts/ src/index.ts"
+    "docs": "typedoc --excludePrivate --includeVersion --out ../docs/src/.vuepress/dist/ts/ src/index.ts"
   },
   "dependencies": {
     "@project-serum/borsh": "^0.2.2",

+ 2 - 2
ts/src/provider.ts

@@ -43,9 +43,9 @@ export default class Provider {
    * (This api is for Node only.)
    */
   static local(url?: string, opts?: ConfirmOptions): Provider {
-    opts = opts || Provider.defaultOptions();
+    opts = opts ?? Provider.defaultOptions();
     const connection = new Connection(
-      url || "http://localhost:8899",
+      url ?? "http://localhost:8899",
       opts.preflightCommitment
     );
     const wallet = NodeWallet.local();