--- 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,