fix(truffle_provider):remove prefix conditionly

truffle_provider
neeboo 5 years ago
parent 4dff73db61
commit bbcb1af037
  1. 4
      packages/harmony-core/src/truffleProvider.ts

@ -143,7 +143,7 @@ export class TruffleProvider extends HDNode {
jsonrpc: '2.0', jsonrpc: '2.0',
}; };
} }
case 'hmy_clientVersion': { case 'web3_clientVersion': {
callback(null, { callback(null, {
result: `Harmony/${packageInfo.version}/@harmony-js`, result: `Harmony/${packageInfo.version}/@harmony-js`,
id, id,
@ -206,8 +206,6 @@ export class TruffleProvider extends HDNode {
let newMethod: string = method; let newMethod: string = method;
if (method.startsWith('eth')) { if (method.startsWith('eth')) {
newMethod = method.replace('eth', 'hmy'); newMethod = method.replace('eth', 'hmy');
} else if (method.startsWith('web3')) {
newMethod = method.replace('web3', 'hmy');
} }
args[0].method = newMethod; args[0].method = newMethod;

Loading…
Cancel
Save