Browse Source

代码

master
Dread 4 years ago
parent
commit
eda752574f
  1. 291
      pages/menu/backUp/backUp5/index.vue
  2. 1
      pages/menu/backUp/transPaw/index.vue
  3. 6
      pages/menu/collection/index.vue
  4. 2
      pages/menu/setting/index.vue
  5. 46
      pages/menu/token/btc/index.vue
  6. 216
      pages/menu/token/btc/index2.vue
  7. 16
      pages/menu/wallet/index.vue
  8. 3708
      unpackage/dist/dev/app-plus/app-service.js
  9. 741
      unpackage/dist/dev/app-plus/app-view.js
  10. 19
      utils/DataUtil.js
  11. 12
      utils/WalletUtil.js

291
pages/menu/backUp/backUp5/index.vue

@ -112,180 +112,145 @@
return; return;
} }
var a = uni.getStorageSync('createWalletName') const a = uni.getStorageSync('createWalletName')
console.log(a) console.log(a)
if (a == 'BTC' && a != '' && a != undefined) {
try {
this.walletInfo = uni.getStorageSync('walletInfo'); this.walletInfo = uni.getStorageSync('walletInfo');
var mnemonic = this.wordInfo; var mnemonic = this.wordInfo;
uni.setStorageSync('privateKey', mnemonic); uni.setStorageSync('privateKey', mnemonic);
// privateKeyEstablishWallet
console.log(mnemonic) console.log(mnemonic)
let btc = this.$Token.importBtcPrivateKey(mnemonic);
for (var i = 0; i < this.walletInfo.BTC.length; i++) {
if (this.walletInfo.BTC[i].privateKey == btc.privateKey) {
uni.showToast({
title: 'The wallet has been imported',
icon: 'none',
duration: 1500
})
this.go = false;
} else {
this.go = true;
}
}
} catch (err) {
uni.showToast({
title: 'Private key does not exist',
icon: 'none',
duration: 1500
})
}
if (this.go) {
uni.showToast({
title: 'Import succeeded',
icon: 'success',
duration: 1500
})
setTimeout(() => {
uni.navigateTo({
url: '/pages/menu/backUp/transPaw2/index'
})
}, 1500)
}
}
if (a == 'ETH' && a != '' && a != undefined) {
try {
this.walletInfo = uni.getStorageSync('walletInfo');
var mnemonic = this.wordInfo;
uni.setStorageSync('privateKey', mnemonic);
console.log(mnemonic)
let eth = this.$Token.importEthPrivateKey(mnemonic);
for (var i = 0; i < this.walletInfo.ETH.length; i++) {
if (this.walletInfo.ETH[i].privateKey == eth.privateKey) {
uni.showToast({
title: 'The wallet has been imported',
icon: 'none',
duration: 1500
})
this.go = false;
} else {
this.go = true;
}
}
} catch (err) {
uni.showToast({
title: 'Private key does not exist',
icon: 'none',
duration: 1500
})
}
if (this.go) {
uni.showToast({
title: 'Import succeeded',
icon: 'success',
duration: 1500
})
setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/menu/backUp/transPaw2/index' url: '/pages/menu/backUp/transPaw2/index'
}) })
}, 1500)
}
}
if (a == 'TRX' && a != '' && a != undefined) {
try {
this.walletInfo = uni.getStorageSync('walletInfo');
var mnemonic = this.wordInfo;
console.log(this.wordInfo)
uni.setStorageSync('privateKey', mnemonic);
console.log(mnemonic)
this.info = this.$Token.importTronPrivateKey(mnemonic);
for (var i = 0; i < this.walletInfo.TRON.length; i++) { // if (a == 'ETH' && a != '' && a != undefined) {
if (this.walletInfo.TRON[i].privateKey == this.info.privateKey) { // try {
uni.showToast({ // this.walletInfo = uni.getStorageSync('walletInfo');
title: 'The wallet has been imported', // var mnemonic = this.wordInfo;
icon: 'none', // uni.setStorageSync('privateKey', mnemonic);
duration: 1500 // console.log(mnemonic)
})
this.go = false; // let eth = this.$Token.importEthPrivateKey(mnemonic);
} else {
this.go = true; // for (var i = 0; i < this.walletInfo.ETH.length; i++) {
} // if (this.walletInfo.ETH[i].privateKey == eth.privateKey) {
// uni.showToast({
} // title: 'The wallet has been imported',
} catch (err) { // icon: 'none',
console.log(err) // duration: 1500
uni.showToast({ // })
title: 'Private key does not exist', // this.go = false;
icon: 'none', // } else {
duration: 1500 // this.go = true;
}) // }
} // }
if (this.go) { // } catch (err) {
console.log(this.info, 111) // uni.showToast({
this.$store.commit('addTroni', 1) // title: 'Private key does not exist',
let that = this; // icon: 'none',
this.$TronUtil.getTronBalance(this.info.address).then((res) => { // duration: 1500
that.info.balance = res // })
}).catch(err => { // }
console.log(err) // if (this.go) {
}) // uni.showToast({
this.info.coinList = [ // title: 'Import succeeded',
{ // icon: 'success',
name: "TRX", // duration: 1500
name2: "TRX", // })
xname: 'TRON', // setTimeout(() => {
icon: require('@/static/tongyonh/tron1.png'), // uni.navigateTo({
balance: this.info.balance // url: '/pages/menu/backUp/transPaw2/index'
}, // })
{ // }, 1500)
name:"USDT",
name2:"TRC20-USDT", // }
xname:'Tether USD', // }
contractAddress:'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
icon:require('@/static/tongyonh/tether_usd.png')
}
]; // if (a == 'TRX' && a != '' && a != undefined) {
uni.setStorageSync('wallet', this.info) // try {
uni.setStorageSync('walleti', this.info.privateKey) // this.walletInfo = uni.getStorageSync('walletInfo');
// var mnemonic = this.wordInfo;
this.walletInfo.TRON[this.$store.state.troni] = this.info // console.log(this.wordInfo)
uni.setStorageSync('walletInfo', this.walletInfo) // uni.setStorageSync('privateKey', mnemonic);
uni.showToast({ // console.log(mnemonic)
title: 'Import succeeded',
icon: 'success', // this.info = this.$Token.importTronPrivateKey(mnemonic);
duration: 1500
})
setTimeout(() => { // for (var i = 0; i < this.walletInfo.TRON.length; i++) {
uni.navigateTo({ // if (this.walletInfo.TRON[i].privateKey == this.info.privateKey) {
url: '/pages/menu/backUp/transPaw2/index' // uni.showToast({
}) // title: 'The wallet has been imported',
}, 1500) // icon: 'none',
// duration: 1500
} // })
} // this.go = false;
// } else {
// this.go = true;
// }
// }
// } catch (err) {
// console.log(err)
// uni.showToast({
// title: 'Private key does not exist',
// icon: 'none',
// duration: 1500
// })
// }
// if (this.go) {
// console.log(this.info, 111)
// this.$store.commit('addTroni', 1)
// let that = this;
// this.$TronUtil.getTronBalance(this.info.address).then((res) => {
// that.info.balance = res
// }).catch(err => {
// console.log(err)
// })
// this.info.coinList = [
// {
// name: "TRX",
// name2: "TRX",
// xname: 'TRON',
// icon: require('@/static/tongyonh/tron1.png'),
// balance: this.info.balance
// },
// {
// name:"USDT",
// name2:"TRC20-USDT",
// xname:'Tether USD',
// contractAddress:'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
// icon:require('@/static/tongyonh/tether_usd.png')
// }
// ];
// uni.setStorageSync('wallet', this.info)
// uni.setStorageSync('walleti', this.info.privateKey)
// this.walletInfo.TRON[this.$store.state.troni] = this.info
// uni.setStorageSync('walletInfo', this.walletInfo)
// uni.showToast({
// title: 'Import succeeded',
// icon: 'success',
// duration: 1500
// })
// setTimeout(() => {
// uni.navigateTo({
// url: '/pages/menu/backUp/transPaw2/index'
// })
// }, 1500)
// }
// }
}, },

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

@ -83,6 +83,7 @@
var a = uni.getStorageSync('createWalletName') var a = uni.getStorageSync('createWalletName')
var mnemonic = uni.getStorageSync('word'); var mnemonic = uni.getStorageSync('word');
this.$walletUtil.mnemonicEstablishWallet(a,mnemonic,e) this.$walletUtil.mnemonicEstablishWallet(a,mnemonic,e)
uni.showToast({ uni.showToast({
title: 'Set successfully', title: 'Set successfully',
icon: 'success', icon: 'success',

6
pages/menu/collection/index.vue

@ -21,7 +21,7 @@
</view> </view>
</view> </view>
</view> </view>
<image src="../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="letImg"></image> <image src="../../../../tongyonh/chevron_right_24px.png" mode="aspectFit" class="letImg"></image>
</view> </view>
@ -100,7 +100,7 @@
showMsg(item,index){ showMsg(item,index){
this.test=item this.test=item
this.testindex=index this.testindex=index
if(uni.getStorageSync('wallet').coinList[0].name2=='ETH'){ if(uni.getStorageSync('wallet').type=='ETH'){
this.showbottom=false this.showbottom=false
this.goDetail(); this.goDetail();
}else{ }else{
@ -127,7 +127,7 @@
goDetail2(itemm,index){ goDetail2(itemm,index){
uni.setStorageSync('proid',this.test.id) uni.setStorageSync('proid',this.test.id)
uni.setStorageSync('wallet',itemm) uni.setStorageSync('wallet',itemm)
uni.setStorageSync('walleti',itemm.privateKey) uni.setStorageSync('walleti',itemm.address)
console.log(itemm,444) console.log(itemm,444)
uni.setStorageSync('nftIndex',this.testindex) uni.setStorageSync('nftIndex',this.testindex)
let item = JSON.stringify(this.test) let item = JSON.stringify(this.test)

2
pages/menu/setting/index.vue

@ -19,7 +19,7 @@
</view> </view>
<view class="item flex"> <view class="item flex">
<view class="text1"> <view class="text1">
Payment password Language settings
</view> </view>
<view class=""> <view class="">
<text class="text2">English</text> <text class="text2">English</text>

46
pages/menu/token/btc/index.vue

@ -16,14 +16,8 @@
:class="{'money_con': userObject.coinList[0].xname=='Ethereum', 'money_con2': userObject.coinList[0].xname=='Bitcoin', 'money_con3': userObject.coinList[0].xname=='TRON'}"> :class="{'money_con': userObject.coinList[0].xname=='Ethereum', 'money_con2': userObject.coinList[0].xname=='Bitcoin', 'money_con3': userObject.coinList[0].xname=='TRON'}">
<view class="textcon1"> <view class="textcon1">
<text class="text1"> <text class="text1">
<view class="" v-if="userObject.coinList[0].xname=='Bitcoin'"> <view class="" >
0.00 BTC {{infoWallet.balance}}
</view>
<view class="" v-if="userObject.coinList[0].xname=='Ethereum'">
0.00 ETH
</view>
<view class="" v-if="userObject.coinList[0].xname=='TRON'">
0.00 TRX
</view> </view>
<text class="text2"> $0.0</text> <text class="text2"> $0.0</text>
</text> </text>
@ -146,16 +140,15 @@
}], }],
infoWallet: {}, infoWallet: {},
current: 0, current: 0,
pageSize: 10, pageSize: 20,
pageNum: 1, pageNum: 1,
param: {
'address': '', balance:0,
'pageNum': 1,
'pageSize': 10, address:'',
}, type:'all',
address:'0x56eddb7aa87536c09ccc2793473599fd21a8b17f', trueType:'',
address2:'0x56eddb7aa87536c09ccc2793473599fd21a8b17f', contract:'',
type:'',
} }
}, },
methods: { methods: {
@ -194,15 +187,14 @@
}, },
getWalletInfo() { getWalletInfo() {
// this.address = this.infoWallet.address
// this.address2 = this.infoWallet.address
this.param.address = this.address
this.userObject = this.infoWallet this.userObject = this.infoWallet
var that = this var that = this
this.$dataUtil.transactionData('ETH', this.type, this.address2, '0xdac17f958d2ee523a2206206994597c13d831ec7', console.log(this.trueType, this.type, this.address, this.contract,
1, 20, this.pageNum, this.pageSize)
this.$dataUtil.transactionData(this.trueType, this.type, this.address, this.contract,
this.pageNum, this.pageSize,
function(data) { function(data) {
console.log(data,121211212112121)
if(data.length==0){ if(data.length==0){
that.showInfo=true; that.showInfo=true;
}else{ }else{
@ -211,7 +203,6 @@
that.trxs = data that.trxs = data
that.trxs2 = data that.trxs2 = data
console.log(that.trxs, 12121) console.log(that.trxs, 12121)
console.log(data)
}) })
@ -232,14 +223,15 @@
} }
}, },
onLoad(option) { onLoad(option) {
const item = JSON.parse(option.item); const item = JSON.parse(option.item);
this.infoWallet = item this.infoWallet = item
this.address=item.address
this.trueType=item.type
console.log(this.infoWallet,1111)
this.getWalletInfo() this.getWalletInfo()
}, },
onReachBottom() { onReachBottom() {
this.param.pageSize += 5; this.pageSize += 5;
this.getWalletInfo() this.getWalletInfo()
} }
}; };

216
pages/menu/token/btc/index2.vue

@ -1,34 +1,19 @@
<template> <template>
<view class=""> <view class="">
<navigation :showBack="true" :bgnum="true"> <navigation :showBack="true" :bgnum="true">
<text class="big_title"> {{xname}}
{{userObjectss.name2}}
</text>
</navigation> </navigation>
<view class="main"> <view class="main">
<view class="money_con" <view class="money_con"
:class="{'money_con': userObject.coinList[0].xname=='Ethereum', 'money_con2': userObject.coinList[0].xname=='Bitcoin', 'money_con3': userObject.coinList[0].xname=='TRON'}"> :class="{'money_con': userObject.coinList[0].xname=='Ethereum', 'money_con2': userObject.coinList[0].xname=='Bitcoin', 'money_con3': userObject.coinList[0].xname=='TRON'}">
<view class="textcon1"> <view class="textcon1">
<text class="text1"> <text class="text1">
<view class="" v-if="userObject.coinList[0].xname=='Bitcoin'"> <view class="" >
0.00 BTC {{infoWallet.balance}}
</view>
<view class="" v-if="userObject.coinList[0].xname=='Ethereum'">
0.00
</view>
<view class="" v-if="userObject.coinList[0].xname=='TRON'">
0.00 TRX
</view> </view>
<text class="text2"> $0.0</text> <text class="text2"> $0.0</text>
</text> </text>
<!-- <image src="../../../../static/tongyonh/ethereum.png" mode="aspectFit" class="img1"
v-if="userObject.coinList[0].xname=='Ethereum'"></image>
<image src="../../../../static/tongyonh/Frame28.png" mode="aspectFit" class="img1"
v-if="userObject.coinList[0].xname=='Bitcoin'"></image>
<image src="../../../../static/tongyonh/tronicon.png" mode="aspectFit" class="img1"
v-if="userObject.coinList[0].xname=='TRON'"></image> -->
</view> </view>
<view class="textcon1"> <view class="textcon1">
<view class="v1"> <view class="v1">
@ -58,39 +43,7 @@
<u-empty text="No content" mode="list" v-if="showInfo"></u-empty> <u-empty text="No content" mode="list" v-if="showInfo"></u-empty>
<view class="" v-if="!showInfo"> <view class="" v-if="!showInfo">
<view class="item1" v-for="(item,index) in trxs" v-if="current==1&&address==item.from" <view class="item1" v-for="(item,index) in trxs"
@click="goDetail(item,index)">
<view class="lef_con">
<image src="../../../../static/tongyonh/arrow-up-left_1.png" mode="aspectFit"
class="img1" v-if="address==item.from"></image>
<view class="textcon">
<view class="text1" v-if="address==item.from">
{{item.to}}
</view>
<view class="text2" v-if="address==item.from">
{{item.time}}
</view>
</view>
</view>
<view class="rig_con">
<view class="text1">
<text v-if="address==item.from">-</text>
{{item.value}}
<text class="">
{{item.network}}
</text>
</view>
<image src="../../../../static/tongyonh/Shape.png" mode="aspectFit" class="img1">
</image>
</view>
</view>
<view class="item1" v-for="(item,index) in trxs" v-if="current==0"
@click="goDetail(item,index)"> @click="goDetail(item,index)">
<view class="lef_con"> <view class="lef_con">
<image src="../../../../static/tongyonh/arrow-up-left.png" mode="aspectFit" class="img1" <image src="../../../../static/tongyonh/arrow-up-left.png" mode="aspectFit" class="img1"
@ -98,11 +51,9 @@
<image src="../../../../static/tongyonh/arrow-up-left_1.png" mode="aspectFit" <image src="../../../../static/tongyonh/arrow-up-left_1.png" mode="aspectFit"
class="img1" v-if="address==item.from"></image> class="img1" v-if="address==item.from"></image>
<view class="textcon"> <view class="textcon">
<view class="text1" v-if="address==item.from">
{{item.to}} <view class="text1">
</view> {{item.address}}
<view class="text1" v-if="address==item.to">
{{item.from}}
</view> </view>
<view class="text2"> <view class="text2">
{{item.time}} {{item.time}}
@ -126,36 +77,7 @@
</view> </view>
</view> </view>
<view class="item1" v-for="(item,index) in trxs" v-if="current==2&&address==item.to"
@click="goDetail(item,index)">
<view class="lef_con">
<image src="../../../../static/tongyonh/arrow-up-left.png" mode="aspectFit" class="img1"
v-if="address==item.to"></image>
<view class="textcon">
<view class="text1" v-if="address==item.to">
{{item.from}}
</view>
<view class="text2" v-if="address==item.to">
{{item.time}}
</view>
</view>
</view>
<view class="rig_con">
<view class="text1">
<text v-if="address==item.to">+</text>
{{item.value}}
<text class="">
{{item.network}}
</text>
</view>
<image src="../../../../static/tongyonh/Shape.png" mode="aspectFit" class="img1">
</image>
</view>
</view>
</view> </view>
</view> </view>
@ -192,25 +114,29 @@
trxs2: [], trxs2: [],
address: '', address: '',
userObject: {}, userObject: {},
userObjectss: {},
showInfo: false, showInfo: false,
list: [{ list: [{
name: 'All' name: 'All',
}, { }, {
name: 'Send' name: 'Send',
}, { }, {
name: 'Receive', name: 'Receive',
}], }],
infoWallet: {}, infoWallet: {},
current: 0, current: 0,
pageSize:10, pageSize: 20,
pageNum: 1, pageNum: 1,
param : {
'address':'', balance:0,
'pageNum':1,
'pageSize':10, address:'',
'address2':'', type:'all',
}, trueType:'',
contract:'',
xname:'',
} }
}, },
methods: { methods: {
@ -234,76 +160,47 @@
}, },
change(index) { change(index) {
console.log(index) if(index==0){
this.type='all'
}
if(index==1){
this.type='send'
}
if(index==2){
this.type='receive'
}
this.current = index; this.current = index;
console.log(this.current) console.log(this.current)
this.getWalletInfo();
}, },
getWalletInfo() { getWalletInfo() {
if (this.infoWallet.coinList[0].xname == 'Ethereum') {
this.param.address2=this.infoWallet.address
this.address = this.userObjectss.contractAddress
this.address2 =this.userObjectss.contractAddress
console.log( this.userObjectss.contractAddress,111)
this.param.address= this.userObjectss.contractAddress
console.log(this.param,2222)
this.userObject = this.infoWallet this.userObject = this.infoWallet
const post = api.addressOther( var that = this
this.param this.$dataUtil.transactionData(this.trueType, this.type, this.address, this.contract,
) this.pageNum, this.pageSize,
post.then(res => { function(data) {
console.log(res, 77) console.log(data,121211212112121)
if (res.data.code == 404) { if(data.length==0){
this.showInfo = true; that.showInfo=true;
return; }else{
that.showInfo=false;
} }
that.trxs = data
that.trxs2 = data
console.log(that.trxs, 12121)
})
this.trxs = res.data.data
console.log(this.trxs,7878)
for (var i = 0; i < this.trxs.length; i++) {
this.trxs[i].from = this.trxs[i].from.substring(0, 6) + '...' + this.trxs[i].from
.substring(35, this.trxs[i].from.length);
this.trxs[i].to = this.trxs[i].to.substring(0, 6) + '...' + this.trxs[i].to.substring(
35, this.trxs[i].to.length);
this.trxs[i].time = index.formatyymmddhhmmss(this.trxs[i].time);
this.trxs[i].value = parseFloat(this.trxs[i].value).toFixed(0)
}
})
this.address = this.address.substring(0, 6) + '...' + this.address.substring(35, this.address.length);
this.getInfo()
} else if (this.infoWallet.coinList[0].xname == 'TRON') {
this.address = this.infoWallet.address
this.param.address=this.address
this.address2 = this.infoWallet.address
this.userObject =this.infoWallet
const post = api.addresstrx(
this.param
)
post.then(res => {
if (res.data.code == 404) {
this.showInfo = true;
return;
}
if (res.data.data.network == 'TRX') {
this.trxs = res.data.data.txs
for (var i = 0; i < this.trxs.length; i++) {
this.trxs[i].from = this.trxs[i].from.substring(0, 6) + '...' + this.trxs[i].from
.substring(35, this.trxs[i].from.length);
this.trxs[i].to = this.trxs[i].to.substring(0, 6) + '...' + this.trxs[i].to.substring(
35, this.trxs[i].to.length);
this.trxs[i].time = index.formatyymmddhhmmss(this.trxs[i].time);
this.trxs[i].value = parseFloat(this.trxs[i].value).toFixed(5)
}
}
})
this.address = this.address.substring(0, 6) + '...' + this.address.substring(35, this.address.length);
}
}, },
getInfo() { getInfo() {
this.param.address = this.address2 this.param.address = this.address2
const post = api.addressOther( const post = api.address(
this.param this.param
) )
post.then(res => { post.then(res => {
@ -312,14 +209,19 @@
} }
}, },
onLoad(option) { onLoad(option) {
this.userObjectss=uni.getStorageSync('daiInfo')
console.log(this.userObjectss,777)
const item = JSON.parse(option.item); const item = JSON.parse(option.item);
this.infoWallet = item this.infoWallet = item
this.address=item.address
this.trueType=item.type
var index=uni.getStorageSync('otherCoin')
this.contract=item.coinList[index].contractAddress
this.xname=item.coinList[index].xname
console.log(this.infoWallet,1111)
this.getWalletInfo() this.getWalletInfo()
}, },
onReachBottom() { onReachBottom() {
this.param.pageSize+=5; this.pageSize += 5;
this.getWalletInfo() this.getWalletInfo()
} }
}; };

16
pages/menu/wallet/index.vue

@ -128,26 +128,21 @@
goTrans(itemm,index) { goTrans(itemm,index) {
console.log(index,444) console.log(index,444)
let item = JSON.stringify(this.userObj2) let item = JSON.stringify(this.userObj2)
if(this.userObj2.coinList[0].xname=='Bitcoin'){ console.log(item,454545)
uni.navigateTo({
url:'/pages/menu/token/btctrue/index?item='+item
})
}else{
if(index==0){ if(index==0){
uni.navigateTo({ uni.navigateTo({
url:'/pages/menu/token/btc/index?item='+item url:'/pages/menu/token/btc/index?item='+item
}) })
}else{ }else{
uni.setStorageSync('daiInfo',itemm) //
uni.setStorageSync('otherCoin',index)
uni.navigateTo({ uni.navigateTo({
url:'/pages/menu/token/btc/index2?item='+item url:'/pages/menu/token/btc/index2?item='+item
}) })
} }
}
}, },
// //
chooseImage() { chooseImage() {
var _this = this var _this = this
@ -167,8 +162,7 @@
url: './cwallet/index' url: './cwallet/index'
}) })
} }
}, }
}; };
</script> </script>
<style scoped> <style scoped>

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

File diff suppressed because one or more lines are too long

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

File diff suppressed because it is too large

19
utils/DataUtil.js

@ -66,10 +66,13 @@ let DataUtil = {
} }
} }
success(dataList)
}
}
success(dataList)
},
error: (res) => {
success(dataList)
} }
}); });
} else { } else {
@ -121,9 +124,9 @@ let DataUtil = {
} }
} }
success(dataList)
}
}
success(dataList)
} }
}); });
@ -183,9 +186,9 @@ let DataUtil = {
dataList.push(transactionData) dataList.push(transactionData)
} }
success(dataList)
}
}
success(dataList)
} }
}); });
@ -238,9 +241,9 @@ let DataUtil = {
} }
} }
success(dataList)
}
}
success(dataList)
} }
}); });

12
utils/WalletUtil.js

@ -99,12 +99,24 @@ console.log(password,'password')
switch (type) { switch (type) {
case 'BTC': case 'BTC':
walletdec = TokenUtil.generateBtc(mnemonic); walletdec = TokenUtil.generateBtc(mnemonic);
if(uni.getStorageSync('walletInfo')){
uni.setStorageSync('walleti',walletdec.address)
}
break; break;
case 'ETH': case 'ETH':
walletdec = TokenUtil.generateTron(mnemonic); walletdec = TokenUtil.generateTron(mnemonic);
if(uni.getStorageSync('walletInfo')){
uni.setStorageSync('walleti',walletdec.address)
}
break; break;
case 'TRX': case 'TRX':
walletdec = TokenUtil.generateEth(mnemonic); walletdec = TokenUtil.generateEth(mnemonic);
if(uni.getStorageSync('walletInfo')){
uni.setStorageSync('walleti',walletdec.address)
}
break; break;
} }
let wallet = fullWallet[type][0]; let wallet = fullWallet[type][0];

Loading…
Cancel
Save