From 38275736bfeaeb48d00d3d43a77bd87e23ee701d Mon Sep 17 00:00:00 2001 From: Patrick Cronin Date: Wed, 18 Mar 2026 14:34:09 -0400 Subject: [PATCH 1/2] Simplify --- .../Services/FraudDetectionService.swift | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/Example/ShoeStoreApp/ShoeStoreApp/Services/FraudDetectionService.swift b/Example/ShoeStoreApp/ShoeStoreApp/Services/FraudDetectionService.swift index 25a45d9..717ae71 100644 --- a/Example/ShoeStoreApp/ShoeStoreApp/Services/FraudDetectionService.swift +++ b/Example/ShoeStoreApp/ShoeStoreApp/Services/FraudDetectionService.swift @@ -1,7 +1,6 @@ import Foundation -// Note: In a real implementation, you would import MinFraudDevice -// import MinFraudDevice +import MinFraudDevice /// Service for fraud detection integration with MaxMind minFraud Device SDK @MainActor @@ -36,14 +35,9 @@ class FraudDetectionService: ObservableObject { } private func initializeSDK() { - // In a real implementation, you would use: - // let sdk = MinFraudDevice.shared - // deviceId = sdk.getDeviceId() - // isDeviceCheckSupported = sdk.isDeviceCheckSupported() - - // Mock implementation for demonstration - deviceId = "MOCK-DEVICE-ID-\(UUID().uuidString.prefix(8))" - isDeviceCheckSupported = true + let sdk = MinFraudDevice.shared + deviceId = sdk.deviceID + isDeviceCheckSupported = sdk.isDeviceCheckSupported } /// Analyzes a transaction for fraud risk @@ -66,16 +60,13 @@ class FraudDetectionService: ObservableObject { let sdk = MinFraudDevice.shared - guard let deviceId = sdk.getDeviceId() else { + guard let deviceId = sdk.deviceID else { return .unknown } var deviceCheckToken: String? if sdk.isDeviceCheckSupported() { - let tokenResult = await sdk.generateDeviceCheckTokenString() - if case .success(let token) = tokenResult { - deviceCheckToken = token - } + deviceCheckToken = try? await sdk.generateDeviceCheckTokenString() } // Send to your backend From de9e998bb37aefcd92ceb96089913d1c5b88a9f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 18:36:48 +0000 Subject: [PATCH 2/2] Bump actions/upload-artifact from 4 to 7 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index affa541..610800c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: --hosting-base-path device-ios - name: Upload Documentation Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: documentation path: docs/