diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/transformer.rs index 0b0ee7adbec..07ad9e32ecf 100644 --- a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/transformer.rs @@ -82,7 +82,7 @@ impl TokenDestroyFrozenFundsTransitionActionV0 { let maybe_token_amount = drive.fetch_identity_token_balance_operations( base.token_id().to_buffer(), - owner_id.to_buffer(), + frozen_identity_id.to_buffer(), !approximate_without_state_for_costs, transaction, &mut drive_operations, @@ -228,7 +228,7 @@ impl TokenDestroyFrozenFundsTransitionActionV0 { let maybe_token_amount = drive.fetch_identity_token_balance_operations( base.token_id().to_buffer(), - owner_id.to_buffer(), + frozen_identity_id.to_buffer(), !approximate_without_state_for_costs, transaction, &mut drive_operations, diff --git a/packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs b/packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs index d579d94dc15..c52ae174cee 100644 --- a/packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs +++ b/packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs @@ -461,7 +461,7 @@ impl Drive { TokenTransition::DestroyFrozenFunds( destroy_frozen_funds_transition, ) => { - let (root_hash, None) = + let (root_hash, maybe_token_amount) = Drive::verify_token_balance_for_identity_id( proof, token_id.into_buffer(), @@ -470,10 +470,10 @@ impl Drive { .into_buffer(), false, platform_version, - )? - else { + )?; + if maybe_token_amount != Some(0) { return Err(Error::Proof(ProofError::IncorrectProof( - format!("proof contained token balance for identity {} expected to not exist because of state transition (token destroy frozen funds)", owner_id)))); + format!("proof contained non-zero token balance for identity {} expected to be zero because of state transition (token destroy frozen funds)", destroy_frozen_funds_transition.frozen_identity_id())))); }; Ok(( root_hash,