Skip to content

Commit

Permalink
fix: read cost in approval (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshvarma authored Jan 3, 2024
1 parent 9e08ec1 commit 7be5270
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions precompiles/assets-erc20/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ where
value.try_into().unwrap_or_else(|_| Bounded::max_value());

// Storage item: Approvals:
// Blake2_128(16) + AssetId(16) + (2 * Blake2_128(16) + AccountId(20)) + Approval(32)
handle.record_db_read::<Runtime>(136)?;
// Blake2_128(16) + AssetId(16) + (2 * Blake2_128(16) + AccountId(32)) + Approval(32)
handle.record_db_read::<Runtime>(148)?;

// If previous approval exists, we need to clean it
if pallet_assets::Pallet::<Runtime, Instance>::allowance(asset_id, &owner, &spender)
Expand Down

0 comments on commit 7be5270

Please sign in to comment.