git.delta.rocks / unique-network / refs/commits / 3def18a6dc97

difftreelog

Merge pull request #245 from UniqueNetwork/CORE-243

kozyrevdev2021-11-25parents: #4d3b24f #f0bb7c4.patch.diff
in: master
Core 243

2 files changed

modifiedpallets/fungible/src/lib.rsdiffbeforeafterboth
285 spender: &T::CrossAccountId,285 spender: &T::CrossAccountId,
286 amount: u128,286 amount: u128,
287 ) {287 ) {
288 if amount == 0 {
289 <Allowance<T>>::remove((collection.id, owner, spender));
290 } else {
288 <Allowance<T>>::insert((collection.id, owner, spender), amount);291 <Allowance<T>>::insert((collection.id, owner, spender), amount);
292 }
289293
290 collection.log_infallible(ERC20Events::Approval {294 collection.log_infallible(ERC20Events::Approval {
291 owner: *owner.as_eth(),295 owner: *owner.as_eth(),
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
467 token: TokenId,467 token: TokenId,
468 amount: u128,468 amount: u128,
469 ) {469 ) {
470 if amount == 0 {
471 <Allowance<T>>::remove((collection.id, token, sender, spender));
472 } else {
470 <Allowance<T>>::insert((collection.id, token, sender, spender), amount);473 <Allowance<T>>::insert((collection.id, token, sender, spender), amount);
474 }
471 // TODO: ERC20 approval event475 // TODO: ERC20 approval event
472 <PalletCommon<T>>::deposit_event(CommonEvent::Approved(476 <PalletCommon<T>>::deposit_event(CommonEvent::Approved(
473 collection.id,477 collection.id,