Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszaaa committed May 13, 2024
1 parent 6da2bd7 commit 33154e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions rollup/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,21 @@ pub fn rollup_session_keys(aura: AuraId, grandpa: GrandpaId) -> rollup_runtime::
rollup_runtime::SessionKeys { aura, grandpa }
}

pub fn rollup_local_config(initial_collators_as_sequencers: bool, eth_chain_id: u64, decode_url: Option<String>) -> ChainSpec {
pub fn rollup_local_config(
initial_collators_as_sequencers: bool,
eth_chain_id: u64,
decode_url: Option<String>,
) -> ChainSpec {
// Give your base currency a unit name and decimal places
let mut properties = sc_chain_spec::Properties::new();
properties.insert("tokenSymbol".into(), "GASP".into());
properties.insert("tokenDecimals".into(), 18u32.into());
properties.insert("ss58Format".into(), 42u32.into());
properties.insert("isEthereum".into(), true.into());

let decode_url = decode_url.unwrap_or(
String::from("https://polkadot.js.org/apps/?rpc=ws%253A%252F%252F127.0.0.1%253A9944#/extrinsics/decode/")
);
let decode_url = decode_url.unwrap_or(String::from(
"https://polkadot.js.org/apps/?rpc=ws%253A%252F%252F127.0.0.1%253A9944#/extrinsics/decode/",
));

ChainSpec::from_genesis(
// Name
Expand Down Expand Up @@ -335,7 +339,7 @@ fn rollup_genesis(
name: "Gasp".to_string(),
version: "0.0.1".to_string(),
chain_id,
decode_url: decode_url,
decode_url,
_phantom: Default::default(),
},
}
Expand Down
2 changes: 1 addition & 1 deletion rollup/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ use sp_std::{fmt::Write, prelude::*};
impl ExtendedCall for RuntimeCall {
fn context(&self) -> Option<MetamaskSigningCtx> {
let mut call = String::new();
if let Some(url) = pallet_metamask_signature::Pallet::<Runtime>::get_decode_url(){
if let Some(url) = pallet_metamask_signature::Pallet::<Runtime>::get_decode_url() {
let _ = write!(&mut call, "{}", url);
}
let _ = write!(&mut call, "{}", array_bytes::bytes2hex("0x", self.encode()));
Expand Down

0 comments on commit 33154e7

Please sign in to comment.