update js

This commit is contained in:
cebgcontract 2022-11-29 13:44:49 +08:00
parent 3e92c2f31e
commit c4dc245230
2 changed files with 6 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,8 +5,9 @@ console.log(">>begin load wallet main file");
* @param {string} type: wallet type, 0: internal wallet, 1: third party wallet
*/
function initWallet(funId, type, chain) {
function initWallet(funId, type, chain, channel) {
// chain = chain || 80001
channel = channel || 1
type = 0
chain = 80001
try {
@ -21,7 +22,7 @@ function initWallet(funId, type, chain) {
}
type = parseInt(type);
if (type === 1) {
console.log("wallet init success, begin connect") ;
console.log("wallet init success, begin connect");
wallet
.initThirdPartyWallet()
.then(() => {
@ -34,7 +35,7 @@ function initWallet(funId, type, chain) {
jsb.jcCallback(funId,JSON.stringify({errcode: 1,errmsg: err}));
});
} else {
wallet.initInternalWallet()
wallet.initInternalWallet(channel)
.then(() => {
console.log("internal init success");
var address = jc.wallet.nativeAccount;