mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Fix sync bug
This commit is contained in:
parent
9a8f6f0222
commit
059eb174f0
@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## 0.2.18
|
||||
|
||||
- [x] Re-write data storage layer to conserve memory using LRU cache
|
||||
- [x] Fix bugs with handling invalid keys
|
||||
- [x] Improve pubkey/anonymous login
|
||||
- [x] Generate placeholder profile images (@morkowski)
|
||||
|
||||
## 0.2.17
|
||||
|
||||
- [x] Make "show new notes" button fixed position
|
||||
|
@ -1,8 +1,10 @@
|
||||
# Current
|
||||
|
||||
- [ ] Test migration
|
||||
- [ ] Fix notifications
|
||||
- [ ] Add quotes to notifications
|
||||
- [ ] Show loading/success on zap invoice screen
|
||||
- [ ] Fix iOS/safari/firefox
|
||||
- [ ] Add quotes to notifications
|
||||
|
||||
# Coracle website
|
||||
|
||||
|
@ -45,7 +45,7 @@ const load = ({relays, filter, onChunk = null, shouldProcess = true, timeout = 5
|
||||
const done = new Set()
|
||||
const allEvents = []
|
||||
|
||||
const attemptToComplete = async isTimeout => {
|
||||
const attemptToComplete = async force => {
|
||||
const sub = await subPromise
|
||||
|
||||
// If we've already unsubscribed we're good
|
||||
@ -55,7 +55,7 @@ const load = ({relays, filter, onChunk = null, shouldProcess = true, timeout = 5
|
||||
|
||||
const isDone = done.size === relays.length
|
||||
|
||||
if (isTimeout) {
|
||||
if (force) {
|
||||
const timedOutRelays = reject(r => done.has(r.url), relays)
|
||||
|
||||
log(
|
||||
@ -72,7 +72,7 @@ const load = ({relays, filter, onChunk = null, shouldProcess = true, timeout = 5
|
||||
})
|
||||
}
|
||||
|
||||
if (isDone || isTimeout) {
|
||||
if (isDone || force) {
|
||||
sub.unsub()
|
||||
resolve(allEvents)
|
||||
}
|
||||
|
@ -67,14 +67,10 @@ const verifyNip05 = (pubkey, as) =>
|
||||
|
||||
relays.bulkPatch(urls.map(url => ({url: normalizeRelayUrl(url)})))
|
||||
|
||||
routes.bulkPut(
|
||||
urls
|
||||
.flatMap(url => [
|
||||
addRoute(pubkey, url, "nip05", "write", now()),
|
||||
addRoute(pubkey, url, "nip05", "read", now()),
|
||||
])
|
||||
.filter(identity)
|
||||
)
|
||||
urls.forEach(url => {
|
||||
addRoute(pubkey, url, "nip05", "write", now())
|
||||
addRoute(pubkey, url, "nip05", "read", now())
|
||||
})
|
||||
}
|
||||
}
|
||||
}, noop)
|
||||
|
Loading…
Reference in New Issue
Block a user