Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mobile/ios/lightning/LndReactModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ - (instancetype)initWithResolver: (RCTPromiseResolveBlock)resolve rejecter:(RCTP
}

- (void)onError:(NSError *)p0 {
self.reject(@"error", @"received error", p0);
self.reject(@"error", [p0 localizedDescription], p0);
}

- (void)onResponse:(NSData *)p0 {
Expand Down
2 changes: 1 addition & 1 deletion src/action/payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class PaymentAction {
this._nav.goPayBitcoinConfirm();
} catch (err) {
this._notification.display({
msg: `Fee estimation failed: ${err.details}`,
msg: `Fee estimation failed: ${err}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@halseth can we change it so that err is an object that has the string on a message attribute so that we can access it like a normal JS Error like so: err.message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't really set anything, it is react-native that creates this error object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, we're not getting an error object here. err is a string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I guess that's what React Native throws then :)

err,
});
}
Expand Down