feat(#305): Extract use ble enabled to a constant instead of env check

This commit is contained in:
Tilak Puli
2023-01-16 15:29:33 +05:30
parent 759295ac05
commit bbea73fd38
4 changed files with 8 additions and 6 deletions

View File

@@ -9,7 +9,9 @@ const { Openid4vpBle } = OpenIdBle;
type ShareProtocol = OpenIDBLEShare | IdpassSmartshareType;
let ShareLib: ShareProtocol;
if (USE_BLE_SHARE === 'true') {
export const isBLEEnabled = USE_BLE_SHARE === 'true';
if (isBLEEnabled) {
ShareLib = Openid4vpBle;
} else {
ShareLib = IdpassSmartshare;