mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-08-12 01:17:43 +00:00
Minor fixes
This commit is contained in:
@@ -284,9 +284,9 @@ import { SerializedDLEQ } from '@cashu/cashu-ts'
|
||||
p.isSpent = true
|
||||
}
|
||||
// Automatically clean if any were in mint-pending list
|
||||
const secrets = proofs.map(p => p.secret)
|
||||
self.pendingByMintSecrets.replace(
|
||||
self.pendingByMintSecrets.filter(s => !secrets.includes(s))
|
||||
const secrets = new Set(proofs.map(p => p.secret))
|
||||
self.pendingByMintSecrets.replace(
|
||||
self.pendingByMintSecrets.filter(s => !secrets.has(s))
|
||||
)
|
||||
},
|
||||
|
||||
|
||||
@@ -1295,13 +1295,19 @@ const handlePendingQueue = async (): Promise<void> => {
|
||||
message: 'Lightning invoice expired',
|
||||
createdAt: new Date(),
|
||||
}
|
||||
|
||||
const txData = tx.data ? [...JSON.parse(tx.data), update] : [update]
|
||||
|
||||
tx.update({
|
||||
status: TransactionStatus.EXPIRED,
|
||||
data: JSON.stringify(txData),
|
||||
})
|
||||
|
||||
try {
|
||||
const txData = tx.data ? [...JSON.parse(tx.data), update] : [update]
|
||||
tx.update({
|
||||
status: TransactionStatus.EXPIRED,
|
||||
data: JSON.stringify(txData),
|
||||
})
|
||||
} catch(e: any) {
|
||||
tx.update({
|
||||
status: TransactionStatus.EXPIRED,
|
||||
data: JSON.stringify(update),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user