File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
packages/core/src/connect/message-signing Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' micro-stacks ' : patch
3
+ ---
4
+
5
+ This update fixes a small bug where the nullish operator would always return a value and prevent legacy hashed messages from being verified.
Original file line number Diff line number Diff line change @@ -149,13 +149,13 @@ export const verifyMessageSignature = (options: {
149
149
stxAddress ?: string ;
150
150
mode ?: 'vrs' | 'rsv' ;
151
151
} ) => {
152
- const isValid = _verifyMessageSignature ( options ) ;
153
- return isValid
154
- ? true
155
- : _verifyMessageSignature ( {
156
- ... options ,
157
- prefix : LEGACY_CHAIN_PREFIX_BYTES ,
158
- } ) ;
152
+ return (
153
+ _verifyMessageSignature ( options ) ||
154
+ _verifyMessageSignature ( {
155
+ ... options ,
156
+ prefix : LEGACY_CHAIN_PREFIX_BYTES ,
157
+ } )
158
+ ) ;
159
159
} ;
160
160
161
161
export const verifyStructuredMessageSignature = ( options : {
@@ -166,9 +166,8 @@ export const verifyStructuredMessageSignature = (options: {
166
166
stxAddress ?: string ;
167
167
mode ?: 'vrs' | 'rsv' ;
168
168
} ) => {
169
- const isValid = _verifyStructuredMessageSignature ( options ) ;
170
169
return (
171
- isValid ??
170
+ _verifyStructuredMessageSignature ( options ) ||
172
171
_verifyStructuredMessageSignature ( {
173
172
...options ,
174
173
prefix : LEGACY_CHAIN_PREFIX_BYTES ,
You can’t perform that action at this time.
0 commit comments