Skip to content

Commit

Permalink
feat(getPincodeInfo): new method
Browse files Browse the repository at this point in the history
  • Loading branch information
atabel committed Mar 6, 2024
1 parent 3bf8baf commit 9c93e32
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export {
getNetworkConnectionInfo,
setActionBehavior,
getTopazToken,
getPincodeInfo,
onNavigationBarIconClicked,
} from './src/utils';
export type {ShareOptions, NavigationBarIcon} from './src/utils';
Expand Down
7 changes: 7 additions & 0 deletions src/post-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,13 @@ export type ResponsesFromNativeApp = {
id: string;
payload: DataConnectionResponse;
};
GET_PINCODE_INFO: {
type: 'GET_PINCODE_INFO';
id: string;
payload: {
status: 'enabled' | 'disabled';
};
};
};

export type NativeAppResponsePayload<
Expand Down
3 changes: 3 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,6 @@ export const getTopazToken = (
},
options.timeout,
);

export const getPincodeInfo = (): Promise<{status: 'enabled' | 'disabled'}> =>
postMessageToNativeApp({type: 'GET_PINCODE_INFO'});

0 comments on commit 9c93e32

Please sign in to comment.