From 1eb34b8324cb09e73f4dabe0768c37301d5c7c2f Mon Sep 17 00:00:00 2001 From: kyranjamie Date: Tue, 10 Oct 2023 15:59:14 +0200 Subject: [PATCH] feat: sBTC devenv network --- src/shared/constants.ts | 19 +++++++++++++++++++ tests/specs/settings/settings-menu.spec.ts | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/shared/constants.ts b/src/shared/constants.ts index c6ccd8fd1a0..1087a7770fe 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -33,6 +33,7 @@ export enum WalletDefaultNetworkConfigurationIds { mainnet = 'mainnet', testnet = 'testnet', signet = 'signet', + sbtcDevenv = 'sbtcDevenv', devnet = 'devnet', } @@ -137,6 +138,23 @@ const networkSignet: NetworkConfiguration = { }, }; +const networkSbtcDevenv: NetworkConfiguration = { + id: WalletDefaultNetworkConfigurationIds.sbtcDevenv, + name: 'sBTC Devenv', + chain: { + stacks: { + blockchain: 'stacks', + chainId: ChainID.Testnet, + url: 'localhost:3999', + }, + bitcoin: { + blockchain: 'bitcoin', + network: 'regtest', + url: 'localhost:8999/api', + }, + }, +}; + const networkDevnet: NetworkConfiguration = { id: WalletDefaultNetworkConfigurationIds.devnet, name: 'Devnet', @@ -163,6 +181,7 @@ export const defaultNetworksKeyedById: Record< [WalletDefaultNetworkConfigurationIds.mainnet]: networkMainnet, [WalletDefaultNetworkConfigurationIds.testnet]: networkTestnet, [WalletDefaultNetworkConfigurationIds.signet]: networkSignet, + [WalletDefaultNetworkConfigurationIds.sbtcDevenv]: networkSbtcDevenv, [WalletDefaultNetworkConfigurationIds.devnet]: networkDevnet, }; diff --git a/tests/specs/settings/settings-menu.spec.ts b/tests/specs/settings/settings-menu.spec.ts index baf7a8b5782..de19296581c 100644 --- a/tests/specs/settings/settings-menu.spec.ts +++ b/tests/specs/settings/settings-menu.spec.ts @@ -66,6 +66,6 @@ test.describe('Settings menu', () => { await page.getByTestId(SettingsSelectors.ChangeNetworkAction).click(); await page.waitForTimeout(850); const networkListItems = await page.getByTestId(SettingsSelectors.NetworkListItem).all(); - test.expect(networkListItems).toHaveLength(4); + test.expect(networkListItems).toHaveLength(5); }); });