Skip to content

Commit

Permalink
refactor(sdk,biometry): remove static folder. Replace with requestBio…
Browse files Browse the repository at this point in the history
…metry
  • Loading branch information
heyqbnk committed Oct 4, 2024
1 parent 8d75d72 commit e2bde3f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/sdk/src/scopes/components/biometry/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export {
isRequestingAccess as isRequestingBiometryAccess,
} from './exports.variable.js';
export * as biometry from './exports.variable.js';
export * from './requestBiometry.js';
export type {
AuthenticateOptions as AuthenticateBiometryOptions,
State as BiometryState,
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/scopes/components/biometry/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
isAuthenticating,
isMounting,
} from './signals.js';
import { request as requestBiometry } from './static.js';
import { requestBiometry } from './requestBiometry.js';
import { eventToState } from './eventToState.js';
import type {
State,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ExecuteWithOptions, CancelablePromise } from '@telegram-apps/bridge';

import { request as _request } from '@/scopes/globals.js';
import { request } from '@/scopes/globals.js';
import { withIsSupported } from '@/scopes/withIsSupported.js';

import { eventToState } from './eventToState.js';
Expand All @@ -12,10 +12,8 @@ const GET_INFO_METHOD = 'web_app_biometry_get_info';
* Requests biometry information.
* @param options - additional execution options.
*/
export const request = withIsSupported(
export const requestBiometry = withIsSupported(
(options?: ExecuteWithOptions): CancelablePromise<State> => {
return _request(GET_INFO_METHOD, 'biometry_info_received', options).then(eventToState);
return request(GET_INFO_METHOD, 'biometry_info_received', options).then(eventToState);
}, GET_INFO_METHOD,
);

export type * from './types.js';

0 comments on commit e2bde3f

Please sign in to comment.