react-native-nitro-ark 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cpp/NitroArk.hpp +5 -2
  2. package/package.json +1 -1
package/cpp/NitroArk.hpp CHANGED
@@ -406,15 +406,18 @@ namespace margelo::nitro::nitroark
406
406
  {
407
407
  char *status_c = nullptr;
408
408
  const char *comment_c = comment.has_value() ? comment->c_str() : nullptr;
409
+
410
+ uint64_t amount_val = 0;
411
+ const uint64_t* amount_ptr = nullptr;
409
412
 
410
- std::optional<uint64_t> amount_val;
411
413
  if (amountSat.has_value()) {
412
414
  amount_val = static_cast<uint64_t>(amountSat.value());
415
+ amount_ptr = &amount_val;
413
416
  }
414
417
 
415
418
  bark::bark_BarkError *error = bark::bark_send(
416
419
  destination.c_str(),
417
- amount_val.has_value() ? &amount_val.value() : nullptr,
420
+ amount_ptr,
418
421
  comment_c,
419
422
  no_sync,
420
423
  &status_c);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nitro-ark",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Pure C++ Nitro Modules for Ark client",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",