Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove AMM Devnet network #342

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions packages/constants/src/network/network.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,13 @@ export enum XRPLNetwork {
MAINNET = 'Mainnet',
TESTNET = 'Testnet',
DEVNET = 'Devnet',
AMM_DEVNET = 'AMM-Devnet',
CUSTOM = 'Custom'
}

export const Networks = {
[Chain.XRPL]: [
XRPLNetwork.MAINNET,
XRPLNetwork.TESTNET,
XRPLNetwork.DEVNET,
XRPLNetwork.AMM_DEVNET
]
};

export const MAINNET_CLIO_NODES = ['wss://s1.ripple.com', 'wss://s2.ripple.com'];
export const MAINNET_NODES = ['wss://xrplcluster.com', ...MAINNET_CLIO_NODES];
export const TESTNET_NODES = ['wss://s.altnet.rippletest.net:51233', 'wss://testnet.xrpl-labs.com'];
export const DEVNET_NODES = ['wss://s.devnet.rippletest.net:51233'];
export const AMM_DEVNET_NODES = ['wss://amm.devnet.rippletest.net:51233'];

export type Network = XRPLNetwork;

Expand All @@ -39,7 +28,6 @@ interface NetworkConfigXRPL {
[XRPLNetwork.MAINNET]: NetworkNode;
[XRPLNetwork.TESTNET]: NetworkNode;
[XRPLNetwork.DEVNET]: NetworkNode;
[XRPLNetwork.AMM_DEVNET]: NetworkNode;
[XRPLNetwork.CUSTOM]: NetworkNode;
}

Expand Down Expand Up @@ -71,13 +59,6 @@ export const NETWORK: ChainConfig = {
nodes: DEVNET_NODES,
description: 'A preview of upcoming features, where unstable changes are tested out.'
},
[XRPLNetwork.AMM_DEVNET]: {
chain: Chain.XRPL,
name: XRPLNetwork.AMM_DEVNET,
server: AMM_DEVNET_NODES[0],
nodes: AMM_DEVNET_NODES,
description: 'XLS-30d Automated Market Makers preview network.'
},
[XRPLNetwork.CUSTOM]: {
chain: Chain.XRPL,
name: XRPLNetwork.CUSTOM,
Expand Down
41 changes: 7 additions & 34 deletions packages/extension/cypress/e2e/networks.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,33 +99,6 @@ describe('Switch networks', () => {
});
});

it('Switch from Devnet (localStorage) to AMMDevnet', () => {
// Devnet should be the network from localStorage
cy.get('div[data-testid="network-indicator"]').should('have.text', XRPLNetwork.DEVNET, {
timeout: 1500
});

// Open the change network window
cy.get('div[data-testid="network-indicator"]').click();
cy.get('div[data-testid="network-indicator-dialog"]', { timeout: 1500 })
.find('header')
.should('have.text', 'Change Network');

// Select the AMMDevnet network
cy.contains('button', XRPLNetwork.AMM_DEVNET).click();

// Make sure that the network is switched to AMMDevnet
cy.get('div[data-testid="loading"]').should('be.visible');
cy.get('div[data-testid="network-indicator"]').should('have.text', XRPLNetwork.AMM_DEVNET, {
timeout: 1500
});

// Save the current state of the localStorage
cy.window().then((win) => {
networkLocalStorage = win.localStorage.getItem('network');
});
});

it('Add a custom network', () => {
// Open the change network window
cy.get('div[data-testid="network-indicator"]').click();
Expand Down Expand Up @@ -195,12 +168,12 @@ describe('Switch networks', () => {
// Expect an error dialog when trying to delete the network we are currently connected to
cy.contains('button', 'OK', { timeout: 3000 }).should('be.visible').click();

// Connect back to the AMMDevnet network
cy.contains('button', XRPLNetwork.AMM_DEVNET).click();
// Connect back to the Devnet network
cy.contains('button', XRPLNetwork.DEVNET).click();

// Make sure that the network is switched to AMMDevnet
// Make sure that the network is switched to Devnet network
cy.get('div[data-testid="loading"]').should('be.visible');
cy.get('div[data-testid="network-indicator"]').should('have.text', XRPLNetwork.AMM_DEVNET, {
cy.get('div[data-testid="network-indicator"]').should('have.text', XRPLNetwork.DEVNET, {
timeout: 1500
});

Expand All @@ -223,9 +196,9 @@ describe('Switch networks', () => {
});
});

it('Switch from AMMDevnet (localStorage) to Mainnet', () => {
// AMMDevnet should be the network from localStorage
cy.get('div[data-testid="network-indicator"]').should('have.text', XRPLNetwork.AMM_DEVNET, {
it('Switch from Devnet (localStorage) to Mainnet', () => {
// Custom network should be the network from localStorage
cy.get('div[data-testid="network-indicator"]').should('have.text', XRPLNetwork.DEVNET, {
timeout: 1500
});

Expand Down
Loading