Skip to content

Commit

Permalink
remove 0x from contract address
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Oct 7, 2024
1 parent 0ff2179 commit 4d3266c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smoketest/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ lazy_static! {
pub static ref GATEWAY_PROXY_CONTRACT: [u8; 20] = {
if let Ok(val) = env::var("GATEWAY_PROXY_CONTRACT") {
println!("{}", env::var("GATEWAY_PROXY_CONTRACT").unwrap());
<[u8; 20]>::from_hex(val).unwrap()
let stripped_address = var.strip_prefix("0x").unwrap_or(&var);
<[u8; 20]>::from_hex(stripped_address).unwrap()
}
else {
DEFAULT_GATEWAY_PROXY_CONTRACT
Expand Down

0 comments on commit 4d3266c

Please sign in to comment.