diff --git a/examples/taco/nextjs/src/hooks/useTaco.ts b/examples/taco/nextjs/src/hooks/useTaco.ts index 81ff0dc5d..160517c6a 100644 --- a/examples/taco/nextjs/src/hooks/useTaco.ts +++ b/examples/taco/nextjs/src/hooks/useTaco.ts @@ -7,6 +7,7 @@ import { getPorterUri, initialize, ThresholdMessageKit, + USER_ADDRESS_PARAM_DEFAULT, } from '@nucypher/taco'; import { ethers } from 'ethers'; import { useCallback, useEffect, useState } from 'react'; @@ -33,11 +34,13 @@ export default function useTaco({ } const messageKit = ThresholdMessageKit.fromBytes(encryptedBytes); const authProvider = new EIP4361AuthProvider(provider, signer); + const conditionContext = conditions.context.ConditionContext.fromMessageKit(messageKit); + conditionContext.addAuthProvider(USER_ADDRESS_PARAM_DEFAULT, authProvider); return decrypt( provider, domain, messageKit, - authProvider, + conditionContext, getPorterUri(domain), ); }, diff --git a/examples/taco/react/src/hooks/useTaco.ts b/examples/taco/react/src/hooks/useTaco.ts index 81ff0dc5d..160517c6a 100644 --- a/examples/taco/react/src/hooks/useTaco.ts +++ b/examples/taco/react/src/hooks/useTaco.ts @@ -7,6 +7,7 @@ import { getPorterUri, initialize, ThresholdMessageKit, + USER_ADDRESS_PARAM_DEFAULT, } from '@nucypher/taco'; import { ethers } from 'ethers'; import { useCallback, useEffect, useState } from 'react'; @@ -33,11 +34,13 @@ export default function useTaco({ } const messageKit = ThresholdMessageKit.fromBytes(encryptedBytes); const authProvider = new EIP4361AuthProvider(provider, signer); + const conditionContext = conditions.context.ConditionContext.fromMessageKit(messageKit); + conditionContext.addAuthProvider(USER_ADDRESS_PARAM_DEFAULT, authProvider); return decrypt( provider, domain, messageKit, - authProvider, + conditionContext, getPorterUri(domain), ); },