update js lib

This commit is contained in:
CounterFire2023 2023-08-17 15:33:25 +08:00
parent 2fc94d2a56
commit 1cd508af00
2 changed files with 8 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -12,13 +12,14 @@ function promiseCb(funId, promiseFun, dataParser) {
}
/**
* oauth login before init internal wallet
* @param {*} channel 0: google, 1: apple, 2: tiktok, 3: facebook, 4: twitter 5: tg
* @param {*} channel 0: google, 1: apple, 2: tiktok, 3: facebook, 4: twitter 5: tg, 6: email, 7: discord 10: client
*/
function walletLogin(funId, channel) {
function walletLogin(funId, channel, env) {
channel = parseInt(channel);
env = env || 'dev';
console.log('walletLogin: ' + channel);
const wallet = !window.jc || !jc.wallet ? new jcwallet.default({ type: 0 }) : jc.wallet;
promiseCb(funId, wallet.preLogin(channel));
promiseCb(funId, wallet.preLogin(channel, env));
}
/**
* init internal wallet with password