update main.js

This commit is contained in:
CounterFire2023 2023-11-16 18:03:08 +08:00
parent 39f63347c4
commit eb6dd4d981

View File

@ -45,12 +45,14 @@ function updateGameInfo(funId, info) {
* @param {string} chain: chain id * @param {string} chain: chain id
* @param {string} pass: password for wallet * @param {string} pass: password for wallet
* @param {string} env: dev release * @param {string} env: dev release
* @param {string} useApi: 1: yes, 0: no
* @return {string} address * @return {string} address
* @throws {Error} if password is wrong * @throws {Error} if password is wrong
*/ */
function initInternalWallet(funId, chain, pass, env) { function initInternalWallet(funId, chain, pass, env, useApi) {
chain = parseInt(chain); 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; return jc.wallet.nativeAccount;
}); });
} }