Skip to content

Commit

Permalink
feat: remove getDeviceId api
Browse files Browse the repository at this point in the history
  • Loading branch information
francisco-tanker authored and JMounier committed Sep 2, 2022
1 parent 072773b commit b9ec131
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
12 changes: 0 additions & 12 deletions packages/core/src/Tanker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,6 @@ export class Tanker extends EventEmitter {
return this._session;
}

get deviceId(): b64string {
console.warn('The "deviceId" property is deprecated, it will be removed in the future');

assertStatus(this.status, statuses.READY, 'get the device id');

const deviceId = this.session.deviceId();
if (!deviceId)
throw new InternalError('Tried to get our device id, but could not find it!');

return utils.toBase64(deviceId);
}

_lockCall<T, F extends (...args: any[]) => Promise<T>>(name: string, f: F): (...args: Parameters<F>) => ReturnType<F> {
return (...args: Parameters<F>) => this._localDeviceLock.lock(name, () => f(...args)) as ReturnType<F>;
}
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/__tests__/Tanker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ describe('Tanker', () => {
expect(tanker.options).to.deep.equal(options);
});

it('should throw when trying to get deviceId', async () => {
expect(() => tanker.deviceId).to.throw(PreconditionFailed);
});

it('should throw when trying to get verification methods', async () => {
await expect(tanker.getVerificationMethods()).to.be.rejectedWith(PreconditionFailed);
});
Expand Down

0 comments on commit b9ec131

Please sign in to comment.