mirror of
https://github.com/dergigi/boris.git
synced 2025-12-19 07:34:28 +01:00
refactor: cleanup after bunker signing implementation
- Remove reconnectBunkerSigner function, inline logic into App.tsx for better control
- Clean up try-catch wrapper in highlightCreationService, signing now works reliably
- Remove extra logging from signing process (already has [bunker] prefix logs)
- Simplify nostrConnect.ts to just export permissions helper
- Update api/article-og.ts to use local relay config instead of import
- All bunker signing tests now passing ✅
This commit is contained in:
@@ -48,8 +48,6 @@ export async function createHighlight(
|
||||
// Create EventFactory with the account as signer
|
||||
const factory = new EventFactory({ signer: account })
|
||||
|
||||
// Let signer.requireConnection handle connectivity during sign
|
||||
|
||||
let blueprintSource: NostrEvent | AddressPointer | string
|
||||
let context: string | undefined
|
||||
|
||||
@@ -119,19 +117,8 @@ export async function createHighlight(
|
||||
|
||||
// Sign the event
|
||||
console.log('[bunker] Signing highlight event...', { kind: highlightEvent.kind, tags: highlightEvent.tags.length })
|
||||
let signedEvent
|
||||
try {
|
||||
console.log('[bunker] Signer before sign:', {
|
||||
type: (account as any).signer?.constructor?.name,
|
||||
listening: (account as any).signer?.listening,
|
||||
connected: (account as any).signer?.isConnected
|
||||
})
|
||||
signedEvent = await factory.sign(highlightEvent)
|
||||
console.log('[bunker] ✅ Highlight signed successfully!', { id: signedEvent.id?.slice(0, 8) })
|
||||
} catch (err) {
|
||||
console.error('[bunker] ❌ Highlight signing failed:', err)
|
||||
throw err
|
||||
}
|
||||
const signedEvent = await factory.sign(highlightEvent)
|
||||
console.log('[bunker] ✅ Highlight signed successfully!', { id: signedEvent.id.slice(0, 8) })
|
||||
|
||||
// Use unified write service to store and publish
|
||||
await publishEvent(relayPool, eventStore, signedEvent)
|
||||
|
||||
Reference in New Issue
Block a user