@blockrun/franklin 3.15.62 → 3.15.63
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.
- package/dist/agent/context.js +19 -5
- package/package.json +1 -1
package/dist/agent/context.js
CHANGED
|
@@ -614,13 +614,27 @@ function readRuntimeWallet() {
|
|
|
614
614
|
return {};
|
|
615
615
|
const blockrunDir = path.join(home, '.blockrun');
|
|
616
616
|
const out = {};
|
|
617
|
+
// Chain selection: prefer the canonical `payment-chain` (matches
|
|
618
|
+
// src/config.ts:CHAIN_FILE which the rest of the codebase writes).
|
|
619
|
+
// Fall back to the legacy `.chain` for installs that haven't migrated.
|
|
620
|
+
// Verified 2026-05-05: .chain on this machine read "base" (last
|
|
621
|
+
// updated 2026-03-14), payment-chain read "base" (last updated
|
|
622
|
+
// 2026-05-04) — same value here, but the two paths can diverge any
|
|
623
|
+
// time the user's panel UI or `franklin <chain>` writes the new one
|
|
624
|
+
// while the old file stays frozen. Reading both, preferring the new,
|
|
625
|
+
// closes the gap silently.
|
|
617
626
|
try {
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
627
|
+
const newChainFile = path.join(blockrunDir, 'payment-chain');
|
|
628
|
+
const legacyChainFile = path.join(blockrunDir, '.chain');
|
|
629
|
+
let chain = '';
|
|
630
|
+
if (fs.existsSync(newChainFile)) {
|
|
631
|
+
chain = fs.readFileSync(newChainFile, 'utf-8').trim();
|
|
623
632
|
}
|
|
633
|
+
if (!chain && fs.existsSync(legacyChainFile)) {
|
|
634
|
+
chain = fs.readFileSync(legacyChainFile, 'utf-8').trim();
|
|
635
|
+
}
|
|
636
|
+
if (chain)
|
|
637
|
+
out.chain = chain;
|
|
624
638
|
}
|
|
625
639
|
catch { /* ignore */ }
|
|
626
640
|
// Base address: derive via @blockrun/llm (handles the private key in .session)
|
package/package.json
CHANGED