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..3553b0b1a4a 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) } @@ -35,7 +39,7 @@ mod tests { use std::str::FromStr; const WALLET_CONTRACT_HASH: &'static str = "4UkQ8nasN1u5aBuRna2wEHHAbQmWS2Kdq88TRz1phxAc"; - const MAGIC_BYTES_HASH: &'static str = "46ABZEDwsEGnyJqNzJ1EftKzqH3ZtZj5Loj78Wr1vopm"; + const MAGIC_BYTES_HASH: &'static str = "31PSU4diHE4cpWju91fb2zTqn5JSDRZ6xNGM2ub8Lgdg"; #[test] fn check_wallet_contract() {