Compare commits

2 Commits

Author SHA1 Message Date
Frank.R.Wu
965ee67409 fix: fix bugs in executeContract of NodeContractInstances.js 2021-12-12 12:25:36 +08:00
Frank.R.Wu
0dfa8a555a style 2021-12-11 19:15:13 +08:00
2 changed files with 26 additions and 25 deletions

View File

@@ -400,7 +400,7 @@ function executeContract() {
console.log(request.arg); console.log(request.arg);
const gasLimit = $('#gasLimit').val() / 1; const gasLimit = $('#gasLimit').val() / 1;
var toSign = request.contractID + "|" var toSign = request.contractID + "|"
+ request.operation + "|" + arg ; + request.operation + "|" + request.arg;
if (gasLimit > 0) { if (gasLimit > 0) {
request.gasLimit = gasLimit; request.gasLimit = gasLimit;
toSign += "|" + gasLimit; toSign += "|" + gasLimit;
@@ -474,6 +474,7 @@ function getMask() {
localStorage.setItem("persisArg", JSON.stringify(request)); localStorage.setItem("persisArg", JSON.stringify(request));
global.wssocket.send(JSON.stringify(request)); global.wssocket.send(JSON.stringify(request));
} }
function setMask() { function setMask() {
const argDiv = $('#maskArg')[0]; const argDiv = $('#maskArg')[0];
const request = {}; const request = {};

View File

@@ -224,7 +224,7 @@ function executeContract() {
const arg = executeContractArgInput.value; const arg = executeContractArgInput.value;
const gasLimit = $('#gasLimit').val() / 1; const gasLimit = $('#gasLimit').val() / 1;
request.pubkey = sm2Key.publicKey; request.pubkey = sm2Key.publicKey;
var toSign = request.contractID + "|" let toSign = request.contractID + "|"
+ request.operation + "|" + arg; + request.operation + "|" + arg;
if (gasLimit > 0) { if (gasLimit > 0) {
request.gasLimit = gasLimit; request.gasLimit = gasLimit;