mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 02:11:01 +00:00
xcm: SovereignPaidRemoteExporter: remove unused RefundSurplus instruction (#2312)
Refunding surplus happens anyway on xcm_executor::post_process(), automatically refunding surplus to original_origin at the end of execution. Since SovereignPaidRemoteExporter doesn't ClearOrigin, it can simply rely on the automatic mechanism. Furthermore, RefundSurplus instruction refunds _surplus_. Surplus exists only as a result of Transact, SetErrorHandler or SetAppendix instructions, none of which being part of the SovereignPaidRemoteExporter XCM program. So surplus is always zero here anyway.
This commit is contained in:
@@ -305,7 +305,6 @@ impl<Bridges: ExporterFor, Router: SendXcm, UniversalLocation: Get<InteriorMulti
|
||||
WithdrawAsset(fees.clone().into()),
|
||||
BuyExecution { fees, weight_limit: Unlimited },
|
||||
export_instruction,
|
||||
RefundSurplus,
|
||||
DepositAsset { assets: All.into(), beneficiary: local_from_bridge },
|
||||
]
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user