Skip to content

Commit

Permalink
Audit issue 6: Use primary governance channel (#1050)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeddes authored Dec 16, 2023
1 parent 6f9cfdd commit 9959866
Showing 1 changed file with 3 additions and 5 deletions.
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

0 comments on commit 9959866

Please sign in to comment.