Skip to content

Commit

Permalink
Merge branch 'master' into update-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
gniezen authored Sep 16, 2024
2 parents 126382f + 00d42ab commit 800da1d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/actions/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ export function doDeviceUpload(driverId, opts = {}, utc) {
let errorMessage = 'E_DEVICE_UPLOAD';
if (_.get(targetDevice, 'source.driverId', null) === 'Medtronic') {
errorMessage = 'E_MEDTRONIC_UPLOAD';
} else if (_.get(targetDevice, 'source.driverId', null) === 'BluetoothLE') {
} else if (_.get(targetDevice, 'source.driverId', null) === 'BluetoothLE' ||
_.get(targetDevice, 'source.driverId', null) === 'OneTouchVerioBLE') {
errorMessage = 'E_BLUETOOTH_PAIR';
}

Expand Down
16 changes: 15 additions & 1 deletion app/actions/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,22 @@ export function makeUploadCb(dispatch, getState, errCode, utc) {

if (errCode === 'E_BLUETOOTH_PAIR') {
displayErr.message = 'Couldn\'t connect to device.';
displayErr.link = 'https://support.tidepool.org/hc/en-us/articles/360035332972';
displayErr.linkText = 'Is it paired?';

switch(uploadTargetDevice) {
case 'foracareble':
displayErr.link = 'https://support.tidepool.org/hc/en-us/articles/14620487836564';
break;
case 'caresensble':
displayErr.link = 'https://support.tidepool.org/hc/en-us/articles/360035332972#h_01EDCWR70ZH3WMHY4RX3SC80NX';
break;
case 'onetouchverioble':
displayErr.link = 'https://support.tidepool.org/hc/en-us/articles/11554128490900';
break;
default:
displayErr.message += ' Is it paired?';
displayErr.linkText = null;
}
}

if (err.code === 'E_VERIO_WRITE') {
Expand Down
7 changes: 7 additions & 0 deletions lib/core/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ import * as actionUtils from '../../app/actions/utils';
import personUtils from './personUtils';
import env from '../../app/utils/env';

if (env.node && !env.electron && typeof globalThis.crypto === 'undefined') {
const { subtle } = require('crypto').webcrypto; // eslint-disable-line global-require
globalThis.crypto = {
subtle,
};
}

// eslint-disable-next-line no-console
const log = env.electron ? bows('Api') : console.log;

Expand Down

0 comments on commit 800da1d

Please sign in to comment.