wharfkit / session

Create account-based sessions, perform transactions, and allow users to login using Antelope-based blockchains.
Other
9 stars 1 forks source link

adding Account instance on Session #90

Closed dafuga closed 7 months ago

aaroncox commented 8 months ago

I'm not sure happening automatically on login makes a lot of sense, there are probably instances where the app won't need that data and it'll just be a waste of an API call.

Then there's also on pageload when restore is called, login won't ever be - so the account instance would be missing there.

So instead of that approach of being automatic, maybe it's manual? Maybe some sort of async getter on the Session itself? Like you call await session.getAccount() or something along those lines (whatever kinda lines up with the other naming conventions on the session - which might be await session.account()).

dafuga commented 7 months ago

Thanks for the feedback @aaroncox ! Ready for another review!