This commit is contained in:
Frank.R.Wu 2021-12-11 19:15:13 +08:00
parent 37476bd506
commit 0dfa8a555a

View File

@ -174,7 +174,7 @@ function importContractInstanceCodeByDOI() {
function openInClient() {
let path = document.location.pathname.lastIndexOf("/ide");
if (path>0)
if (path > 0)
path = document.location.pathname.substr(0, path + 1);
else path = "/";
window.open(isBaaS ?
@ -222,15 +222,15 @@ function executeContract() {
request.contractID = contract.id;
request.operation = contract.exportedFunctions[selectedFunction.value].functionName;
const arg = executeContractArgInput.value;
const gasLimit = $('#gasLimit').val()/1;
const gasLimit = $('#gasLimit').val() / 1;
request.pubkey = sm2Key.publicKey;
var toSign = request.contractID + "|"
+ request.operation + "|" + arg ;
if (gasLimit>0){
request.gasLimit = gasLimit;
toSign+= "|" + gasLimit;
let toSign = request.contractID + "|"
+ request.operation + "|" + arg;
if (gasLimit > 0) {
request.gasLimit = gasLimit;
toSign += "|" + gasLimit;
}
toSign+= "|" + sm2Key.publicKey;
toSign += "|" + sm2Key.publicKey;
request.signature = sm2.doSignature(
toSign,
sm2Key.privateKey,