aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/0x.ts5
-rw-r--r--src/utils/utils.ts3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/0x.ts b/src/0x.ts
index d7a01ba70..6dfd1a8f5 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -199,8 +199,9 @@ export class ZeroEx {
let msgHashHex;
const nodeVersion = await this._web3Wrapper.getNodeVersionAsync();
const isParityNode = utils.isParityNode(nodeVersion);
- if (isParityNode) {
- // Parity node adds the personalMessage prefix itself
+ const isTestRpc = utils.isTestRpc(nodeVersion);
+ if (isParityNode || isTestRpc) {
+ // Parity and TestRpc nodes add the personalMessage prefix itself
msgHashHex = orderHash;
} else {
const orderHashBuff = ethUtil.toBuffer(orderHash);
diff --git a/src/utils/utils.ts b/src/utils/utils.ts
index bad5b6498..6f2d02a70 100644
--- a/src/utils/utils.ts
+++ b/src/utils/utils.ts
@@ -22,6 +22,9 @@ export const utils = {
isParityNode(nodeVersion: string): boolean {
return _.includes(nodeVersion, 'Parity');
},
+ isTestRpc(nodeVersion: string): boolean {
+ return _.includes(nodeVersion, 'TestRPC');
+ },
isValidOrderHash(orderHashHex: string): boolean {
const isValid = /^0x[0-9A-F]{64}$/i.test(orderHashHex);
return isValid;