theseus/bundled-addons/aegis/lib
Local Dev c1988b9674 fix(aegis): DigiByte import failed on every OTA install
Reported as "the Aegis DigiByte import error". The vendored @dgb-wallet/core
modules under lib/dgb/ imported "bitcoinjs-lib", "bip32", "ecpair",
"bip39" and "@bitcoinerlab/secp256k1" as bare specifiers. Node's ESM resolver
walks up from the importing file, so that resolves in a dev checkout — where
Theseus's node_modules sits above the add-on — and resolves nowhere once
Aegis is running from <userData>/extensions/aegis/, which is every OTA
install. The import threw, index.js caught it and set dgbCore = null, and any
DigiByte import then died in digibyteNetwork() with "DGB adapter not
available".

So DigiByte worked on a fresh install and disappeared after the first update.
Confirmed on this machine: the only node_modules reachable from the installed
extension carries bip39 and none of the other four.

lib/dgb/deps.js now holds the dependencies, injected by index.js from
api.require (which resolves against the app tree) before anything under
lib/dgb/ is imported — the same pattern every other lib/*.js in Aegis already
uses, and the reason that pattern exists. Consumers read them through
accessors rather than capturing them at module scope, so import order is no
longer load-bearing: hd.js builds its bip32 on first use and the two
initEccLib callers go through a once-only ensureEcc(). Using a DGB module
without injection now throws a named error instead of a resolver failure
swallowed into a null.

Verified by loading the modules from a directory with no reachable
node_modules and deriving real addresses: BIP44 D…, BIP49 S… with its legacy
3… pair, BIP84 dgb1q…, BIP86 dgb1p… taproot, plus a WIF round-trip and the
non-DGB WIF rejection.
2026-10-03 13:59:01 +02:00
..
dgb fix(aegis): DigiByte import failed on every OTA install 2026-10-03 13:59:01 +02:00
sia chore(aegis): 0.8.2 — sectioned Settings tab 2026-09-22 20:37:28 +02:00
base58check.js Ship Theseus 0.3.28 5d15508b (Aegis update card + DevTools in tab sidebar + real favicons) 2026-09-08 18:17:25 +02:00
bcmr.js fix(aegis): 0.17.0 — both BCMR registries were dead, and self-minted tokens can now be named 2026-09-29 00:13:30 +02:00
cashaddr.js chore(aegis): 0.8.2 — sectioned Settings tab 2026-09-22 20:37:28 +02:00
cashtokens.js chore(aegis): 0.8.2 — sectioned Settings tab 2026-09-22 20:37:28 +02:00
chain-bch-imported.js fix(aegis): imported chipnet wallets linked to the dead web explorer 2026-10-02 20:45:53 +02:00
chain-bch.js feat(aegis): 0.13.1 — chipnet explorer links point at ours; explorer gains a tx view 2026-09-28 00:12:42 +02:00
chain-btc.js Ship Theseus 0.3.28 5d15508b (Aegis update card + DevTools in tab sidebar + real favicons) 2026-09-08 18:17:25 +02:00
chain-dgb.js Ship Theseus 0.3.28 5d15508b (Aegis update card + DevTools in tab sidebar + real favicons) 2026-09-08 18:17:25 +02:00
chain-eth.js Ship Theseus 0.3.28 5d15508b (Aegis update card + DevTools in tab sidebar + real favicons) 2026-09-08 18:17:25 +02:00
chain-generic-imported.js chore(aegis): 0.9.2 — Receive tab reorder, one balance, token history 2026-09-23 01:17:33 +02:00
chain-sia.js chore(aegis): 0.8.2 — sectioned Settings tab 2026-09-22 20:37:28 +02:00
chain-sol.js Ship Theseus 0.3.28 5d15508b (Aegis update card + DevTools in tab sidebar + real favicons) 2026-09-08 18:17:25 +02:00
chain-tron.js Ship Theseus 0.3.28 5d15508b (Aegis update card + DevTools in tab sidebar + real favicons) 2026-09-08 18:17:25 +02:00
chain-utxo-imported.js chore(aegis): 0.8.2 — sectioned Settings tab 2026-09-22 20:37:28 +02:00
eip712.js Ship Theseus 0.3.28 5d15508b (Aegis update card + DevTools in tab sidebar + real favicons) 2026-09-08 18:17:25 +02:00
electrum.js fix(aegis): 0.20.0 — the UTXO scan was 28k requests that always found nothing 2026-09-29 00:56:06 +02:00
import-derive.js chore(aegis): 0.8.2 — sectioned Settings tab 2026-09-22 20:37:28 +02:00
jsqr.js feat(aegis): 0.13.0 — read a seed phrase from a QR image 2026-09-28 00:05:04 +02:00
jsqr.LICENSE feat(aegis): 0.13.0 — read a seed phrase from a QR image 2026-09-28 00:05:04 +02:00
keys.js chore(aegis): 0.8.2 — sectioned Settings tab 2026-09-22 20:37:28 +02:00
prices.js chore(aegis): 0.8.5 — Coin-Spectrum price parser reads body.asset.price_usd 2026-09-22 21:31:43 +02:00
sol-spl.js Ship Theseus 0.3.28 5d15508b (Aegis update card + DevTools in tab sidebar + real favicons) 2026-09-08 18:17:25 +02:00
tx.js chore(aegis): 0.8.2 — sectioned Settings tab 2026-09-22 20:37:28 +02:00
wallet.js perf(aegis): stop freezing Theseus — a 7.4 MB store parsed on every read 2026-10-03 10:56:59 +02:00
wc-sign.js fix(aegis): 0.9.5 — WizardConnect signing actually works 2026-09-23 03:23:41 +02:00
wc.js fix(aegis): 0.9.5 — WizardConnect signing actually works 2026-09-23 03:23:41 +02:00