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

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
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
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 description provided.