fix: load screen on sign, block on missing counterpart #170

Merged
enes merged 7 commits from 137-sign-loading-error into staging 2024-08-29 11:02:19 +00:00
Member

Fix:

  • allow signing with no marks (enables signing images and other files)
  • adding a mark without counterpart now throws a toast error

Additional:

  • fix content column size (add wrapping)

Closes #137

Fix: - allow signing with no marks (enables signing images and other files) - adding a mark without counterpart now throws a toast error Additional: - fix content column size (add wrapping) Closes #137
enes added 15 commits 2024-08-28 11:21:59 +00:00
Closes #146
fix(pdf): dynamic mark scaling
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 33s
ea09daa669
Caveat: scaling is not fluid, refresh is required
refactor(pdf): remove unused code
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 34s
8c5be3713d
fix(pdf): scaling on resize, add avatars to counterpart select
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 34s
4712031615
fix(drawfield): match label and select
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 36s
923a47b4d0
fix(pdf): add proper default width value
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 34s
a442e71087
fix(pdf): reuse content width function
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 33s
59c3fc69a2
fix(sign): allow signing without marks, hide loading and show toast for prevSig error
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 37s
35b1378aa7
enes force-pushed 137-sign-loading-error from 35b1378aa7 to 20d1170f7d 2024-08-28 11:26:52 +00:00 Compare
enes requested review from eugene 2024-08-28 12:14:07 +00:00
eugene reviewed 2024-08-29 09:43:22 +00:00
@ -727,3 +730,1 @@
setLoadingSpinnerDesc('Generating file hashes')
const fileHashes = await generateFileHashes()
if (!fileHashes) {
setIsLoading(true)
Owner

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 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?
Author
Member

I think we can for now just leave finally, to execute setIsLoading(false) once, we don't need it in each return

I think we can for now just leave `finally`, to execute `setIsLoading(false)` once, we don't need it in each return
eugene reviewed 2024-08-29 09:44:14 +00:00
@ -730,0 +804,4 @@
setLoadingSpinnerDesc('Sending notifications to counterparties')
const promises = sendNotifications(meta)
await Promise.all(promises)
Owner

A promise doesn't need to be awaited if chaining is used.

A promise doesn't need to be awaited if chaining is used.
Author
Member

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?

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?
eugene reviewed 2024-08-29 09:44:40 +00:00
@ -543,3 +543,3 @@
const prevSig = getPrevSignersSig(hexToNpub(usersPubkey!))
if (!prevSig) return
if (!prevSig) {
Owner

Same here, re refactoring.

Same here, re refactoring.
eugene approved these changes 2024-08-29 09:45:40 +00:00
enes added 1 commit 2024-08-29 10:55:01 +00:00
refactor(review): handle loading state, browser warnings
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 34s
e2b12afc72
enes merged commit 791c213e3a into staging 2024-08-29 11:02:19 +00:00
enes deleted branch 137-sign-loading-error 2024-08-29 11:02:20 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sigit/sigit.io#170
No description provided.