aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/test
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-28 16:46:50 +0800
committerFabio Berger <me@fabioberger.com>2017-12-28 16:46:50 +0800
commitee463058f153fa7de7e7dc9fbe160999cbbb5b11 (patch)
tree3fabec4342004d59f0992c320b9a8781b4200aca /packages/subproviders/test
parentc36a7471a8425ad81e1326aec90bdc12eed456a5 (diff)
downloaddexon-0x-contracts-ee463058f153fa7de7e7dc9fbe160999cbbb5b11.tar.gz
dexon-0x-contracts-ee463058f153fa7de7e7dc9fbe160999cbbb5b11.tar.zst
dexon-0x-contracts-ee463058f153fa7de7e7dc9fbe160999cbbb5b11.zip
Fix Ledger tests given change from `personal_sign` to `eth_sign`
Diffstat (limited to 'packages/subproviders/test')
-rw-r--r--packages/subproviders/test/integration/ledger_subprovider_test.ts4
-rw-r--r--packages/subproviders/test/unit/ledger_subprovider_test.ts10
2 files changed, 7 insertions, 7 deletions
diff --git a/packages/subproviders/test/integration/ledger_subprovider_test.ts b/packages/subproviders/test/integration/ledger_subprovider_test.ts
index ab4ffb19a..169e15504 100644
--- a/packages/subproviders/test/integration/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/integration/ledger_subprovider_test.ts
@@ -92,8 +92,8 @@ describe('LedgerSubprovider', () => {
const signer = accounts[0];
const payload = {
jsonrpc: '2.0',
- method: 'personal_sign',
- params: [messageHex, signer],
+ method: 'eth_sign',
+ params: [signer, messageHex],
id: 1,
};
const callback = reportCallbackErrors(done)((err: Error, response: Web3.JSONRPCResponsePayload) => {
diff --git a/packages/subproviders/test/unit/ledger_subprovider_test.ts b/packages/subproviders/test/unit/ledger_subprovider_test.ts
index 237090051..6160b9cc3 100644
--- a/packages/subproviders/test/unit/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/unit/ledger_subprovider_test.ts
@@ -121,8 +121,8 @@ describe('LedgerSubprovider', () => {
const messageHex = ethUtils.bufferToHex(ethUtils.toBuffer('hello world'));
const payload = {
jsonrpc: '2.0',
- method: 'personal_sign',
- params: [messageHex, '0x0000000000000000000000000000000000000000'],
+ method: 'eth_sign',
+ params: ['0x0000000000000000000000000000000000000000', messageHex],
id: 1,
};
const callback = reportCallbackErrors(done)((err: Error, response: Web3.JSONRPCResponsePayload) => {
@@ -157,12 +157,12 @@ describe('LedgerSubprovider', () => {
});
});
describe('failure cases', () => {
- it('should throw if `data` param not hex when calling personal_sign', (done: DoneCallback) => {
+ it('should throw if `data` param not hex when calling eth_sign', (done: DoneCallback) => {
const nonHexMessage = 'hello world';
const payload = {
jsonrpc: '2.0',
- method: 'personal_sign',
- params: [nonHexMessage, '0x0000000000000000000000000000000000000000'],
+ method: 'eth_sign',
+ params: ['0x0000000000000000000000000000000000000000', nonHexMessage],
id: 1,
};
const callback = reportCallbackErrors(done)((err: Error, response: Web3.JSONRPCResponsePayload) => {