Skip to content

Commit a9aeb68

Browse files
fix: correctly identify truly cold mint accounts
1 parent e81c9b4 commit a9aeb68

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sdk-libs/client/src/rpc/client.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,12 @@ impl Rpc for LightClient {
11721172

11731173
let value = match resp.value {
11741174
Some(ai) => {
1175-
let state = if ai.is_cold() {
1175+
// An account is truly cold only when it has compressed data
1176+
// AND the on-chain account is closed (no data). Light Token mints
1177+
// that are on-chain (decompressed) may have both on-chain data
1178+
// and a compressed account — treat those as hot.
1179+
let is_truly_cold = ai.is_cold() && ai.account.data.is_empty();
1180+
let state = if is_truly_cold {
11761181
let cold = ai.cold.as_ref().ok_or_else(|| {
11771182
RpcError::CustomError("Cold mint missing cold context".into())
11781183
})?;

0 commit comments

Comments
 (0)