(address: string)
| 399 | } |
| 400 | |
| 401 | public addCustomServer(address: string): CustomServer[] { |
| 402 | const normalizedAddress = address.trim(); |
| 403 | |
| 404 | if (this.customServers.some(s => s.address === normalizedAddress)) { |
| 405 | return this.customServers; |
| 406 | } |
| 407 | |
| 408 | const newServer: CustomServer = { |
| 409 | address: normalizedAddress, |
| 410 | enabled: true, |
| 411 | status: 'unchecked' |
| 412 | }; |
| 413 | |
| 414 | this.customServers.push(newServer); |
| 415 | this.saveCustomServersToStorage(); |
| 416 | |
| 417 | return [...this.customServers]; |
| 418 | } |
| 419 | |
| 420 | public removeCustomServer(address: string): CustomServer[] { |
| 421 | this.customServers = this.customServers.filter(s => s.address !== address); |
no test coverage detected