(address: string)
| 380 | } |
| 381 | |
| 382 | public addCustomServer(address: string): CustomServer[] { |
| 383 | const normalizedAddress = address.trim(); |
| 384 | |
| 385 | if (this.customServers.some(s => s.address === normalizedAddress)) { |
| 386 | return this.customServers; |
| 387 | } |
| 388 | |
| 389 | const newServer: CustomServer = { |
| 390 | address: normalizedAddress, |
| 391 | enabled: true, |
| 392 | status: 'unchecked' |
| 393 | }; |
| 394 | |
| 395 | this.customServers.push(newServer); |
| 396 | this.saveCustomServersToStorage(); |
| 397 | |
| 398 | return [...this.customServers]; |
| 399 | } |
| 400 | |
| 401 | public removeCustomServer(address: string): CustomServer[] { |
| 402 | this.customServers = this.customServers.filter(s => s.address !== address); |
no test coverage detected