From eb6dd4d9811af7a677a3e3116f68d18b7638f4eb Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Thu, 16 Nov 2023 18:03:08 +0800 Subject: [PATCH] update main.js --- Data/js/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Data/js/main.js b/Data/js/main.js index cb2869a..9fcba58 100644 --- a/Data/js/main.js +++ b/Data/js/main.js @@ -45,12 +45,14 @@ function updateGameInfo(funId, info) { * @param {string} chain: chain id * @param {string} pass: password for wallet * @param {string} env: dev release + * @param {string} useApi: 1: yes, 0: no * @return {string} address * @throws {Error} if password is wrong */ -function initInternalWallet(funId, chain, pass, env) { +function initInternalWallet(funId, chain, pass, env, useApi) { chain = parseInt(chain); - promiseCb(funId, jc.wallet.initInternalWallet(chain, pass, env), () => { + useApi = (useApi && useApi == '1') ? true: false + promiseCb(funId, jc.wallet.initInternalWallet(chain, pass, env, useApi), () => { return jc.wallet.nativeAccount; }); }