diff --git a/ethcore/res/ethereum/tests b/ethcore/res/ethereum/tests index 9028c4801..e8f4624b7 160000 --- a/ethcore/res/ethereum/tests +++ b/ethcore/res/ethereum/tests @@ -1 +1 @@ -Subproject commit 9028c4801fd39fbb71a9796979182549a24e81c8 +Subproject commit e8f4624b7f1a15c63674eecf577c7ab76c3b16be diff --git a/ethcore/src/account_provider/mod.rs b/ethcore/src/account_provider/mod.rs index 649cb3162..dab19dbc0 100644 --- a/ethcore/src/account_provider/mod.rs +++ b/ethcore/src/account_provider/mod.rs @@ -478,7 +478,8 @@ mod tests { let ap = AccountProvider::transient_provider(); let address = ap.new_account("test").unwrap(); - // Default policy should be to return nothing + // When returning nothing + ap.set_new_dapps_whitelist(Some(vec![])).unwrap(); assert_eq!(ap.dapps_addresses("app1".into()).unwrap(), vec![]); // change to all diff --git a/ethcore/src/account_provider/stores.rs b/ethcore/src/account_provider/stores.rs index 722370426..d4f2093ee 100644 --- a/ethcore/src/account_provider/stores.rs +++ b/ethcore/src/account_provider/stores.rs @@ -175,7 +175,7 @@ impl DappsSettingsStore { /// Returns current new dapps policy pub fn policy(&self) -> NewDappsPolicy { - self.policy.get("default").cloned().unwrap_or(NewDappsPolicy::Whitelist(vec![])) + self.policy.get("default").cloned().unwrap_or(NewDappsPolicy::AllAccounts) } /// Returns recent dapps (in order of last request) @@ -353,8 +353,9 @@ mod tests { let temp = RandomTempPath::create_dir(); let path = temp.as_str().to_owned(); let mut store = DappsSettingsStore::new(path.clone()); + // Test default policy - assert_eq!(store.policy(), NewDappsPolicy::Whitelist(vec![])); + assert_eq!(store.policy(), NewDappsPolicy::AllAccounts); // when store.set_policy(NewDappsPolicy::Whitelist(vec![1.into(), 2.into()]));