Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #246 from JoinColony/hotfix/metamask-throw-on-cancel
Browse files Browse the repository at this point in the history
purser-metamask will throw when cancelling signing a message or transaction
  • Loading branch information
rdig authored Jul 15, 2019
2 parents 92683cd + ffb07ab commit 57eee3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions modules/node_modules/@colony/purser-metamask/staticMethods.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ describe('`Metamask` Wallet Module Static Methods', () => {
mockedMessageSignature,
),
);
expect(() => signMessage(mockedArgumentsObject)).not.toThrow();
expect(warning).toHaveBeenCalled();
expect(signMessage(mockedArgumentsObject)).rejects.toThrow();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ describe('`Metamask` Wallet Module Static Methods', () => {
});
expect(signTransaction(mockedArgumentsObject)).rejects.toThrow();
});
test('Warns if the user cancelled signing the message', async () => {
test('Throws if the user cancelled signing the message', async () => {
/*
* Mock it locally to simulate an error
*/
Expand All @@ -225,8 +225,7 @@ describe('`Metamask` Wallet Module Static Methods', () => {
mockedTransactionHash,
),
);
expect(() => signTransaction(mockedArgumentsObject)).not.toThrow();
expect(warning).toHaveBeenCalled();
expect(signTransaction(mockedArgumentsObject)).rejects.toThrow();
});
});
});

0 comments on commit 57eee3d

Please sign in to comment.