Align e2e-prod suite with the monolith API; drop dead applyOverride; treat run_not_active as terminal
This commit is contained in:
@@ -74,6 +74,19 @@ export function adminApi(artifact: SeedArtifact = loadArtifact()): AdminClient {
|
||||
return api;
|
||||
}
|
||||
|
||||
/** Credits a player's wallet through the admin batch endpoint. */
|
||||
export async function grantCurrency(
|
||||
artifact: SeedArtifact,
|
||||
playerId: string,
|
||||
currencyCode: string,
|
||||
amount: number,
|
||||
): Promise<void> {
|
||||
await adminApi(artifact).post(
|
||||
`/platform/v1/projects/${artifact.projectId}/players/wallet/adjust`,
|
||||
{ items: [{ playerId, currencyCode, amount, reason: 'e2e grant' }] },
|
||||
);
|
||||
}
|
||||
|
||||
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
||||
|
||||
/** Retries a read until ok(result) holds — absorbs release/cache reload lag. */
|
||||
|
||||
Reference in New Issue
Block a user