|
@@ -21,7 +21,6 @@ tokenpocketBnb.getProvider= function (){
|
|
|
if(!provider){
|
|
if(!provider){
|
|
|
provider = window.ethereum;
|
|
provider = window.ethereum;
|
|
|
}
|
|
}
|
|
|
- console.log(provider)
|
|
|
|
|
if(!chainId){
|
|
if(!chainId){
|
|
|
provider.request({method:'eth_chainId'}).then((ethChainId)=>{
|
|
provider.request({method:'eth_chainId'}).then((ethChainId)=>{
|
|
|
console.log('ethChainId:'+ethChainId)
|
|
console.log('ethChainId:'+ethChainId)
|
|
@@ -52,7 +51,6 @@ tokenpocketBnb.getAccounts=async function (){
|
|
|
try {
|
|
try {
|
|
|
tokenpocketBnb.getProvider().request({ method: 'eth_requestAccounts'})
|
|
tokenpocketBnb.getProvider().request({ method: 'eth_requestAccounts'})
|
|
|
.then((address)=>{
|
|
.then((address)=>{
|
|
|
- console.log('address:',address)
|
|
|
|
|
if(address.length>0){
|
|
if(address.length>0){
|
|
|
uni.setStorageSync('babAddress',address[0])
|
|
uni.setStorageSync('babAddress',address[0])
|
|
|
resolve(address[0])
|
|
resolve(address[0])
|