Skip to content
This repository was archived by the owner on Aug 9, 2021. It is now read-only.

Commit f35672c

Browse files
committed
chore: depracate isLoggedIn
1 parent cc2acc9 commit f35672c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/3box.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const localstorage = require('store')
21
const IPFS = require('ipfs')
32
const multiaddr = require('multiaddr')
43
const { createLink, validateLink } = require('3id-blockchain-utils')
@@ -585,6 +584,7 @@ class Box extends BoxApi {
585584
* @return {Boolean} true if the user is logged in
586585
*/
587586
static isLoggedIn (address) {
587+
console.warn('Box.isLoggedIn: function no longer supported, simply call auth and it will not prompt user again if they have already authenticated')
588588
return ThreeId.isLoggedIn(address)
589589
}
590590

src/__tests__/3box.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,15 +435,13 @@ describe('3Box', () => {
435435
const box = await Box.openBox('0x12345', 'web3prov', boxOpts)
436436
await box.logout()
437437
expect(mocked3id.logoutFn).toHaveBeenCalledTimes(1)
438-
return box.close()
439438
})
440439

441440
it('should be logged out', async () => {
442441
const box = await Box.openBox('0x12345', 'web3prov', boxOpts)
443442
await box.logout()
444443
const isLoggedIn = Box.isLoggedIn('0xabcde')
445444
expect(isLoggedIn).toEqual(false)
446-
return box.close()
447445
})
448446

449447
it('should verify profiles correctly', async () => {

0 commit comments

Comments
 (0)