feat: make custom network key required

This commit is contained in:
alter-eggo
2023-04-01 13:15:56 +04:00
committed by Anastasios
parent 46a7e2e6d1
commit 1395afd26e
2 changed files with 6 additions and 0 deletions

View File

@@ -49,6 +49,11 @@ export function AddNetwork() {
setError('Enter a valid URL');
return;
}
if (!key) {
setError('Enter a unique key');
return;
}
setLoading(true);
setError('');
try {

View File

@@ -44,6 +44,7 @@ describe('Buy tokens test', () => {
it('unable to fetch info from node', async () => {
await networkPage.inputNetworkAddressField('https://www.google.com/');
await networkPage.inputNetworkKeyField('test-network');
await networkPage.clickAddNetwork();
await networkPage.waitForErrorMessage();
const errorMsgElement = await networkPage.page.$$(networkPage.getSelector('$errorText'));