Skip to content

Commit

Permalink
fix:building issues
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Javier Ribó Labrador <[email protected]>
  • Loading branch information
elribonazo committed May 18, 2024
1 parent b868f79 commit 924857c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions externals/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ buildAnonCreds() {
#The code will fully work
cd "${GenAnonCreds}-wasm-browser"
if is_mac; then
sed -i '' "/if (typeof input === 'undefined') {/,/}/d" "./${AnonCreds}.js"
sed -i '' "/if (typeof input === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js"
else
sed -i "/if (typeof input === 'undefined') {/,/}/d" "./${AnonCreds}.js"
sed -i "/if (typeof input === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js"
fi
cd $ExternalsDir
git submodule | grep $AnonCreds | awk '{print $1}' > "./${AnonCreds}.commit"
Expand Down
3 changes: 1 addition & 2 deletions src/pollux/AnoncredsLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export class AnoncredsLoader {
/*START.BROWSER_ONLY*/
if (typeof window !== "undefined" && !this.loaded) {
this.pkg = await import("anoncreds-browser");
/** @ts-ignore */
const pkgWasm = await import("anoncreds-browser/anoncreds_bg.wasm");
const pkgWasm = await import("anoncreds-browser/anoncreds_wasm_bg.wasm");
await (this.pkg as any).default(await (pkgWasm as any).default());
this.loaded = true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/pollux/Pollux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ export default class Pollux implements IPollux {
await this.fetchSchema(schema_id);


const schemas_dict = new Map<String, Anoncreds.CredentialSchemaType>()
const definitions_dict = new Map<String, Anoncreds.CredentialDefinitionType>()
const schemas_dict = new Map<string, Anoncreds.CredentialSchemaType>()
const definitions_dict = new Map<string, Anoncreds.CredentialDefinitionType>()

definitions_dict.set(cred_def_id, credentialDefinition);
schemas_dict.set(schema_id, credentialSchema);
Expand Down

0 comments on commit 924857c

Please sign in to comment.