Skip to content

Commit

Permalink
Halo: always pick "credential" execution method by default
Browse files Browse the repository at this point in the history
  • Loading branch information
icedevml committed Oct 1, 2024
1 parent f9c3b27 commit 6f10c13
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions core/src.ts/drivers/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,11 @@ function makeDefault<Type>(curValue: Type | null | undefined, defaultValue: Type

/**
* Detect the best command execution method for the current device.
* @returns {string} Either "credential" or "webnfc".
* Historically, this method was trying to pick the best among "credential" or "webnfc".
* Right now it is going to statically return "credential" in all cases.
*/
export function detectMethod() {
try {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
new window.NDEFReader();
} catch (e) {
// WebNFC not supported
return "credential";
}

return "webnfc";
export function detectMethod(): "credential" {
return "credential";
}

function defaultStatusCallback(cause: string, statusObj: StatusCallbackDetails) {
Expand Down

0 comments on commit 6f10c13

Please sign in to comment.