@@ -30,7 +30,6 @@ use frame_support::traits::fungibles::{
3030 approvals:: Inspect as ApprovalsInspect , metadata:: Inspect as MetadataInspect ,
3131} ;
3232use pallet_assets:: { weights:: WeightInfo as _, Call , Config , TransferFlags } ;
33- use sp_runtime:: traits:: { Bounded , UniqueSaturatedInto , Zero } ;
3433use pallet_revive:: precompiles:: {
3534 alloy:: {
3635 self ,
@@ -39,6 +38,7 @@ use pallet_revive::precompiles::{
3938 } ,
4039 AddressMapper , AddressMatcher , Error , Ext , Precompile , RuntimeCosts , H160 , H256 ,
4140} ;
41+ use sp_runtime:: traits:: { Bounded , UniqueSaturatedInto , Zero } ;
4242use weights:: WeightInfo as _;
4343
4444pub mod foreign_assets;
@@ -489,18 +489,14 @@ where
489489 // fungibles trait. This pins the sentinel invariant to storage state —
490490 // "an approval row exists and its amount is `Balance::MAX`" — rather
491491 // than to a trait return value that a future impl could synthesise.
492- let approval = pallet_assets:: Approvals :: < Runtime , Instance > :: get ( (
493- asset_id. clone ( ) ,
494- & from,
495- & spender,
496- ) ) ;
492+ let approval =
493+ pallet_assets:: Approvals :: < Runtime , Instance > :: get ( ( asset_id. clone ( ) , & from, & spender) ) ;
497494 let actual_weight = match approval {
498495 Some ( a) if a. amount == <Runtime as Config < Instance > >:: Balance :: max_value ( ) => {
499496 // Sentinel: bypass `do_transfer_approved` so the approval is not
500497 // decremented. The match arm itself confirms an approval row
501498 // exists; `do_transfer` enforces the balance check.
502- let f =
503- TransferFlags { keep_alive : false , best_effort : false , burn_dust : false } ;
499+ let f = TransferFlags { keep_alive : false , best_effort : false , burn_dust : false } ;
504500 pallet_assets:: Pallet :: < Runtime , Instance > :: do_transfer (
505501 asset_id,
506502 & from,
0 commit comments