Skip to content

Commit df69093

Browse files
committed
fix: callback watcher re-add saveCallbackData usage
1 parent 122d302 commit df69093

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

web/store/callbackActions.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type CallbackStatus = 'closing' | 'error' | 'loading' | 'ready' | 'success';
2323
setActivePinia(createPinia());
2424

2525
export const useCallbackActionsStore = defineStore('callbackActions', () => {
26-
const { send, watcher } = useCallback({
26+
const { send, watcher: providedWatcher } = useCallback({
2727
encryptionKey: import.meta.env.VITE_CALLBACK_KEY,
2828
});
2929
const accountStore = useAccountStore();
@@ -37,6 +37,13 @@ export const useCallbackActionsStore = defineStore('callbackActions', () => {
3737
const callbackData = ref<QueryPayloads>();
3838
const callbackError = ref();
3939

40+
const watcher = () => {
41+
const result = providedWatcher();
42+
if (result) {
43+
saveCallbackData(result);
44+
}
45+
};
46+
4047
const saveCallbackData = (decryptedData?: QueryPayloads) => {
4148
if (decryptedData) {
4249
callbackData.value = decryptedData;

0 commit comments

Comments
 (0)