Skip to content

Commit 1da98ed

Browse files
committed
refactor: remove more unused code
1 parent 2672f74 commit 1da98ed

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.coder.toolbox
33
import com.coder.toolbox.cli.CoderCLIManager
44
import com.coder.toolbox.sdk.CoderRestClient
55
import com.coder.toolbox.sdk.v2.models.WorkspaceStatus
6-
import com.coder.toolbox.settings.SettingSource
76
import com.coder.toolbox.util.CoderProtocolHandler
87
import com.coder.toolbox.util.DialogUi
98
import com.coder.toolbox.views.Action
@@ -32,7 +31,6 @@ import kotlinx.coroutines.selects.onTimeout
3231
import kotlinx.coroutines.selects.select
3332
import java.net.SocketTimeoutException
3433
import java.net.URI
35-
import java.net.URL
3634
import kotlin.coroutines.cancellation.CancellationException
3735
import kotlin.time.Duration.Companion.seconds
3836
import kotlin.time.TimeSource
@@ -343,21 +341,4 @@ class CoderRemoteProvider(
343341
pollJob = poll(client, cli)
344342
goToEnvironmentsPage()
345343
}
346-
347-
/**
348-
* Try to find a token.
349-
*
350-
* Order of preference:
351-
*
352-
* 1. Last used token, if it was for this deployment.
353-
* 2. Token on disk for this deployment.
354-
* 3. Global token for Coder, if it matches the deployment.
355-
*/
356-
private fun getToken(deploymentURL: URL): Pair<String, SettingSource>? = context.secrets.lastToken.let {
357-
if (it.isNotBlank() && context.secrets.lastDeploymentURL == deploymentURL.toString()) {
358-
it to SettingSource.LAST_USED
359-
} else {
360-
settings.token(deploymentURL)
361-
}
362-
}
363344
}

0 commit comments

Comments
 (0)