fix(firstleg): instantiate PDA progress projection

This commit is contained in:
2026-08-10 14:31:03 +08:00
parent a81f73d835
commit 013de5e921
3 changed files with 39 additions and 7 deletions
@@ -1,6 +1,8 @@
const MODULE = 'phase3-order-splitting'
const SCENARIO = 'parent-child-multi-container-consolidation'
const OPTIONS = { scenario: SCENARIO, deploymentBlocker: true }
const MERCHANT_USERNAME = process.env.MERCHANT_TEST_USERNAME || 'merchant_admin'
const MERCHANT_PASSWORD = process.env.MERCHANT_TEST_PASSWORD || 'ChangeMe123!'
function id(value) { return value == null ? '' : String(value) }
function codeOf(response) { return response?.body?.code == null ? 'missing' : String(response.body.code) }
@@ -71,7 +73,7 @@ export async function run(context) {
// Re-query through the real merchant contract as well. The customer scope is
// taken from the token; no tenant/customer id is accepted by this endpoint.
const merchantLogin = await context.request('POST', '/api/auth/login', {
username: 'merchant_admin', password: 'ChangeMe123!',
username: MERCHANT_USERNAME, password: MERCHANT_PASSWORD,
}, '')
const merchantAuth = context.apiSuccess(MODULE, '客户账号登录以验证履约树隔离', merchantLogin, '', OPTIONS)
const merchantToken = merchantAuth?.accessToken