Skip to content

Commit

Permalink
Merge pull request #94 from ultiledger/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ult-zhiwei authored Sep 4, 2019
2 parents b54792e + f6563ea commit f8f3cac
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ cordova plugin add cordova-plugin-android-permissions
cordova plugin add cordova-plugin-file-opener2
cordova plugin add cordova-plugin-device
cordova plugin add cordova-plugin-file-transfer
cordova plugin add cordova-plugin-statusbar
cordova build android
```

Expand Down
4 changes: 4 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ router.router.instance.afterEach(() => {
backbuttonHandler.clearLayer();
});
document.addEventListener('deviceready', function () {
// 需要配合cordova-plugin-statusbar使用
if (window.StatusBar) {
window.StatusBar.styleDefault();
}
// 需要deviceready之后
document.addEventListener('backbutton', backbuttonHandler.handleBackbuttonEvent, false);
loadData(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/assets/popup/assets-add-ripple-pop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
let configAssets = this.getConfigAssets(type);
let configAssetsArray=[];
configAssets.forEach(item => {
if (item.issuer && item.issuer === this.$store.state.account.address && item.code === this.$store.state.account.type ){
if (item.issuer && item.issuer === this.$store.state.account.address){
return;
}
configAssetsArray.push({
Expand Down
7 changes: 7 additions & 0 deletions src/pages/find/find.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
link: 'https://wipple.devnull.network/live/accounts',
imgUrl: 'static/img/[email protected]'
},
{
title: this.$t('find.xrpTitle'),
subTitle: this.$t('find.xrpSubTitle'),
desc: this.$t('find.xrpDesc'),
link: 'https://xrpscan.com',
imgUrl: 'static/img/[email protected]'
},
{
title: this.$t('find.xmlTitle'),
subTitle: this.$t('find.xmlSubTitle'),
Expand Down
20 changes: 12 additions & 8 deletions src/pages/history/tx-history-ripple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<script>
import moment from 'moment';
import history from './mixns/history';
import coins from 'src/wallet/coins';
export default{
mixins: [history],
data () {
Expand Down Expand Up @@ -112,16 +113,15 @@
console.info(err);
});
},
shortType (type) {
return coins[type].symbol || type;
},
filterHistory () {
if (this.normalHistory && this.normalHistory.length > 0) {
let address = this.$store.state.account.address;
let acctType = this.$store.state.account.type;
this.normalHistory = this.normalHistory.filter(item => {
if (this.asset.issuer) {
return item.assetCode === this.asset.code && item.assetIssuer === this.asset.issuer && item.address === address && item.acctType === acctType;
} else {
return item.assetCode === this.asset.code && item.address === address && item.acctType === acctType;
}
return item.assetCode === this.asset.code && item.address === address && item.acctType === acctType;
});
}
},
Expand All @@ -145,12 +145,16 @@
let amount = data.meta.delivered_amount;
if (data.meta.delivered_amount instanceof Object) {
amount = data.meta.delivered_amount.value;
assetIssuer = data.meta.delivered_amount.issuer;
if (toAddress === data.meta.delivered_amount.issuer && this.$store.state.account.address === data.meta.delivered_amount.issuer) {
assetIssuer = fromAddress;
} else {
assetIssuer = data.meta.delivered_amount.issuer;
}
assetCode = data.meta.delivered_amount.currency;
fromAddress = data.meta.delivered_amount.issuer;
// fromAddress = data.meta.delivered_amount.issuer;
} else {
amount = data.meta.delivered_amount / 1000000;
assetCode = this.asset.code;
assetCode = this.shortType(this.$store.state.account.type);
}
let history = {
address: this.$store.state.account.address,
Expand Down

0 comments on commit f8f3cac

Please sign in to comment.