Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'canAddPasses' of undefined #2

Closed
rikenppatel opened this issue Dec 7, 2017 · 1 comment
Closed

Cannot read property 'canAddPasses' of undefined #2

rikenppatel opened this issue Dec 7, 2017 · 1 comment

Comments

@rikenppatel
Copy link

Looks like it's not calling any native iOS methods. I tried deleting node_modules and installing packages again to work react-native-link. Still no luck with that.
screen shot 2017-12-06 at 8 29 15 pm

Is there anything that I might be missing?

screen shot 2017-12-05 at 11 03 49 am

FYI
I am calling below function on button click.

Wallet.canAddPasses()
      .then(res => {
          console.log(res);
      })
      .catch((e) => {
          console.log(e);
      });
@erikpoort
Copy link
Owner

Hi RP20,
Sorry for the delayed response!
The 'canAddPasses' is a really straightforward call in native iOS. It's synchronous and returns a boolean. So it didn't make sense to me to return a promise here.
Please try:
Wallet.canAddPasses(added => { // Handle rest });
Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants