From e53838bb5489ba1fb4b54cad99f068c35c4e618f Mon Sep 17 00:00:00 2001 From: Martin Fraga Date: Tue, 9 Apr 2024 15:35:43 -0300 Subject: [PATCH] fix tests --- miden-tx/tests/integration/scripts/faucet.rs | 5 +++-- miden-tx/tests/integration/wallet/mod.rs | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/miden-tx/tests/integration/scripts/faucet.rs b/miden-tx/tests/integration/scripts/faucet.rs index f45df86d4..2fddd6ecb 100644 --- a/miden-tx/tests/integration/scripts/faucet.rs +++ b/miden-tx/tests/integration/scripts/faucet.rs @@ -6,7 +6,7 @@ use miden_lib::{ use miden_objects::{ accounts::{ Account, AccountCode, AccountId, AccountStorage, SlotItem, StorageSlot, - ACCOUNT_ID_FUNGIBLE_FAUCET_OFF_CHAIN, + ACCOUNT_ID_FUNGIBLE_FAUCET_OFF_CHAIN, AccountStorageType, }, assembly::{ModuleAst, ProgramAst}, assets::{Asset, AssetVault, FungibleAsset, TokenSymbol}, @@ -242,9 +242,10 @@ fn faucet_contract_creation() { let token_symbol_string = "POL"; let token_symbol = TokenSymbol::try_from(token_symbol_string).unwrap(); let decimals = 2u8; + let storage_type = AccountStorageType::OffChain; let (faucet_account, _) = - create_basic_fungible_faucet(init_seed, token_symbol, decimals, max_supply, auth_scheme) + create_basic_fungible_faucet(init_seed, token_symbol, decimals, max_supply, auth_scheme, storage_type) .unwrap(); // check that max_supply (slot 1) is 123 diff --git a/miden-tx/tests/integration/wallet/mod.rs b/miden-tx/tests/integration/wallet/mod.rs index f3ae303ce..bc27829e2 100644 --- a/miden-tx/tests/integration/wallet/mod.rs +++ b/miden-tx/tests/integration/wallet/mod.rs @@ -190,7 +190,7 @@ fn prove_send_asset_via_wallet() { #[cfg(not(target_arch = "wasm32"))] #[test] fn wallet_creation() { - use miden_objects::accounts::{AccountType, ACCOUNT_ID_SENDER}; + use miden_objects::accounts::{AccountType, ACCOUNT_ID_SENDER, AccountStorageType}; // we need a Falcon Public Key to create the wallet account let seed = [0_u8; 32]; @@ -206,8 +206,11 @@ fn wallet_creation() { 204, 149, 90, 166, 68, 100, 73, 106, 168, 125, 237, 138, 16, ]; + let account_type = AccountType::RegularAccountImmutableCode; + let storage_type = AccountStorageType::OffChain; + let (wallet, _) = - create_basic_wallet(init_seed, auth_scheme, AccountType::RegularAccountImmutableCode) + create_basic_wallet(init_seed, auth_scheme, account_type, storage_type) .unwrap(); // sender_account_id not relevant here, just to create a default account code