Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

Commit a516c7c

Browse files
committed
fix: upgrade @synonymdev/react-native-lnurl to fix callback parsing bug
1 parent 015313c commit a516c7c

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@shopify/react-native-skia": "0.1.182",
5252
"@synonymdev/blocktank-client": "0.0.50",
5353
"@synonymdev/react-native-ldk": "0.0.96",
54-
"@synonymdev/react-native-lnurl": "0.0.3",
54+
"@synonymdev/react-native-lnurl": "0.0.4",
5555
"@synonymdev/result": "0.0.2",
5656
"@synonymdev/slashtags-auth": "^1.0.0-alpha.5",
5757
"@synonymdev/slashtags-sdk": "1.0.0-alpha.38",

src/utils/lnurl.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export const handleLnurlWithdraw = async ({
273273
selectedNetwork = getSelectedNetwork();
274274
}
275275

276-
const amountSats = params.maxWithdrawable / 1000; //Convert msats to sats.
276+
const amountSats = Math.floor(params.maxWithdrawable / 1000); //Convert msats to sats.
277277
const description = params.defaultDescription;
278278

279279
// Determine if we have enough receiving capacity before proceeding.
@@ -328,6 +328,15 @@ export const handleLnurlWithdraw = async ({
328328
return err('Unable to connect to LNURL withdraw server.');
329329
}
330330

331+
const jsonRes = await channelStatusRes.json();
332+
if (jsonRes.status === 'ERROR') {
333+
showErrorNotification({
334+
title: i18n.t('other:lnurl_withdr_error'),
335+
message: jsonRes.reason,
336+
});
337+
return err(jsonRes.reason);
338+
}
339+
331340
showSuccessNotification({
332341
title: i18n.t('other:lnurl_withdr_success_title'),
333342
message: i18n.t('other:lnurl_withdr_success_msg'),

yarn.lock

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2610,16 +2610,17 @@
26102610
dependencies:
26112611
bitcoinjs-lib "^6.0.2"
26122612

2613-
"@synonymdev/react-native-lnurl@0.0.3":
2614-
version "0.0.3"
2615-
resolved "https://registry.yarnpkg.com/@synonymdev/react-native-lnurl/-/react-native-lnurl-0.0.3.tgz#ee8da8d1ad1b18e220fd49bf7cf303ddf4db56f8"
2616-
integrity sha512-xHdrqWzjRf6Pq95qqs4uWtFSu4vsaxu05uIC0aYwHzFvMWsJvONyakNoLvgLAHOp+9nEWG5PPqQMvQItGWu79A==
2613+
"@synonymdev/react-native-lnurl@0.0.4":
2614+
version "0.0.4"
2615+
resolved "https://registry.yarnpkg.com/@synonymdev/react-native-lnurl/-/react-native-lnurl-0.0.4.tgz#1bfa6b85e29ab03795b5cf5aabfc7637e784d4d1"
2616+
integrity sha512-fUmcSmqGIXCHjNnVguqm3HlGzIkTB1x9OYFcD2xaOn+ENeRbrMDm48KMSkwFn+NdkEG/YZSTjR9N14X2lSWfYw==
26172617
dependencies:
26182618
base64-js "^1.5.1"
26192619
bip32 "^2.0.6"
26202620
bip39 "^3.0.4"
26212621
fast-sha256 "^1.3.0"
26222622
js-lnurl "^0.2.5"
2623+
query-string "^7.1.3"
26232624
readable-stream "^3.6.0"
26242625
secp256k1 "^4.0.2"
26252626
stream-browserify "^3.0.0"

0 commit comments

Comments
 (0)