diff --git a/examples/browser/multiTransaction.html b/examples/browser/multiTransaction.html index 0556cf51..a337612a 100644 --- a/examples/browser/multiTransaction.html +++ b/examples/browser/multiTransaction.html @@ -40,11 +40,11 @@ console.log("GetTokenInfo",tokenContractAddress); // return contract's instance and you can call the methods on this instance return aelf.chain.contractAt(tokenContractAddress,wallet,{ - refBlockNumberStrategy: { - 9992731: -8, - 1931928: -8 - }, - multi1: { + // refBlockNumberStrategy: { + // 9992731: -8, + // 1931928: -8 + // }, + multi: { 9992731: { chainUrl: 'https://aelf-test-node.aelf.io/', contractAddress: 'JRmBduh4nXWi1aXgdUsj5gJrzeZb2LxmrAbf7W99faZSvoAaE' diff --git a/jest-report.xml b/jest-report.xml index 429a6e90..91e742a4 100644 --- a/jest-report.xml +++ b/jest-report.xml @@ -1,519 +1,519 @@ - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - - - + - + - + - + - + - + - + - + - + - + - + - + - - - + - + - + - + - + + + - + - + - + - + - + - + - + - + - + + + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - + - + - - + + - + + + - + + + + + + + - + - + - + - + - + - - + + - - + + + + - + - - + + - + - + - - + + - - - - - - - - - - - + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + \ No newline at end of file diff --git a/package.json b/package.json index afc9e468..735cce82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aelf-sdk", - "version": "3.4.16-alpha.4", + "version": "3.4.16-alpha.5", "description": "aelf-sdk js library", "main": "dist/aelf.cjs.js", "browser": "dist/aelf.umd.js", diff --git a/src/chain/index.js b/src/chain/index.js index 830bc8cb..0664275c 100644 --- a/src/chain/index.js +++ b/src/chain/index.js @@ -40,15 +40,17 @@ export default class Chain { if (arg?.multi) { result.multi = arg.multi; result.gatewayUrl = arg.gatewayUrl; - const refBlockNumberStrategy = {}; - Object.keys(arg.refBlockNumberStrategy).forEach(key => { - if (typeof arg.refBlockNumberStrategy[key] === 'number') { - refBlockNumberStrategy[key] = arg.refBlockNumberStrategy[key]; - } else { - refBlockNumberStrategy[key] = 0; - } - }); - result.refBlockNumberStrategy = refBlockNumberStrategy; + if (arg?.refBlockNumberStrategy) { + const refBlockNumberStrategy = {}; + Object.keys(arg.refBlockNumberStrategy).forEach(key => { + if (typeof arg.refBlockNumberStrategy[key] === 'number') { + refBlockNumberStrategy[key] = arg.refBlockNumberStrategy[key]; + } else { + refBlockNumberStrategy[key] = 0; + } + }); + result.refBlockNumberStrategy = refBlockNumberStrategy; + } } if (typeof arg?.refBlockNumberStrategy === 'number') { result.refBlockNumberStrategy = arg.refBlockNumberStrategy;