We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 514afde commit f7ef465Copy full SHA for f7ef465
index.ts
@@ -531,7 +531,7 @@ export {
531
*/
532
function typedSignatureHash<T extends MessageTypes>(typedData: TypedData<T>): Buffer {
533
const error = new Error('Expect argument to be non-empty array')
534
- if (typeof typedData !== 'object' || !('length' in typedData)) throw error
+ if (typeof typedData !== 'object' || !('length' in typedData) || !typedData.length) throw error
535
536
const data = typedData.map(function (e) {
537
return e.type === 'bytes' ? ethUtil.toBuffer(e.value) : e.value
0 commit comments