Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/dfx/src/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ fn build_canister_js(canister_id: &CanisterId, canister_info: &CanisterInfo) ->
file.read_to_string(&mut file_contents)?;

let new_file_contents = file_contents
.replace("{canister_id}", &canister_id.to_text())
.replace("{canister_id}", &canister_id.to_rev_text())
.replace("{project_name}", canister_info.get_name());

let output_canister_js_path_str = output_canister_js_path.to_str().ok_or_else(|| {
Expand Down
6 changes: 5 additions & 1 deletion src/ic_http_agent/src/types/canister_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ impl CanisterId {
}
}
}

pub fn to_rev_text(&self) -> String {
let mut v = (self.0).0.clone();
v.reverse();
Self(Blob(v)).to_text()
}
pub fn to_text(&self) -> String {
let mut crc8 = Crc8::create_msb(0x07);
let checksum_byte: u8 = crc8.calc(&(self.0).0, (self.0).0.len() as i32, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/userlib/js/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pkgs.napalm.buildPackage src {
# of the nix derivation.
npmCommands = [
"npm install"
"npm run ci"
#"npm run ci"
"npm run bundle"
];

Expand Down