Browse Source

代码

master
Dread 4 years ago
parent
commit
f5f88fbcf1
  1. 75
      pages/menu/backUp/transPaw/index.vue
  2. 1
      pages/menu/wallet/cwallet/index.vue
  3. 2
      pages/menu/wallet/otherCoin/index.vue
  4. 6
      unpackage/dist/dev/app-plus/app-service.js
  5. 2
      unpackage/dist/dev/app-plus/app-view.js
  6. 4
      utils/WalletUtil.js

75
pages/menu/backUp/transPaw/index.vue

@ -66,81 +66,6 @@
this.word = uni.getStorageSync('word'); this.word = uni.getStorageSync('word');
this.$walletUtil.initialWallet(this.word, e) this.$walletUtil.initialWallet(this.word, e)
console.log(123123) console.log(123123)
// let that=this
// this.$api.getBtcBalance().then((res) => {
// var b = res.data.data[0]
// for (var k in b) {
// that.btcBalance = b[k]
// }
// })
// this.walletInfo.BTC[0].balance = this.btcBalance
// this.walletInfo.BTC[0].coinList = [{
// name: "BTC",
// name2: "BTC",
// xname: 'Bitcoin',
// icon: require('@/static/tongyonh/bye.png'),
// balance: this.btcBalance
// }];
// // this.$EthUtil.getBalance(eth.address,function(res){
// // eth.balance = res
// // this.ethBbalance = res;
// // });
// console.log(this.walletInfo.ETH[0].address,2222222)
// this.$EthUtil.getBalance(this.walletInfo.ETH[0].address,function(res){
// console.log(res,787878)
// that.walletInfo.ETH[0].balance = res
// console.log(res,4444455555)
// that.walletInfo.ETH[0].coinList = [
// {
// name: "ETH",
// name2: "ETH",
// xname: 'Ethereum',
// icon: require('@/static/tongyonh/Frame3299.png'),
// balance: res
// },
// {
// name:"USDT",
// name2:"ERC20-USDT",
// xname:'Tether USD',
// contractAddress:'0xdac17f958d2ee523a2206206994597c13d831ec7',
// icon:require('@/static/tongyonh/img500.png'),
// balance: 0
// }
// ]
// });
// this.$TronUtil.getTronBalance(this.walletInfo.TRON[0].address).then((res) => {
// that.walletInfo.TRON[0].balance = res
// that.walletInfo.TRON[0].coinList = [
// {
// name: "TRX",
// name2: "TRX",
// xname: 'TRON',
// icon: require('@/static/tongyonh/tron1.png'),
// balance: res
// },
// {
// name:"USDT",
// name2:"TRC20-USDT",
// xname:'Tether USD',
// contractAddress:'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
// icon:require('@/static/tongyonh/tether_usd.png')
// }
// ]
// }).catch(err => {
// console.log(err)
// })
// setTimeout(()=>{
// uni.setStorageSync('ethi', 0);
// uni.setStorageSync('itype', true);
// uni.setStorageSync('walletInfo', this.walletInfo);
// },1500)
}, },
// //

1
pages/menu/wallet/cwallet/index.vue

@ -137,7 +137,6 @@
},5) },5)
} }
if(index.coinList[0].xname=="TRON"){ if(index.coinList[0].xname=="TRON"){
console.log(this.walletInfoTRX2[i],454654646465)
uni.setStorageSync('wallet',this.walletInfoTRX2[i]) uni.setStorageSync('wallet',this.walletInfoTRX2[i])
setTimeout(()=>{ setTimeout(()=>{
uni.reLaunch({ uni.reLaunch({

2
pages/menu/wallet/otherCoin/index.vue

@ -2,7 +2,7 @@
<view class="maintoP"> <view class="maintoP">
<navigation :showBack="false" :bgnum="true" class="aaa"> <navigation :showBack="false" :bgnum="true" class="aaa">
<image src="../../../../static/tongyonh/Vector.png" mode="aspectFit" class="back" @click="back()" ></image> <image src="../../../../static/tongyonh/Vector.png" mode="aspectFit" class="back" @click="back()" ></image>
Add token Add Token
</navigation> </navigation>
<view class="main"> <view class="main">
<view class="topview"> <view class="topview">

6
unpackage/dist/dev/app-plus/app-service.js

File diff suppressed because one or more lines are too long

2
unpackage/dist/dev/app-plus/app-view.js

@ -7933,7 +7933,7 @@ var render = function() {
} }
} }
}), }),
_vm._v("Add token") _vm._v("Add Token")
], ],
1 1
), ),

4
utils/WalletUtil.js

@ -61,12 +61,12 @@ let WalletUtil = {
walletInfo.ETH[0].password = password; walletInfo.ETH[0].password = password;
walletInfo.ETH[0].mnemonic = mnemonic; walletInfo.ETH[0].mnemonic = mnemonic;
walletInfo.ETH[0].privateKey = eth.privateKey; walletInfo.ETH[0].privateKey = eth.privateKey;
walletInfo.ETH[0].address = eth.mnemonic; walletInfo.ETH[0].address = eth.address;
let tron = TokenUtil.generateTron(mnemonic); let tron = TokenUtil.generateTron(mnemonic);
walletInfo.TRON[0].mnemonic = mnemonic; walletInfo.TRON[0].mnemonic = mnemonic;
walletInfo.TRON[0].password = password; walletInfo.TRON[0].password = password;
walletInfo.TRON[0].privateKey = tron.privateKey; walletInfo.TRON[0].privateKey = tron.privateKey;
walletInfo.TRON[0].address = tron.mnemonic; walletInfo.TRON[0].address = tron.address;
uni.setStorageSync('walletInfo', walletInfo); uni.setStorageSync('walletInfo', walletInfo);
}, },
//修改钱包名称 //修改钱包名称

Loading…
Cancel
Save