import BridgeFunction from './bridgeFunction'; import { MiniAppError, MiniAppErrorType } from '../miniAppError'; class GetAppLaunchOptions extends BridgeFunction { name = 'getAppLaunchOptions'; protected async executeFunction() { try { const options = JSON.parse( localStorage.getItem('appLaunchOptions') ?? '' ); return this.cbHandler?.success({ options: options }); } catch { throw new MiniAppError(MiniAppErrorType.invalidData); } } } export default GetAppLaunchOptions;