Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit issue 6: Use primary governance channel #1050

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Changes from all 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
8 changes: 3 additions & 5 deletions parachain/pallets/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,7 @@ pub mod pallet {
Ok(())
}

/// Sends a message to the Gateway contract to update a channel configuration
///
/// The origin must already have a channel initialized, as this message is sent over it.
/// Sends a message to the Gateway contract to update an arbitrary channel
///
/// Fee required: No
///
Expand All @@ -487,7 +485,7 @@ pub mod pallet {
ensure!(Channels::<T>::contains_key(channel_id), Error::<T>::NoChannel);

let command = Command::UpdateChannel { channel_id, mode };
Self::send(SECONDARY_GOVERNANCE_CHANNEL, command, PaysFee::<T>::No)?;
Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::<T>::No)?;

Self::deposit_event(Event::<T>::UpdateChannel { channel_id, mode, outbound_fee });
Ok(())
Expand Down Expand Up @@ -551,7 +549,7 @@ pub mod pallet {

Self::do_transfer_native_from_agent(
agent_id,
SECONDARY_GOVERNANCE_CHANNEL,
PRIMARY_GOVERNANCE_CHANNEL,
recipient,
amount,
pays_fee,
Expand Down
Loading