File tree Expand file tree Collapse file tree
services/opencode/src/main/kotlin/com/getcode/opencode/controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import com.getcode.opencode.model.financial.Fiat
99import com.getcode.opencode.model.financial.LocalFiat
1010import com.getcode.opencode.model.financial.minus
1111import com.getcode.opencode.model.financial.plus
12+ import com.getcode.solana.keys.Mint
1213import com.getcode.solana.keys.PublicKey
1314import com.getcode.utils.TraceType
1415import com.getcode.utils.network.NetworkConnectivityListener
@@ -129,7 +130,10 @@ class BalanceController @Inject constructor(
129130 }
130131 }?.map { response ->
131132 val primary =
132- response.accounts.values.find { it.accountType == AccountType .Primary }
133+ // for now find the primary account for USDC
134+ response.accounts.values.find {
135+ it.accountType == AccountType .Primary && it.mint == Mint .usdc
136+ }
133137 if (primary?.unusable == true ) {
134138 onTimelockUnlocked()
135139 }
You can’t perform that action at this time.
0 commit comments