From bbcb1af0379e0788bb68b17a2987b9ea04c1bfda Mon Sep 17 00:00:00 2001 From: neeboo Date: Fri, 12 Jun 2020 15:47:33 +0800 Subject: [PATCH] fix(truffle_provider):remove prefix conditionly --- packages/harmony-core/src/truffleProvider.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/harmony-core/src/truffleProvider.ts b/packages/harmony-core/src/truffleProvider.ts index 9af5c80..5ee260c 100644 --- a/packages/harmony-core/src/truffleProvider.ts +++ b/packages/harmony-core/src/truffleProvider.ts @@ -143,7 +143,7 @@ export class TruffleProvider extends HDNode { jsonrpc: '2.0', }; } - case 'hmy_clientVersion': { + case 'web3_clientVersion': { callback(null, { result: `Harmony/${packageInfo.version}/@harmony-js`, id, @@ -206,8 +206,6 @@ export class TruffleProvider extends HDNode { let newMethod: string = method; if (method.startsWith('eth')) { newMethod = method.replace('eth', 'hmy'); - } else if (method.startsWith('web3')) { - newMethod = method.replace('web3', 'hmy'); } args[0].method = newMethod;