Skip to content

Commit

Permalink
Update nodejs example used for CI job to pass ConditionContext instea…
Browse files Browse the repository at this point in the history
…d of directly passing auth provider.
  • Loading branch information
derekpierre committed Jul 19, 2024
1 parent a5ffe6a commit d8d62a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/taco/nodejs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from '@nucypher/taco';
import * as dotenv from 'dotenv';
import { ethers } from 'ethers';
import { USER_ADDRESS_PARAM_DEFAULT } from '../../../../packages/taco-auth/dist/cjs';

dotenv.config();

Expand Down Expand Up @@ -94,11 +95,13 @@ const decryptFromBytes = async (encryptedBytes: Uint8Array) => {
consumerSigner,
siweParams,
);
const conditionContext = conditions.context.ConditionContext.fromMessageKit(messageKit);
conditionContext.addAuthProvider(USER_ADDRESS_PARAM_DEFAULT, authProvider);
return decrypt(
provider,
domain,
messageKit,
authProvider,
conditionContext,
getPorterUri(domain),
);
};
Expand Down

0 comments on commit d8d62a8

Please sign in to comment.