Skip to content

Commit de5391c

Browse files
committed
add default expect for contract deploy
1 parent 776760e commit de5391c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chainsql",
3-
"version": "0.70.8",
3+
"version": "0.70.9",
44
"description": "An database driver for chainsql ",
55
"main": "src/index.js",
66
"scripts": {

src/smartContract.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,12 +718,12 @@ Contract.prototype._executeMethod = function _executeMethod(){
718718
txCallbackProperty.callbackExpect = "send_success";
719719
if(args.options.isDeploy) {
720720
sendTxPayment.ContractOpType = 1;
721-
if (args.options.expect === "send_success")
721+
if (args.options.hasOwnProperty("expect") && (args.options.expect === "send_success"))
722722
{
723723
errorMsg = "Contract deploy tx expect must be validate_success or db_success";
724724
return errFuncGlobal(errorMsg, args.callback);
725725
}
726-
txCallbackProperty.callbackExpect = args.options.expect;
726+
txCallbackProperty.callbackExpect = args.options.hasOwnProperty("expect") ? args.options.expect : "validate_success";
727727
}
728728
else {
729729
sendTxPayment.ContractOpType = 2;

0 commit comments

Comments
 (0)