From 4edeec7b110a92c76d1a3eb68ca6317c8dac5ac3 Mon Sep 17 00:00:00 2001 From: str-mv Date: Thu, 25 Nov 2021 09:52:31 +0000 Subject: [PATCH] CORE-243 --- --- a/pallets/refungible/src/lib.rs +++ b/pallets/refungible/src/lib.rs @@ -467,7 +467,11 @@ token: TokenId, amount: u128, ) { - >::insert((collection.id, token, sender, spender), amount); + if amount == 0 { + >::remove((collection.id, token, sender, spender)); + } else { + >::insert((collection.id, token, sender, spender), amount); + } // TODO: ERC20 approval event >::deposit_event(CommonEvent::Approved( collection.id, -- gitstuff