Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Correct another accourance of MinXcmFee impl in comments
Signed-off-by: Georgi Zlatarev <[email protected]>
  • Loading branch information
ghzlatarev committed May 30, 2022
commit 21ec1597b201c33213c52b569e953a9e26a29faa
12 changes: 6 additions & 6 deletions xtokens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ Parachains should implements config `MinXcmFee` in `xtokens` module config:

```rust
parameter_type_with_key! {
pub ParachainMinFee: |location: MultiLocation| -> u128 {
pub ParachainMinFee: |location: MultiLocation| -> Option<u128> {
#[allow(clippy::match_ref_pats)] // false positive
match (location.parents, location.first_interior()) {
(1, Some(Parachain(parachains::statemine::ID))) => 4_000_000_000,
_ => u128::MAX,
(1, Some(Parachain(parachains::statemine::ID))) => Some(4_000_000_000),
_ => None,
}
};
}
```

If Parachain don't want have this case, can simply return Max value:
If Parachain don't want have this case, can simply return None:

```rust
parameter_type_with_key! {
pub ParachainMinFee: |_location: MultiLocation| -> u128 {
u128::MAX
pub ParachainMinFee: |_location: MultiLocation| -> Option<u128> {
None
};
}
```
Expand Down