From f0163ad761a600360c2cf4cc7716b690f79636d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Chuda=C5=9B?= Date: Fri, 15 Dec 2023 18:50:27 +0100 Subject: [PATCH] Add empty wasm file. --- runtime/near-wallet-contract/res/.gitignore | 2 +- runtime/near-wallet-contract/res/wallet_contract.wasm | 0 runtime/near-wallet-contract/src/lib.rs | 8 ++++++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 runtime/near-wallet-contract/res/wallet_contract.wasm diff --git a/runtime/near-wallet-contract/res/.gitignore b/runtime/near-wallet-contract/res/.gitignore index 917660a3481..19e1bced9ad 100644 --- a/runtime/near-wallet-contract/res/.gitignore +++ b/runtime/near-wallet-contract/res/.gitignore @@ -1 +1 @@ -*.wasm \ No newline at end of file +*.wasm diff --git a/runtime/near-wallet-contract/res/wallet_contract.wasm b/runtime/near-wallet-contract/res/wallet_contract.wasm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/runtime/near-wallet-contract/src/lib.rs b/runtime/near-wallet-contract/src/lib.rs index 7d5c36402fa..f50642f766e 100644 --- a/runtime/near-wallet-contract/src/lib.rs +++ b/runtime/near-wallet-contract/src/lib.rs @@ -10,8 +10,12 @@ pub fn wallet_contract() -> Arc { /// 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) }