From 47b214dd7ebe71458c15fdbe5cf21855a33d660e Mon Sep 17 00:00:00 2001 From: maayan Date: Tue, 8 Aug 2023 18:41:11 -0400 Subject: [PATCH] devnet as default network --- .../typescript/sdk_v2/src/utils/const.ts | 2 +- .../sdk_v2/tests/unit/aptos_config.test.ts | 21 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ecosystem/typescript/sdk_v2/src/utils/const.ts b/ecosystem/typescript/sdk_v2/src/utils/const.ts index 7fc138d12cd7b1..9ab4ac01bf3c01 100644 --- a/ecosystem/typescript/sdk_v2/src/utils/const.ts +++ b/ecosystem/typescript/sdk_v2/src/utils/const.ts @@ -1,3 +1,3 @@ import { Network } from "./api-endpoints"; -export const DEFAULT_NETWORK = Network.TESTNET; +export const DEFAULT_NETWORK = Network.DEVNET; diff --git a/ecosystem/typescript/sdk_v2/tests/unit/aptos_config.test.ts b/ecosystem/typescript/sdk_v2/tests/unit/aptos_config.test.ts index 97c17eb93ae3e6..6b72edabc5a80b 100644 --- a/ecosystem/typescript/sdk_v2/tests/unit/aptos_config.test.ts +++ b/ecosystem/typescript/sdk_v2/tests/unit/aptos_config.test.ts @@ -2,23 +2,24 @@ import { Aptos, AptosConfig } from "../../src"; import { Network } from "../../src/utils/api-endpoints"; describe("aptos config", () => { - test("it should set TESTNET network if network is not provided", async () => { + test("it should set DEVNET network if network is not provided", async () => { const aptos = new Aptos(); - expect(aptos.config.network).toEqual("testnet"); - expect(aptos.config.fullnode).toEqual("https://fullnode.testnet.aptoslabs.com/v1"); - expect(aptos.config.faucet).toEqual("https://faucet.testnet.aptoslabs.com"); - expect(aptos.config.indexer).toEqual("https://indexer-testnet.staging.gcp.aptosdev.com/v1/graphql"); + expect(aptos.config.network).toEqual("devnet"); + expect(aptos.config.fullnode).toEqual("https://fullnode.devnet.aptoslabs.com/v1"); + expect(aptos.config.faucet).toEqual("https://faucet.devnet.aptoslabs.com"); + expect(aptos.config.indexer).toEqual("https://indexer-devnet.staging.gcp.aptosdev.com/v1/graphql"); }); test("it should set urls based on the provided network", async () => { const settings: AptosConfig = { - network: Network.DEVNET, + network: Network.TESTNET, }; const aptos = new Aptos(settings); - expect(aptos.config.network).toEqual("devnet"); - expect(aptos.config.fullnode).toEqual("https://fullnode.devnet.aptoslabs.com/v1"); - expect(aptos.config.faucet).toEqual("https://faucet.devnet.aptoslabs.com"); - expect(aptos.config.indexer).toEqual("https://indexer-devnet.staging.gcp.aptosdev.com/v1/graphql"); + console.log(Network.DEVNET === "devnet"); + expect(aptos.config.network).toEqual("testnet"); + expect(aptos.config.fullnode).toEqual("https://fullnode.testnet.aptoslabs.com/v1"); + expect(aptos.config.faucet).toEqual("https://faucet.testnet.aptoslabs.com"); + expect(aptos.config.indexer).toEqual("https://indexer-testnet.staging.gcp.aptosdev.com/v1/graphql"); }); test("it should set urls based on a local network", async () => {