[chore] update methods

@types
neeboo 6 years ago
parent 75235c58b1
commit 57646e2b42
  1. 2
      packages/harmony-account/package.json
  2. 2
      packages/harmony-contract/package.json
  3. 23
      packages/harmony-contract/src/methods/method.ts
  4. 2
      packages/harmony-core/package.json
  5. 2
      packages/harmony-crypto/package.json
  6. 2
      packages/harmony-network/package.json
  7. 2
      packages/harmony-transaction/package.json
  8. 2
      packages/harmony-utils/package.json

@ -20,5 +20,5 @@
"@harmony/transaction": "0.0.4",
"@harmony/utils": "0.0.4"
},
"gitHead": "95230b89a2dcfc0ef447ef67896bba79cc6f9d30"
"gitHead": "75235c58b12b8fe512165903008c469ebf46e803"
}

@ -24,5 +24,5 @@
"@harmony/utils": "0.0.4",
"abi-decoder": "^1.2.0"
},
"gitHead": "95230b89a2dcfc0ef447ef67896bba79cc6f9d30"
"gitHead": "75235c58b12b8fe512165903008c469ebf46e803"
}

@ -89,18 +89,19 @@ export class ContractMethod {
};
});
const result = getResultForData(
await this.wallet.messenger.send(RPCMethod.Call, [
this.transaction.txPayload,
blockNumber,
]),
);
if (result.responseType === 'raw') {
return this.afterCall(undefined);
} else if (result.responseType === 'error') {
const result = await this.wallet.messenger.send(RPCMethod.Call, [
this.transaction.txPayload,
blockNumber,
]);
if (result.isError()) {
throw result.message;
} else {
return this.afterCall(result);
} else if (result.isResult()) {
if (result.result === null) {
return this.afterCall(undefined);
} else {
return this.afterCall(result.result);
}
}
} catch (error) {
throw error;

@ -24,5 +24,5 @@
"@harmony/transaction": "0.0.4",
"@harmony/utils": "0.0.4"
},
"gitHead": "95230b89a2dcfc0ef447ef67896bba79cc6f9d30"
"gitHead": "75235c58b12b8fe512165903008c469ebf46e803"
}

@ -30,5 +30,5 @@
"scrypt.js": "^0.3.0",
"uuid": "^3.3.2"
},
"gitHead": "95230b89a2dcfc0ef447ef67896bba79cc6f9d30"
"gitHead": "75235c58b12b8fe512165903008c469ebf46e803"
}

@ -20,5 +20,5 @@
"mitt": "^1.1.3",
"websocket": "^1.0.28"
},
"gitHead": "95230b89a2dcfc0ef447ef67896bba79cc6f9d30"
"gitHead": "75235c58b12b8fe512165903008c469ebf46e803"
}

@ -19,5 +19,5 @@
"@harmony/network": "0.0.4",
"@harmony/utils": "0.0.4"
},
"gitHead": "95230b89a2dcfc0ef447ef67896bba79cc6f9d30"
"gitHead": "75235c58b12b8fe512165903008c469ebf46e803"
}

@ -17,5 +17,5 @@
"@types/bn.js": "^4.11.3",
"bn.js": "^4.11.8"
},
"gitHead": "95230b89a2dcfc0ef447ef67896bba79cc6f9d30"
"gitHead": "75235c58b12b8fe512165903008c469ebf46e803"
}

Loading…
Cancel
Save