-
-
Notifications
You must be signed in to change notification settings - Fork 50
Conversation
015a163
to
4e52067
Compare
@@ -228,7 +234,7 @@ describe('hd-keyring', () => { | |||
expect(accountsSecondCheck[1]).toStrictEqual(secondAcct); | |||
expect(accountsSecondCheck).toHaveLength(2); | |||
const serialized = await keyring.serialize(); | |||
expect(keyring._uint8ArrayToString(serialized.mnemonic)).toStrictEqual( | |||
expect(Buffer.from(serialized.mnemonic).toString()).toStrictEqual( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is simply reverting this change
keyring.mnemonic.toString(), | ||
); | ||
beforeEach(() => { | ||
keyring = new HdKeyring({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Rather than introduce a new beforeEach
, it'd probably be better to move this step into each test instead. Setup within each test allows customization, avoiding this scenario we're in here where setup steps get repeated (e.g. here the constructor is getting called twice; three times for some tests).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops! PR to address this here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Per @Gudahtt 's here we want to revert the serialization format from
Uint8Arrays
because they don't serialize nicely to JSON and we want to avoid any possible issues that arise there, back to an untyped array.This format was previously changed here and released with
v5.0.0