diff --git a/crates/sui-json-rpc/src/balance_changes.rs b/crates/sui-json-rpc/src/balance_changes.rs
index ff4e445713623..ed6259605f08f 100644
--- a/crates/sui-json-rpc/src/balance_changes.rs
+++ b/crates/sui-json-rpc/src/balance_changes.rs
@@ -182,55 +182,49 @@ impl
ObjectProviderCache
{
}
}
- pub fn new_with_cache(
- provider: P,
- written_objects: BTreeMap,
- ) -> Self {
- let mut object_cache = BTreeMap::new();
- let mut last_version_cache = BTreeMap::new();
+ pub fn insert_objects_into_cache(&mut self, objects: Vec