mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
feat: improve tree and registration
This commit is contained in:
@@ -14,6 +14,7 @@ export const DSC_TREE_URL = 'https://tree.self.xyz/dsc';
|
||||
export const CSCA_TREE_URL_STAGING = 'https://tree.staging.self.xyz/csca';
|
||||
export const DSC_TREE_URL_STAGING = 'https://tree.staging.self.xyz/dsc';
|
||||
export const IDENTITY_TREE_URL = 'https://tree.self.xyz/identity';
|
||||
export const IDENTITY_TREE_URL_STAGING = 'https://tree.staging.self.xyz/identity';
|
||||
|
||||
export const PASSPORT_ATTESTATION_ID = '1'; //"8518753152044246090169372947057357973469996808638122125210848696986717482788"
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export async function getDSCTree(endpointType: EndpointType): Promise<string> {
|
||||
}
|
||||
|
||||
export async function getCommitmentTree(documentType: DocumentType | null): Promise<string> {
|
||||
const identityTreeUrl = documentType === null || documentType === 'passport' ? IDENTITY_TREE_URL : IDENTITY_TREE_URL_STAGING;
|
||||
const identityTreeUrl = !documentType || typeof documentType !== 'string' || documentType === 'passport' ? IDENTITY_TREE_URL : IDENTITY_TREE_URL_STAGING;
|
||||
const response = await fetch(identityTreeUrl);
|
||||
return await response.json().then(data => data.data ? data.data : data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user