|
1 | 1 | diff --git a/fundamentals/src/xcm_executor.rs b/fundamentals/src/xcm_executor.rs
|
2 |
| -index d50d85a..f03d79b 100644 |
| 2 | +index 540086f..f03d79b 100644 |
3 | 3 | --- a/fundamentals/src/xcm_executor.rs
|
4 | 4 | +++ b/fundamentals/src/xcm_executor.rs
|
5 |
| -@@ -132,14 +132,50 @@ impl<Config: XcmConfig> XcmExecutor<Config> { |
| 5 | +@@ -132,32 +132,50 @@ impl<Config: XcmConfig> XcmExecutor<Config> { |
6 | 6 | // - `assets`: The asset(s) to remove from holding.
|
7 | 7 | // - `beneficiary`: The new owner for the assets.
|
8 | 8 | DepositAsset { assets, beneficiary } => {
|
| 9 | +- /* TODO: |
| 10 | +- - Make a clone of `self.holding` into a variable `old_holding`. |
| 11 | +- - Start a new `TransactionalProcessor`, storing the `result`. |
| 12 | +- - `saturating_take` the `assets` into a variable `deposited. |
| 13 | +- - For `asset` in `deposited` |
| 14 | +- - Use `AssetTransactor` to `deposit_asset` to the `beneficiary`. |
| 15 | +- - If anything goes wrong, we should reset `self.holding` to `old_holding`. |
| 16 | +- - Return the `result` |
| 17 | +- */ |
9 | 18 | - todo!("{:?} {:?}", assets, beneficiary)
|
10 | 19 | + let old_holding = self.holding.clone();
|
11 | 20 | + let result = Config::TransactionalProcessor::process(|| {
|
@@ -33,6 +42,15 @@ index d50d85a..f03d79b 100644
|
33 | 42 | //
|
34 | 43 | // - `assets`: The asset(s) that are minted into the Holding Register.
|
35 | 44 | ReceiveTeleportedAsset(assets) => {
|
| 45 | +- /* TODO: |
| 46 | +- - Process everything inside `TransactionalProcessor`. |
| 47 | +- - Get the `origin` or return `XcmError::BadOrigin`. |
| 48 | +- - For `asset` in `assets`: |
| 49 | +- - Use `AssetTransactor` to see if we `can_check_in`. |
| 50 | +- - Then actually `check_in` those assets. |
| 51 | +- - `and_then`, if everything goes okay... |
| 52 | +- - `subsume_assets` into the `self.holding`. |
| 53 | +- */ |
36 | 54 | - todo!("{:?}", assets)
|
37 | 55 | + Config::TransactionalProcessor::process(|| {
|
38 | 56 | + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?;
|
|
0 commit comments