3box-js icon indicating copy to clipboard operation
3box-js copied to clipboard

Feature Request | Add new profileExists() function

Open kamescg opened this issue 6 years ago • 1 comments

Right now I'm using Box.getProfile('address'), which works if an account exists. However, if an account doesn't exist then an Uncaught error is thrown.

Imgur

Would it be possible to add a new function that checks whether an account exists?

Box.profileExists('address')

My use case is detecting whether a user already has a 3box account and if they don't I want to notify them to create an account using a modal popup.

Imgur

kamescg avatar Mar 02 '19 22:03 kamescg

Thanks for the suggestion @KamesCG.

I'm wondering though, why couldn't you notify your user to create an account if you get catch this error instead?

oed avatar Mar 03 '19 11:03 oed