From 3932e8c510c585fc75dbee5338c65f5e7cd4445b Mon Sep 17 00:00:00 2001 From: Ashoat Tevosyan Date: Tue, 7 Jan 2025 12:19:45 -0500 Subject: [PATCH] [lib] Fix SIWESignatureRequestData union type Discussed this today in a meeting with Kamil and Tomek. `{ messageType: 'msg_backup_restore' }` should not be a valid type without the other properties. --- lib/types/siwe-types.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types/siwe-types.js b/lib/types/siwe-types.js index c8b05c7dd4..9e2a03b3bf 100644 --- a/lib/types/siwe-types.js +++ b/lib/types/siwe-types.js @@ -147,7 +147,7 @@ export const SIWEMessageTypes = Object.freeze({ export type SIWEMessageType = $Values; export type SIWESignatureRequestData = - | { +messageType: SIWEMessageType } + | { +messageType: 'msg_auth' | 'msg_backup' } | { +messageType: 'msg_backup_restore', +siweNonce: string,