File tree Expand file tree Collapse file tree 9 files changed +11
-14
lines changed
flipcash/src/main/kotlin/com/flipcash/services/internal/network/api
opencode/src/main/kotlin/com/getcode/opencode/internal/network Expand file tree Collapse file tree 9 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ class AccountApi @Inject constructor(
21
21
managedChannel : ManagedChannel ,
22
22
) : GrpcApi(managedChannel) {
23
23
24
- private val api
25
- get() = AccountGrpcKt .AccountCoroutineStub (managedChannel).withWaitForReady()
24
+ private val api = AccountGrpcKt .AccountCoroutineStub (managedChannel)
26
25
27
26
/* *
28
27
* Registers a new user, bound to the provided PublicKey.
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ class ActivityFeedApi @Inject constructor(
22
22
managedChannel : ManagedChannel ,
23
23
) : GrpcApi(managedChannel) {
24
24
25
- private val api
26
- get() = ActivityFeedGrpcKt .ActivityFeedCoroutineStub (managedChannel).withWaitForReady()
25
+ private val api = ActivityFeedGrpcKt .ActivityFeedCoroutineStub (managedChannel)
27
26
28
27
/* *
29
28
* Gets the latest [maxItems] notifications in a user's activity feed.
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ class PurchaseApi @Inject constructor(
18
18
@FlipcashManagedChannel
19
19
managedChannel : ManagedChannel ,
20
20
) : GrpcApi(managedChannel) {
21
- private val api
22
- get() = IapGrpcKt .IapCoroutineStub (managedChannel).withWaitForReady()
21
+ private val api = IapGrpcKt .IapCoroutineStub (managedChannel)
23
22
24
23
// OnPurchaseCompleted is called when an IAP has been completed
25
24
suspend fun onPurchaseCompleted (
Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ class PushApi @Inject constructor(
17
17
managedChannel : ManagedChannel ,
18
18
) : GrpcApi(managedChannel) {
19
19
20
- private val api
21
- get() = PushGrpcKt .PushCoroutineStub (managedChannel).withWaitForReady()
20
+ private val api = PushGrpcKt .PushCoroutineStub (managedChannel)
22
21
23
22
/* *
24
23
* Adds a push token associated with a user.
Original file line number Diff line number Diff line change @@ -10,14 +10,17 @@ import com.getcode.opencode.internal.network.extensions.sign
10
10
import io.grpc.ManagedChannel
11
11
import kotlinx.coroutines.Dispatchers
12
12
import kotlinx.coroutines.withContext
13
+ import java.util.concurrent.TimeUnit
13
14
import javax.inject.Inject
15
+ import javax.inject.Singleton
14
16
17
+ @Singleton
15
18
internal class AccountApi @Inject constructor(
16
19
@OpenCodeManagedChannel
17
20
managedChannel : ManagedChannel ,
18
21
): GrpcApi(managedChannel) {
19
22
20
- private val api = AccountGrpcKt .AccountCoroutineStub (managedChannel).withWaitForReady()
23
+ private val api = AccountGrpcKt .AccountCoroutineStub (managedChannel)
21
24
22
25
/* *
23
26
* Returns whether an owner account is a Code account. This hints
Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ internal class CurrencyApi @Inject constructor(
17
17
managedChannel : ManagedChannel ,
18
18
): GrpcApi(managedChannel) {
19
19
20
- private val api = CurrencyGrpcKt .CurrencyCoroutineStub (managedChannel).withWaitForReady()
21
-
20
+ private val api = CurrencyGrpcKt .CurrencyCoroutineStub (managedChannel)
22
21
/* *
23
22
* Returns the exchange rates for the core mint token against all available currencies
24
23
*
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ internal class MessagingApi @Inject constructor(
22
22
managedChannel : ManagedChannel ,
23
23
): GrpcApi(managedChannel) {
24
24
25
- private val api = MessagingGrpcKt .MessagingCoroutineStub (managedChannel).withWaitForReady()
25
+ private val api = MessagingGrpcKt .MessagingCoroutineStub (managedChannel)
26
26
27
27
/* *
28
28
* Opens a stream of messages. Messages are routed using the public key of a rendezvous keypair
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class TransactionApi @Inject constructor(
34
34
managedChannel : ManagedChannel ,
35
35
): GrpcApi(managedChannel) {
36
36
37
- private val api = TransactionGrpcKt .TransactionCoroutineStub (managedChannel).withWaitForReady()
37
+ private val api = TransactionGrpcKt .TransactionCoroutineStub (managedChannel)
38
38
39
39
/* *
40
40
* The mechanism for client and server to agree upon a set of
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import com.getcode.opencode.internal.network.api.AccountApi
6
6
import com.getcode.opencode.model.accounts.AccountInfo
7
7
import com.getcode.opencode.model.core.errors.CodeAccountCheckError
8
8
import com.getcode.opencode.model.core.errors.GetAccountsError
9
- import com.getcode.opencode.model.core.errors.LinkAccountsError
10
9
import com.getcode.solana.keys.PublicKey
11
10
import javax.inject.Inject
12
11
You can’t perform that action at this time.
0 commit comments