Skip to content
Merged
Changes from 2 commits
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
2 changes: 1 addition & 1 deletion modules/token-swap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pub mod pallet {
/// `swap.target_balance_at_bridged_chain` is above existential deposit of the Bridged chain;
/// 3) the `target_public_at_bridged_chain` matches the `swap.target_account_at_bridged_chain`;
/// 4) the `bridged_currency_transfer_signature` is valid and generated by the owner of the
/// `target_public_at_bridged_chain` account.
/// `target_public_at_bridged_chain` account (read more about [`CallOrigin::TargetAccount`]).
///
/// Violating rule#1 will lead to losing your `source_balance_at_this_chain` tokens. Violating other
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, AFAICT if the swap is in Failed state you can still cancel it, no? So no funds should be lost.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you've signed any call that has succeeded at the target chain (e.g. system::remark), you can't cancel it on this chain.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yeah, you're right. Actually given we allow arbitrary calls here, I'd suggest having the user provide weight as well. This will enable calling into proxy accounts, mutlisigs, etc. Also one less thing the pallet needs to know about the remote chain.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I've also moved bridged_chain_spec_version to arguments

/// rules will lead to losing message fees for this and other transactions + losing fees for message
Expand Down