git.delta.rocks / unique-network / refs/commits / f911002980df

difftreelog

fix delegate transfer_from to transfer if sender==from

Yaroslav Bolyukin2021-08-26parent: #d614bc7.patch.diff
in: master

1 file changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
1401 item_id: TokenId,1401 item_id: TokenId,
1402 amount: u128,1402 amount: u128,
1403 ) -> DispatchResult {1403 ) -> DispatchResult {
1404 if sender == from {
1405 // Transfer by `from`, because it is either equal to sender, or derived from him
1406 return Self::transfer_internal(from, recipient, collection, item_id, amount);
1407 }
1408
1404 collection.consume_gas(2000000)?;1409 collection.consume_gas(2000000)?;
1405 // Check approval1410 // Check approval