Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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,
Expand Down
Loading