From f0bb7c494d7757b8ca29cc1809d55e7974fd8d89 Mon Sep 17 00:00:00 2001 From: str-mv Date: Thu, 25 Nov 2021 10:22:21 +0000 Subject: [PATCH] Fungible allowance fixed --- --- 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(), -- gitstuff