Skip to content

Commit

Permalink
Add empty wasm file.
Browse files Browse the repository at this point in the history
  • Loading branch information
staffik committed Dec 15, 2023
1 parent efdfa9b commit f0163ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion runtime/near-wallet-contract/res/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.wasm
*.wasm
Empty file.
8 changes: 6 additions & 2 deletions runtime/near-wallet-contract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ pub fn wallet_contract() -> Arc<ContractCode> {

/// Include the WASM file content directly in the binary at compile time.
fn read_contract() -> ContractCode {
let code: &[u8] =
if cfg!(feature = "nightly") { include_bytes!("../res/wallet_contract.wasm") } else { &[] };
#[cfg(feature = "nightly")]
let code = include_bytes!("../res/wallet_contract.wasm");

#[cfg(not(feature = "nightly"))]
let code = &[];

ContractCode::new(code.to_vec(), None)
}

Expand Down

0 comments on commit f0163ad

Please sign in to comment.