Bitcoin thin client for iOS & Android. Built with React Native
  • TypeScript 68%
  • JavaScript 20.3%
  • Swift 5.1%
  • Kotlin 3.2%
  • Ruby 2.1%
  • Other 1.1%
Find a file
pietro909 f6c5721eaa
FIX: refund Lightning sends stranded by the Boltz shutdown (#9088)
* FIX: refund Lightning sends stranded by the Boltz shutdown

Lightning sends still in flight when Boltz shut down keep the user's sats
at their lockup address. The existing sweep only looked at swaps Boltz had
marked failed or claimed, so a send stuck in a pending status, which Boltz
can now never move, was never refunded.

Once a lockup's refund locktime passes, its refundWithoutReceiver leaf
needs only the sender's key and the Ark operator. The lockup parameters
exist only in the stored BoltzSwap rows, so on each wallet init every send
without a recorded payment is rebuilt from its row, checked against its
stored lockup address and registered with the SDK as a vhtlc contract.
The SDK's recoverVtxos() then settles the matured ones back to the wallet.
Sends with a recorded payment (invoice.paid, transaction.claim.pending,
transaction.claimed) are never refunded.

Only @arkade-os/sdk is used, and the BoltzSwap schema is now app-owned
(identical, so no migration), so the refund keeps working once
@arkade-os/boltz-swap is removed.

A lockup the operator has not swept yet waits until its batch expires
before recoverVtxos() picks it up.

* FIX: mark stranded sends refunded once their lockup is recovered

The automatic refund left the BoltzSwap rows untouched, so a recovered
failed send still offered its Refund button, and tapping it failed with
"VHTLC is already spent". The rows were also registered again on every
launch.

Lockups that held an unspent coin before recoverVtxos() and none after
are now marked refunded. Lockups that were already empty, such as one
Boltz claimed, are left alone.

* TST: cover a stranded send that fails to register

* FIX: show stranded sends refunded without Boltz as refunded

* REF: keep the BoltzSwap schema in its own module

Opening the Arkade Realm no longer loads the stranded-send refund code.

* FIX: mark a stranded send refunded on a later launch if this one cannot confirm it

A lockup seen funded right before a recovery is recorded on its row, so
one found empty on any later launch is marked refunded even when nothing
is left to recover: the app was killed, a write threw, or the SDK read
back stored vtxos while the indexer was unreachable.

* FIX: show sends Boltz paid but never claimed as paid
2026-11-28 07:06:34 +00:00
.bundle OPS: Update to RN 67 2022-02-11 11:47:06 +00:00
.github FIX: receive images through the Mac Catalyst share service (#9072) 2026-11-26 03:54:47 +00:00
.tx FIX: repair Transifex fastlane metadata integration 2026-06-29 17:29:43 +01:00
__mocks__ Delete react-native-tor.ts 2024-11-19 23:17:44 -04:00
android ADD: Rich wallet history exports and BIP-329 Quick Look (#9085) 2026-11-23 19:24:22 +01:00
blue_modules FIX: refund Lightning sends stranded by the Boltz shutdown (#9088) 2026-11-28 07:06:34 +00:00
class FIX: refund Lightning sends stranded by the Boltz shutdown (#9088) 2026-11-28 07:06:34 +00:00
codegen FIX: receive images through the Mac Catalyst share service (#9072) 2026-11-26 03:54:47 +00:00
components REF: CPFP, RBFBumpFee, RBFCancel to TypeScript function components 2026-11-24 13:10:22 +00:00
fastlane FIX: receive images through the Mac Catalyst share service (#9072) 2026-11-26 03:54:47 +00:00
helpers FIX: receive images through the Mac Catalyst share service (#9072) 2026-11-26 03:54:47 +00:00
hooks FIX: receive images through the Mac Catalyst share service (#9072) 2026-11-26 03:54:47 +00:00
img feat: readable data on tx status (#8688) 2026-07-09 20:02:39 +02:00
ios FIX: receive images through the Mac Catalyst share service (#9072) 2026-11-26 03:54:47 +00:00
loc ADD: Rich wallet history exports and BIP-329 Quick Look (#9085) 2026-11-23 19:24:22 +01:00
models REF: TypeScript coverage — typed navigation, no any in app code (#9019) 2026-10-26 05:04:39 +00:00
navigation REF: CPFP, RBFBumpFee, RBFCancel to TypeScript function components 2026-11-24 13:10:22 +00:00
patches FIX: Android long press on tooltip menu also fired onPress 2026-11-12 09:39:44 +00:00
reproducible-builds OPS: Update all dependencies (#8986) 2026-10-07 16:25:05 +01:00
screen REF: CPFP, RBFBumpFee, RBFCancel to TypeScript function components 2026-11-24 13:10:22 +00:00
scripts fix: sync language files 2026-10-28 13:27:06 +00:00
tests FIX: refund Lightning sends stranded by the Boltz shutdown (#9088) 2026-11-28 07:06:34 +00:00
typings REF: TypeScript coverage — typed navigation, no any in app code (#9019) 2026-10-26 05:04:39 +00:00
util REF: TypeScript coverage — typed navigation, no any in app code (#9019) 2026-10-26 05:04:39 +00:00
.detoxrc.json OPS: RN 88 (#9036) 2026-10-25 00:47:13 +01:00
.dockerignore OPS: Reproducible Builds 2026-07-31 09:14:43 +01:00
.eslintrc REF: TypeScript coverage — typed navigation, no any in app code (#9019) 2026-10-26 05:04:39 +00:00
.gitignore FIX: Header Right Wallet TXs button (#9007) 2026-10-14 21:01:12 +02:00
.npmrc OPS: Update all dependencies (#8986) 2026-10-07 16:25:05 +01:00
.ruby-version OPS: Update all dependencies (#8986) 2026-10-07 16:25:05 +01:00
.watchmanconfig ...Android... 2019-01-19 00:40:41 -05:00
.xcode-env OPS: Update RN (#5305) 2023-03-04 17:51:11 +00:00
_editorconfig OPS: Upgrade RN 0.64.2 (#3170) 2021-07-06 10:38:53 +01:00
App.tsx REF: Remove size-class infrastructure (#9051) 2026-10-29 05:26:53 +00:00
babel.config.js fix: comment with the reference 2026-06-11 19:52:13 +01:00
bugsnag.js FIX: startup crash because of bugsnag 2026-02-23 13:25:04 +00:00
CLAUDE.md DOC: refresh CLAUDE.md 2026-10-26 05:05:38 +00:00
CODE_OF_CONDUCT.md DOC: operations 2019-11-29 00:22:57 +00:00
CONTRIBUTING.md DOC: contributing 2026-07-30 12:24:45 +01:00
FAQ.md Update FAQ.md - grammar fixes 2021-10-01 22:03:17 +01:00
Gemfile OPS: Update all dependencies (#8986) 2026-10-07 16:25:05 +01:00
Gemfile.lock OPS: Update all dependencies (#8986) 2026-10-07 16:25:05 +01:00
gesture-handler.js OPS: Upgrade RNav 7 (#7419) 2025-02-17 15:24:05 -04:00
gesture-handler.native.js OPS: Upgrade RNav 7 (#7419) 2025-02-17 15:24:05 -04:00
index.js OPS: upgrade Arkade SDKs and harden Ark wallet integration (#8585) 2026-06-01 15:22:17 +01:00
jest.config.js OPS: upgrade Arkade SDKs and harden Ark wallet integration (#8585) 2026-06-01 15:22:17 +01:00
LICENSE REF: cleanup 2026-02-08 12:49:58 +00:00
metro.config.js OPS: upgrade Arkade SDKs and harden Ark wallet integration (#8585) 2026-06-01 15:22:17 +01:00
msbuild.binlog ADD: Windows assets 2021-07-21 10:13:53 -04:00
NavigationService.ts FIX: deeplinks pick a suitable wallet, screens require walletID 2026-11-23 10:42:51 +00:00
package-lock.json OPS: Align npm tooling and reduce audit advisories 2026-11-08 12:21:29 -05:00
package.json OPS: Allow required dependency install scripts 2026-11-08 23:12:52 -05:00
react-native.config.js REF: Update tooltip 2026-03-28 21:26:48 +00:00
README.md OPS: Align npm tooling and reduce audit advisories 2026-11-08 12:21:29 -05:00
RELEASE.md OPS: cleanup appcenter scripts (were used for appetize); some ci & docs fixes 2024-07-30 14:25:29 +01:00
renovate.json OPS: Update all dependencies (#8986) 2026-10-07 16:25:05 +01:00
SECURITY.md Create SECURITY.md 2019-08-04 18:57:07 +01:00
shim.js ADD: lightning wallet powered by ark 2025-11-16 13:14:27 +00:00
tsconfig.json OPS: RN 88 (#9036) 2026-10-25 00:47:13 +01:00

BlueWallet - A Bitcoin & Lightning Wallet

GitHub tag code style: prettier

Thin Bitcoin Wallet. Built with React Native and Electrum.

Appstore Playstore

Website: bluewallet.io

Community: telegram group

  • Private keys never leave your device
  • Lightning Network supported
  • SegWit-first. Replace-By-Fee support
  • Encryption. Plausible deniability
  • And many more features...

BUILD & RUN IT

Please refer to the engines field in package.json for the minimum required versions of Node and npm. BlueWallet uses npm 12.2.2. It is preferred that you use an even-numbered version of Node as these are LTS versions.

To view the version of Node and npm in your environment, run the following in your console:

node --version && npm --version
  • In your console:
git clone https://github.com/BlueWallet/BlueWallet.git
cd BlueWallet
npm install

Please make sure that your console is running the most stable versions of npm and node (even-numbered versions).

  • To run on Android:

You will now need to either connect an Android device to your computer or run an emulated Android device using AVD Manager which comes shipped with Android Studio. To run an emulator using AVD Manager:

  1. Download and run Android Studio
  2. Click on "Open an existing Android Studio Project"
  3. Open build.gradle file under BlueWallet/android/ folder
  4. Android Studio will take some time to set things up. Once everything is set up, go to Tools -> AVD Manager.
  5. Click on "Create Virtual Device..." and go through the steps to create a virtual device
  6. Launch your newly created virtual device by clicking the Play button under Actions column

Once you connected an Android device or launched an emulator, run this:

npx react-native run-android

The above command will build the app and install it. Once you launch the app it will take some time for all of the dependencies to load. Once everything loads up, you should have the built app running.

  • To run on iOS:
npx pod-install
npm start

In another terminal window within the BlueWallet folder:

npx react-native run-ios

**To debug BlueWallet on the iOS Simulator, you must choose a Rosetta-compatible iOS Simulator. This can be done by navigating to the Product menu in Xcode, selecting Destination Architectures, and then opting for "Show Both." This action will reveal the simulators that support Rosetta. **

  • To run on macOS using Mac Catalyst:
npx pod-install
npm start

Open ios/BlueWallet.xcworkspace. Once the project loads, select the scheme/target BlueWallet. Click Run.

TESTS

npm run test

LICENSE

MIT

WANT TO CONTRIBUTE?

Grab an issue from the backlog, try to start or submit a PR, any doubts we will try to guide you. Contributors have a private telegram group, request access by email bluewallet@bluewallet.io

Translations

We accept translations via Transifex

To participate you need to:

  1. Sign up to Transifex
  2. Find BlueWallet project
  3. Send join request
  4. After we accept your request you will be able to start translating! That's it!

Please note the values in curly braces should not be translated. These are the names of the variables that will be inserted into the translated string. For example, the original string "{number} of {total}" in Russian will be "{number} из {total}".

Transifex automatically creates Pull Request when language reaches 100% translation. We also trigger this by hand before each release, so don't worry if you can't translate everything, every word counts.

Vocabulary glossaries

loc/vocabulary.md + the per-language files under loc/vocabulary/ are the canonical glossary of Bitcoin/Lightning terms (Wallet, Vault, Seed, Mnemonic, Passphrase, Multisig, Payment Code, Coin Control, …) and their chosen rendering in each locale, with the reasoning behind each choice and ⚠️ anti-meaning callouts (e.g. Passcode ≠ Password, Change-output ≠ verb "to change"). Use them as ground truth when translating by hand or when feeding loc/<lang>.json to an LLM — terminology consistency across screens is the difference between "looks translated" and "is correct for a Bitcoin wallet". When you change a shipped string, update the matching row in the same PR.

Q&A

Builds automated and tested with BrowserStack

Bugs reported via BugSnag

RESPONSIBLE DISCLOSURE

Found critical bugs/vulnerabilities? Please email them bluewallet@bluewallet.io Thanks!