--- a/pallets/fungible/src/benchmarking.rs +++ b/pallets/fungible/src/benchmarking.rs @@ -90,7 +90,7 @@ }; let owner_eth = T::CrossAccountId::from_eth(*sender.as_eth()); >::create_item(&collection, &owner, (owner_eth.clone(), 200), &Unlimited)?; - }: {>::set_allowance_for(&collection, &sender, &owner_eth, &spender, 100)?} + }: {>::set_allowance_from(&collection, &sender, &owner_eth, &spender, 100)?} transfer_from { bench_init!{ --- a/pallets/fungible/src/common.rs +++ b/pallets/fungible/src/common.rs @@ -272,7 +272,7 @@ ); with_weight( - >::set_allowance_for(self, &sender, &from, &to, amount), + >::set_allowance_from(self, &sender, &from, &to, amount), >::approve_from(), ) } --- a/pallets/fungible/src/lib.rs +++ b/pallets/fungible/src/lib.rs @@ -620,7 +620,7 @@ /// - `from`: Owner's eth mirror. /// - `to`: Recipient of the allowance rights. /// - `amount`: Amount of tokens the spender is allowed to `transfer` or `burn`. - pub fn set_allowance_for( + pub fn set_allowance_from( collection: &FungibleHandle, sender: &T::CrossAccountId, from: &T::CrossAccountId, --- a/pallets/nonfungible/src/benchmarking.rs +++ b/pallets/nonfungible/src/benchmarking.rs @@ -141,7 +141,7 @@ }; let owner_eth = T::CrossAccountId::from_eth(*sender.as_eth()); let item = create_max_item(&collection, &owner, owner_eth.clone())?; - }: {>::set_allowance_for(&collection, &sender, &owner_eth, item, Some(&spender))?} + }: {>::set_allowance_from(&collection, &sender, &owner_eth, item, Some(&spender))?} transfer_from { bench_init!{ --- a/pallets/nonfungible/src/common.rs +++ b/pallets/nonfungible/src/common.rs @@ -369,9 +369,9 @@ with_weight( if amount == 1 { - >::set_allowance_for(self, &sender, &from, token, Some(&to)) + >::set_allowance_from(self, &sender, &from, token, Some(&to)) } else { - >::set_allowance_for(self, &sender, &from, token, None) + >::set_allowance_from(self, &sender, &from, token, None) }, >::approve_from(), ) --- a/pallets/nonfungible/src/lib.rs +++ b/pallets/nonfungible/src/lib.rs @@ -1176,7 +1176,7 @@ /// - `from`: Address of sender's eth mirror. /// - `to`: Adress of spender. /// - `token`: Token the spender is allowed to `transfer` or `burn`. - pub fn set_allowance_for( + pub fn set_allowance_from( collection: &NonfungibleHandle, sender: &T::CrossAccountId, from: &T::CrossAccountId, --- a/pallets/refungible/src/benchmarking.rs +++ b/pallets/refungible/src/benchmarking.rs @@ -170,7 +170,7 @@ }; let owner_eth = T::CrossAccountId::from_eth(*sender.as_eth()); let item = create_max_item(&collection, &owner, [(owner_eth.clone(), 200)])?; - }: {>::set_allowance_for(&collection, &sender, &owner_eth, &spender, item, 100)?} + }: {>::set_allowance_from(&collection, &sender, &owner_eth, &spender, item, 100)?} transfer_from_normal { bench_init!{ --- a/pallets/refungible/src/common.rs +++ b/pallets/refungible/src/common.rs @@ -327,7 +327,7 @@ amount: u128, ) -> DispatchResultWithPostInfo { with_weight( - >::set_allowance_for(self, &sender, &from, &to, token_id, amount), + >::set_allowance_from(self, &sender, &from, &to, token_id, amount), >::approve_from(), ) } --- a/pallets/refungible/src/lib.rs +++ b/pallets/refungible/src/lib.rs @@ -1107,7 +1107,7 @@ /// - `from`: Address of sender's eth mirror. /// - `to`: Adress of spender. /// - `amount`: Amount of token pieces the spender is allowed to `transfer` or `burn. - pub fn set_allowance_for( + pub fn set_allowance_from( collection: &RefungibleHandle, sender: &T::CrossAccountId, from: &T::CrossAccountId,