@@ -345,20 +345,6 @@ export const OpenAIOAuthPlugin: Plugin = async ({ client }: PluginInput) => {
345345 options ?: { title ?: string ; duration ?: number } ,
346346 ) : Promise < void > => showRuntimeToast ( client , message , variant , options ) ;
347347
348- const hydrateEmails = async (
349- storage : AccountStorageV3 | null ,
350- ) : Promise < AccountStorageV3 | null > =>
351- hydrateRuntimeEmails ( storage , {
352- queuedRefresh,
353- extractAccountId,
354- sanitizeEmail,
355- extractAccountEmail,
356- shouldUpdateAccountIdFromToken,
357- saveAccounts,
358- logWarn,
359- pluginName : PLUGIN_NAME ,
360- } ) ;
361-
362348 const applyUiRuntimeFromConfig = (
363349 pluginConfig : ReturnType < typeof loadPluginConfig > ,
364350 ) : UiRuntimeOptions => {
@@ -2396,7 +2382,16 @@ export const OpenAIOAuthPlugin: Plugin = async ({ client }: PluginInput) => {
23962382 const runAccountCheck = async (
23972383 deepProbe : boolean ,
23982384 ) : Promise < void > => {
2399- const loadedStorage = await hydrateEmails ( await loadAccounts ( ) ) ;
2385+ const loadedStorage = await hydrateRuntimeEmails ( await loadAccounts ( ) , {
2386+ queuedRefresh,
2387+ extractAccountId,
2388+ sanitizeEmail,
2389+ extractAccountEmail,
2390+ shouldUpdateAccountIdFromToken,
2391+ saveAccounts,
2392+ logWarn,
2393+ pluginName : PLUGIN_NAME ,
2394+ } ) ;
24002395 const workingStorage = loadedStorage
24012396 ? {
24022397 ...loadedStorage ,
@@ -2807,7 +2802,16 @@ export const OpenAIOAuthPlugin: Plugin = async ({ client }: PluginInput) => {
28072802
28082803 if ( ! explicitLoginMode ) {
28092804 while ( true ) {
2810- const loadedStorage = await hydrateEmails ( await loadAccounts ( ) ) ;
2805+ const loadedStorage = await hydrateRuntimeEmails ( await loadAccounts ( ) , {
2806+ queuedRefresh,
2807+ extractAccountId,
2808+ sanitizeEmail,
2809+ extractAccountEmail,
2810+ shouldUpdateAccountIdFromToken,
2811+ saveAccounts,
2812+ logWarn,
2813+ pluginName : PLUGIN_NAME ,
2814+ } ) ;
28112815 const workingStorage = loadedStorage
28122816 ? {
28132817 ...loadedStorage ,
0 commit comments