diff --git a/src/utils/getSignatureContext.ts b/src/utils/getSignatureContext.ts index 96f98885..b99e0a15 100644 --- a/src/utils/getSignatureContext.ts +++ b/src/utils/getSignatureContext.ts @@ -52,7 +52,7 @@ export async function getSignatureContext< } = context || {} const previousState = await (async () => { - if (context.status === 'initial') { + if (context?.previousState === undefined) { if (typeof parameters.initialState === 'function') return await (parameters.initialState as any)(contextHono) return parameters.initialState diff --git a/src/utils/getTransactionContext.ts b/src/utils/getTransactionContext.ts index b9ae1357..31646a64 100644 --- a/src/utils/getTransactionContext.ts +++ b/src/utils/getTransactionContext.ts @@ -60,12 +60,12 @@ export async function getTransactionContext< } = context || {} const previousState = await (async () => { - if (context.status === 'initial') { + if (context?.previousState === undefined) { if (typeof parameters.initialState === 'function') return await (parameters.initialState as any)(contextHono) return parameters.initialState } - return context?.previousState + return context.previousState })() const { buttonValue, inputText } = getIntentState({