ts: Fix local provider config (#286)
This commit is contained in:
parent
30a58b99e1
commit
b652f5f940
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue