fix(payments): VK-iOS freeze is purchase-only; remove the rewarded diagnostic
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 12s
CI / integration (pull_request) Successful in 20s
CI / ui (pull_request) Successful in 1m9s
CI / conformance (pull_request) Successful in 11s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 2m5s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 12s
CI / integration (pull_request) Successful in 20s
CI / ui (pull_request) Successful in 1m9s
CI / conformance (pull_request) Successful in 11s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 2m5s
Testing the rewarded slice surfaced a contradiction: rewarded ads let a VK-iOS
user earn vk chips, but the blanket VK-iOS "spend freeze" then blocked spending
them (the wallet showed "5 (view-only)"). Apple's ToS forbids only BUYING in-app
values on VK-iOS (money -> chips), not spending or earning them — so the freeze is
corrected to purchase-only: vkFrozen() now gates only CreateOrder (the money-in
step), not spendableSources (spending). VK-wallet chips — earned via rewarded ads
or bought on the same account elsewhere (VK Android) — now spend on VK-iOS too.
(Owner's ToS finding.)
Also: the temporary contour diagnostic confirmed VK returns only {result:true} for
a rewarded view (no token/signature) — client-attested is final, no hardening
possible — so the diagnostic (the log and the diag wire field) is removed.
Docs: PAYMENTS(+ru) VK-iOS freeze + D17 amend + PLAN E6. Tests updated (gate /
wallet VK-iOS now spendable).
This commit is contained in:
+4
-7
@@ -17,12 +17,10 @@ export function adsStubEnabled(): boolean {
|
||||
return (import.meta.env as Record<string, string | undefined>).VITE_ADS_STUB === '1';
|
||||
}
|
||||
|
||||
/** RewardedResult is one rewarded-ad view: whether it was watched, the raw provider result as JSON
|
||||
* (forwarded for the contour diagnostic), and whether it was the test stub (so the caller can show
|
||||
* the "ad fired" marker toast). */
|
||||
/** RewardedResult is one rewarded-ad view: whether it was watched, and whether it was the test stub
|
||||
* (so the caller can show the "ad fired" marker toast). */
|
||||
export interface RewardedResult {
|
||||
watched: boolean;
|
||||
data: string;
|
||||
stub: boolean;
|
||||
}
|
||||
|
||||
@@ -44,8 +42,7 @@ export async function rewardedReady(): Promise<boolean> {
|
||||
*/
|
||||
export async function showRewarded(): Promise<RewardedResult> {
|
||||
if (adsStubEnabled()) {
|
||||
return { watched: true, data: JSON.stringify({ stub: true }), stub: true };
|
||||
return { watched: true, stub: true };
|
||||
}
|
||||
const r = await vkShowRewarded();
|
||||
return { watched: r.watched, data: r.data, stub: false };
|
||||
return { watched: await vkShowRewarded(), stub: false };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user