wharfkit / session

Create account-based sessions, perform transactions, and allow users to login using Antelope-based blockchains.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider making `storage` on the SessionKit to an optional field

aaroncox opened this issue · comments

The storage portion of the SessionKit options:

readonly storage: SessionStorage

Could potentially be made optional to reduce the constructor options required by developers, since a default actually already is being set when building a new SessionKit object:

session/src/kit.ts

Lines 106 to 110 in 9e3995b

if (options.storage) {
this.storage = options.storage
} else {
this.storage = new BrowserLocalStorage(this.appName.toString())
}

Unsure of what ramifications this might have, but was suggested in Telegram as something to look into. Without doing any research I think we might be able to do this.