fix: load screen on sign, block on missing counterpart #170
No reviewers
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sigit/sigit.io#170
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "137-sign-loading-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix:
Additional:
Closes #137
35b1378aa7
to20d1170f7d
@ -727,3 +730,1 @@
setLoadingSpinnerDesc('Generating file hashes')
const fileHashes = await generateFileHashes()
if (!fileHashes) {
setIsLoading(true)
I wonder if this flow should be refactored, given our recent conversation about error handling. I also thing that there are more efficient ways to handle loading state changes.
Having said that, perhaps it is best left to a separate PR. Worth adding as an issue?
I think we can for now just leave
finally
, to executesetIsLoading(false)
once, we don't need it in each return@ -730,0 +804,4 @@
setLoadingSpinnerDesc('Sending notifications to counterparties')
const promises = sendNotifications(meta)
await Promise.all(promises)
A promise doesn't need to be awaited if chaining is used.
We are blocking so we don't navigate away before
.all
is done.Another question is if we need to block at all since even if it's rejected, we proceed to another page anyway?
@ -543,3 +543,3 @@
const prevSig = getPrevSignersSig(hexToNpub(usersPubkey!))
if (!prevSig) return
if (!prevSig) {
Same here, re refactoring.