You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes it pretty ambiguous implementation wise.
It would be better to remove the error fields from NDKNWCResponseBase, if it is unused, and wrap the error on a stringifieable object that implements Error, so it can be handled like any other throwable error.
This ambiguity seems to have affected also the internal code here , and in some other places,
NDKNWCResponseBase
defines an error fieldndk/ndk-wallet/src/wallets/nwc/types.ts
Lines 19 to 26 in 689305c
however this is not used, instead the whole response (not just the error) is passed to the reject arguments of the promise
ndk/ndk-wallet/src/wallets/nwc/res.ts
Line 31 in 689305c
This makes it pretty ambiguous implementation wise.
It would be better to remove the error fields from
NDKNWCResponseBase
, if it is unused, and wrap the error on a stringifieable object that implementsError
, so it can be handled like any other throwable error.This ambiguity seems to have affected also the internal code here , and in some other places,
ndk/ndk-wallet/src/wallets/nwc/index.ts
Line 134 in 689305c
where there is this rethrow that is never reached, since the error is thrown and not returned by req
The text was updated successfully, but these errors were encountered: