fix(account): load permanent referral profiles
CI / Validate manifests (push) Has been cancelled
CI / SwiftLint (push) Has been cancelled
CI / iOS / Extension (push) Has been cancelled
CI / macOS (push) Has been cancelled

Use authenticated server invitation URLs with account-scoped caching and bounded state transitions, then advance the iOS build metadata to 86.
This commit is contained in:
Rocky
2026-08-20 22:59:58 +08:00
parent ca0a1f9b9a
commit 7bd77509b6
19 changed files with 1151 additions and 228 deletions
@@ -163,10 +163,6 @@ final class AccountCenterViewModelTests: XCTestCase {
let latest = AccountCenterSnapshot(
account: account,
credits: latestCredits,
referralProfile: AccountReferralProfile(
code: "LatestCode_1234567890",
boundCode: nil
),
referrals: [
AccountReferral(
id: UUID(),
@@ -213,7 +209,6 @@ final class AccountCenterViewModelTests: XCTestCase {
let latest = AccountCenterSnapshot(
account: account,
credits: AccountCreditSummary(balance: 500, usedCredits: 500),
referralProfile: original.referralProfile,
referrals: original.referrals
)
let service = AccountServiceSpy(
@@ -443,7 +438,6 @@ final class AccountCenterViewModelTests: XCTestCase {
balance: 9_223_372_036_854_775_000,
usedCredits: 1_234
),
referralProfile: AccountReferralProfile(code: nil, boundCode: nil),
referrals: []
)
}
@@ -551,10 +545,6 @@ private actor AccountServiceSpy: AccountSessionServicing, AccountCenterServicing
return centerSnapshot
}
func createReferralCode() async throws -> String {
"CreatedCode_1234567890"
}
func redeemReferral(code: String) async throws {
if shouldFailRedemption {
throw AccountServiceSpyError.failed