2 Achegas 128caf456c ... d560bfda59

Autor SHA1 Mensaxe Data
  zhangjianchu d560bfda59 zjc %!s(int64=3) %!d(string=hai) anos
  zhangjianchu dffb27d3ba a %!s(int64=3) %!d(string=hai) anos
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      src/wallet/BinanceChain.js

+ 2 - 4
src/wallet/BinanceChain.js

@@ -8,7 +8,7 @@ let walletMgr;
 
 async function init(_walletMgr,fun){
     walletMgr = _walletMgr;
-    CodeEnum = walletMgr.ReturnCodeEnum;
+    CodeEnum  = walletMgr.ReturnCodeEnum;
     bscConnector = new BscConnector({
         supportedChainIds: [56, 97] 
     })
@@ -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"});
     }