瀏覽代碼

api: connectApi defaults to `ws://localhost:9944`

Joystream Stats 2 年之前
父節點
當前提交
0ef70ad5a4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api.ts

+ 1 - 1
api.ts

@@ -49,7 +49,7 @@ import { WorkerId, Worker } from "@joystream/types/working-group";
 import { ProposalOf, ProposalDetailsOf } from "@joystream/types/augment/types";
 import { WorkerOf } from "@joystream/types/augment-codec/all";
 
-export const connectApi = async (url: string): Promise<ApiPromise> => {
+export const connectApi = async (url: string = "ws://localhost:9944"): Promise<ApiPromise> => {
   const provider = new WsProvider(url);
   return await ApiPromise.create({ provider, types });
 };