Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch breaking change in signTypeData param validation #11309

Merged
merged 1 commit into from
Jun 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/scripts/lib/typed-message-manager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import EventEmitter from 'events';
import { strict as assert } from 'assert';
import assert from 'assert';
import { ObservableStore } from '@metamask/obs-store';
import { ethErrors } from 'eth-rpc-errors';
import { typedSignatureHash, TYPED_MESSAGE_SCHEMA } from 'eth-sig-util';
Expand Down Expand Up @@ -177,7 +177,7 @@ export default class TypedMessageManager extends EventEmitter {
break;
case 'V3':
case 'V4': {
assert.equal(
assert.strictEqual(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preserving strict equality check where there is no reported issue.

typeof params.data,
'string',
'"params.data" must be a string.',
Expand All @@ -191,7 +191,7 @@ export default class TypedMessageManager extends EventEmitter {
data.primaryType in data.types,
`Primary type of "${data.primaryType}" has no type definition.`,
);
assert.equal(
assert.strictEqual(
validation.errors.length,
0,
'Signing data must conform to EIP-712 schema. See https://git.io/fNtcx.',
Expand Down