Point public EDUT ID surfaces to /secret/id status and activation routes
Some checks are pending
check / secretapi (push) Waiting to run
Some checks are pending
check / secretapi (push) Waiting to run
This commit is contained in:
parent
b9ca98e13f
commit
20e68c4dff
@ -98,7 +98,7 @@ async function fetchMembershipStatus(wallet, chainId) {
|
|||||||
if (chainId !== null && chainId !== undefined) {
|
if (chainId !== null && chainId !== undefined) {
|
||||||
params.set('chain_id', String(chainId));
|
params.set('chain_id', String(chainId));
|
||||||
}
|
}
|
||||||
const res = await fetch('/secret/membership/status?' + params.toString(), {
|
const res = await fetch('/secret/id/status?' + params.toString(), {
|
||||||
headers: { Accept: 'application/json' },
|
headers: { Accept: 'application/json' },
|
||||||
});
|
});
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
|||||||
@ -98,7 +98,7 @@ async function fetchMembershipStatus(wallet, chainId) {
|
|||||||
if (chainId !== null && chainId !== undefined) {
|
if (chainId !== null && chainId !== undefined) {
|
||||||
params.set('chain_id', String(chainId));
|
params.set('chain_id', String(chainId));
|
||||||
}
|
}
|
||||||
const res = await fetch('/secret/membership/status?' + params.toString(), {
|
const res = await fetch('/secret/id/status?' + params.toString(), {
|
||||||
headers: { Accept: 'application/json' },
|
headers: { Accept: 'application/json' },
|
||||||
});
|
});
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
|||||||
@ -98,7 +98,7 @@ async function fetchMembershipStatus(wallet, chainId) {
|
|||||||
if (chainId !== null && chainId !== undefined) {
|
if (chainId !== null && chainId !== undefined) {
|
||||||
params.set('chain_id', String(chainId));
|
params.set('chain_id', String(chainId));
|
||||||
}
|
}
|
||||||
const res = await fetch('/secret/membership/status?' + params.toString(), {
|
const res = await fetch('/secret/id/status?' + params.toString(), {
|
||||||
headers: { Accept: 'application/json' },
|
headers: { Accept: 'application/json' },
|
||||||
});
|
});
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
|||||||
@ -885,7 +885,7 @@ async function startWalletFlow() {
|
|||||||
flowState.sessionWallet = address;
|
flowState.sessionWallet = address;
|
||||||
|
|
||||||
setFlowStatus('membership_quoting', 'Preparing EDUT ID activation...', false);
|
setFlowStatus('membership_quoting', 'Preparing EDUT ID activation...', false);
|
||||||
const quote = await postJSON('/secret/membership/quote', {
|
const quote = await postJSON('/secret/id/quote', {
|
||||||
designation_code: verification.designation_code || intent.designation_code || null,
|
designation_code: verification.designation_code || intent.designation_code || null,
|
||||||
address,
|
address,
|
||||||
chain_id: chainId,
|
chain_id: chainId,
|
||||||
@ -916,7 +916,7 @@ async function startWalletFlow() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
setFlowStatus('membership_confirming', 'Confirming EDUT ID on-chain...', false);
|
setFlowStatus('membership_confirming', 'Confirming EDUT ID on-chain...', false);
|
||||||
const confirmation = await postJSON('/secret/membership/confirm', {
|
const confirmation = await postJSON('/secret/id/confirm', {
|
||||||
designation_code: verification.designation_code || intent.designation_code || null,
|
designation_code: verification.designation_code || intent.designation_code || null,
|
||||||
quote_id: quote.quote_id || null,
|
quote_id: quote.quote_id || null,
|
||||||
tx_hash: txHash,
|
tx_hash: txHash,
|
||||||
|
|||||||
@ -633,7 +633,7 @@
|
|||||||
throw new Error('Connect wallet first.');
|
throw new Error('Connect wallet first.');
|
||||||
}
|
}
|
||||||
|
|
||||||
const walletUrl = '/secret/membership/status?wallet=' + encodeURIComponent(state.wallet);
|
const walletUrl = '/secret/id/status?wallet=' + encodeURIComponent(state.wallet);
|
||||||
try {
|
try {
|
||||||
const payload = await fetchJson(walletUrl);
|
const payload = await fetchJson(walletUrl);
|
||||||
return normalizeMembership(payload.status || payload.membership_status);
|
return normalizeMembership(payload.status || payload.membership_status);
|
||||||
@ -642,7 +642,7 @@
|
|||||||
if (!designationCode) {
|
if (!designationCode) {
|
||||||
throw walletErr;
|
throw walletErr;
|
||||||
}
|
}
|
||||||
const codeUrl = '/secret/membership/status?designation_code=' + encodeURIComponent(designationCode);
|
const codeUrl = '/secret/id/status?designation_code=' + encodeURIComponent(designationCode);
|
||||||
const payload = await fetchJson(codeUrl);
|
const payload = await fetchJson(codeUrl);
|
||||||
return normalizeMembership(payload.status || payload.membership_status);
|
return normalizeMembership(payload.status || payload.membership_status);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,8 +122,8 @@
|
|||||||
<p class="line">/secret/wallet/verify</p>
|
<p class="line">/secret/wallet/verify</p>
|
||||||
<p class="line">/secret/wallet/session/refresh</p>
|
<p class="line">/secret/wallet/session/refresh</p>
|
||||||
<p class="line">/secret/wallet/session/revoke</p>
|
<p class="line">/secret/wallet/session/revoke</p>
|
||||||
<p class="line">/secret/membership/quote</p>
|
<p class="line">/secret/id/quote</p>
|
||||||
<p class="line">/secret/membership/confirm</p>
|
<p class="line">/secret/id/confirm</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user