|
@@ -29,12 +29,10 @@ async function connectWallectAccount(fun){
|
|
|
walletMgr.currentAccount = account;
|
|
|
let chainId = await bscConnector.getChainId();
|
|
|
walletMgr.currentChaidId = chainId;
|
|
|
- walletMgr.crateContract(act.provider);
|
|
|
- // func({code:CodeEnum.SUCCESS,data:account});
|
|
|
|
|
|
if(walletMgr.currentChaidId == walletMgr.currentChain[0].chainId && walletMgr.currentAccount != null){
|
|
|
fun({code:CodeEnum.SUCCESS,data:walletMgr.currentAccount});
|
|
|
- walletMgr.crateContract(provider)
|
|
|
+ walletMgr.crateContract(act.provider)
|
|
|
}else{
|
|
|
fun({code:CodeEnum.NOT_CURRENT_CHAIN,data:"Please switch the chain"});
|
|
|
}
|