Skip to content

Commit

Permalink
feat: sBTC devenv network
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Oct 11, 2023
1 parent 917a00b commit 1eb34b8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export enum WalletDefaultNetworkConfigurationIds {
mainnet = 'mainnet',
testnet = 'testnet',
signet = 'signet',
sbtcDevenv = 'sbtcDevenv',
devnet = 'devnet',
}

Expand Down Expand Up @@ -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',
Expand All @@ -163,6 +181,7 @@ export const defaultNetworksKeyedById: Record<
[WalletDefaultNetworkConfigurationIds.mainnet]: networkMainnet,
[WalletDefaultNetworkConfigurationIds.testnet]: networkTestnet,
[WalletDefaultNetworkConfigurationIds.signet]: networkSignet,
[WalletDefaultNetworkConfigurationIds.sbtcDevenv]: networkSbtcDevenv,
[WalletDefaultNetworkConfigurationIds.devnet]: networkDevnet,
};

Expand Down
2 changes: 1 addition & 1 deletion tests/specs/settings/settings-menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

0 comments on commit 1eb34b8

Please sign in to comment.