diff --git a/Sources/Confidence/Confidence.swift b/Sources/Confidence/Confidence.swift index 475eeeed..1ef5aeb6 100644 --- a/Sources/Confidence/Confidence.swift +++ b/Sources/Confidence/Confidence.swift @@ -87,7 +87,6 @@ public class Confidence: ConfidenceEventSender { var map = confidence.contextFlow.value for removedKey in removeKeys { map.removeValue(forKey: removedKey) - confidence.removedContextKeys.insert(removedKey) } for entry in context { map.updateValue(entry.value, forKey: entry.key) diff --git a/Sources/Confidence/Contextual.swift b/Sources/Confidence/Contextual.swift index 4bfb9781..1172c2fb 100644 --- a/Sources/Confidence/Contextual.swift +++ b/Sources/Confidence/Contextual.swift @@ -16,10 +16,6 @@ public protocol Contextual: ConfidenceContextProvider { */ func removeKey(key: String) /** - Perform `putContext` and multiple `removeKey` at once - */ - func putContext(context: ConfidenceStruct, removeKeys: [String]) - /** Creates a child Contextual instance that maintains access to its parent's data */ func withContext(_ context: ConfidenceStruct) -> Self diff --git a/Tests/ConfidenceTests/ConfidenceTests.swift b/Tests/ConfidenceTests/ConfidenceTests.swift index 7cee4174..c32d02fb 100644 --- a/Tests/ConfidenceTests/ConfidenceTests.swift +++ b/Tests/ConfidenceTests/ConfidenceTests.swift @@ -43,29 +43,6 @@ final class ConfidenceTests: XCTestCase { XCTAssertEqual(confidenceChild.getContext(), expected) } - func testWithContextUpdateParentRemoveKeys() { - let confidenceParent = Confidence.init( - clientSecret: "", - region: .europe, - eventSenderEngine: EventSenderEngineMock(), - initializationStrategy: .activateAndFetchAsync, - context: ["k1": ConfidenceValue(string: "v1")], - parent: nil - ) - let confidenceChild: ConfidenceEventSender = confidenceParent.withContext( - ["k2": ConfidenceValue(string: "v2")] - ) - confidenceChild.putContext( - context: ["k3": ConfidenceValue(string: "v3")], - removeKeys: ["k1"] - ) - let expected = [ - "k2": ConfidenceValue(string: "v2"), - "k3": ConfidenceValue(string: "v3"), - ] - XCTAssertEqual(confidenceChild.getContext(), expected) - } - func testUpdateLocalContext() { let confidence = Confidence.init( clientSecret: "",