git.delta.rocks / unique-network / refs/commits / 5c2c651eb48c

difftreelog

Merge branch 'develop' into feature/fix_unit_tests

Igor Kozyrev2021-11-25parents: #afaef53 #3def18a.patch.diff
in: master

4 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/nonfungible/src/lib.rsdiffbeforeafterboth
177 .checked_add(1)177 .checked_add(1)
178 .ok_or(ArithmeticError::Overflow)?;178 .ok_or(ArithmeticError::Overflow)?;
179179
180 let balance = <AccountBalance<T>>::get((collection.id, sender))
181 .checked_sub(1)
182 .ok_or(ArithmeticError::Overflow)?;
183
184 if balance == 0 {
185 <AccountBalance<T>>::remove((collection.id, sender));
186 } else {
187 <AccountBalance<T>>::insert((collection.id, sender), balance);
188 }
180 // =========189 // =========
181190
182 <Owned<T>>::remove((collection.id, &token_data.owner, token));191 <Owned<T>>::remove((collection.id, &token_data.owner, token));
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
175 <TotalSupply<T>>::remove_prefix((id,), None);175 <TotalSupply<T>>::remove_prefix((id,), None);
176 <Balance<T>>::remove_prefix((id,), None);176 <Balance<T>>::remove_prefix((id,), None);
177 <Allowance<T>>::remove_prefix((id,), None);177 <Allowance<T>>::remove_prefix((id,), None);
178 <Owned<T>>::remove_prefix((id,), None);
179 <AccountBalance<T>>::remove_prefix((id,), None);
178 Ok(())180 Ok(())
179 }181 }
180182
465 token: TokenId,467 token: TokenId,
466 amount: u128,468 amount: u128,
467 ) {469 ) {
470 if amount == 0 {
471 <Allowance<T>>::remove((collection.id, token, sender, spender));
472 } else {
468 <Allowance<T>>::insert((collection.id, token, sender, spender), amount);473 <Allowance<T>>::insert((collection.id, token, sender, spender), amount);
474 }
469 // TODO: ERC20 approval event475 // TODO: ERC20 approval event
470 <PalletCommon<T>>::deposit_event(CommonEvent::Approved(476 <PalletCommon<T>>::deposit_event(CommonEvent::Approved(
471 collection.id,477 collection.id,
modifiedruntime/src/lib.rsdiffbeforeafterboth
146 spec_name: create_runtime_str!("opal"),146 spec_name: create_runtime_str!("opal"),
147 impl_name: create_runtime_str!("opal"),147 impl_name: create_runtime_str!("opal"),
148 authoring_version: 1,148 authoring_version: 1,
149 spec_version: 912202,149 spec_version: 912204,
150 impl_version: 1,150 impl_version: 1,
151 apis: RUNTIME_API_VERSIONS,151 apis: RUNTIME_API_VERSIONS,
152 transaction_version: 1,152 transaction_version: 1,