--- a/pallets/fungible/src/lib.rs +++ b/pallets/fungible/src/lib.rs @@ -285,7 +285,11 @@ spender: &T::CrossAccountId, amount: u128, ) { - >::insert((collection.id, owner, spender), amount); + if amount == 0 { + >::remove((collection.id, owner, spender)); + } else { + >::insert((collection.id, owner, spender), amount); + } collection.log_infallible(ERC20Events::Approval { owner: *owner.as_eth(),