Skip to content

Commit 301f383

Browse files
fix: resolve sign UUID from current signer
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent d397f00 commit 301f383

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/components/RightSidebar/SignTab.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import { loadState } from '@nextcloud/initial-state'
4040
import { FILE_STATUS } from '../../constants.js'
4141
import { useSidebarStore } from '../../store/sidebar.js'
4242
import { useSignStore } from '../../store/sign.js'
43+
import { getSigningRouteUuid } from '../../utils/signRequestUuid.ts'
4344
4445
defineOptions({
4546
name: 'SignTab',
@@ -70,13 +71,11 @@ function signEnabled() {
7071
}
7172
7273
function getSignRequestUuid() {
73-
const doc = currentDocument.value
74-
const signer = doc.signers?.find(row => row.me) || doc.signers?.[0]
75-
const fromDoc = [doc.signRequestUuid, doc.sign_request_uuid, doc.signUuid, doc.sign_uuid]
76-
.find((value): value is string => typeof value === 'string' && value.length > 0)
77-
const fromSigner = signer?.sign_uuid
7874
const fromState = loadState<string | null>('libresign', 'sign_request_uuid', null)
79-
return fromDoc || fromSigner || (typeof fromState === 'string' && fromState.length > 0 ? fromState : null)
75+
return getSigningRouteUuid(
76+
currentDocument.value,
77+
typeof fromState === 'string' && fromState.length > 0 ? fromState : null,
78+
)
8079
}
8180
8281
function getValidationRouteName() {

0 commit comments

Comments
 (0)