Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1304 from jinbiao-bianjie/hotfix/v0.10.7
Browse files Browse the repository at this point in the history
fix display error number in address page
  • Loading branch information
kaifei Hu authored Mar 27, 2020
2 parents 976b7af + 47a753b commit 51274bf
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions frontend/src/components/address/delegator/AddressInfomation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@
}},(res) => {
try {
if(res && res.length > 0){
this.delegationPageNationArrayData = this.pageNation(res);
let copyResult = JSON.parse(JSON.stringify(res));
this.delegationPageNationArrayData = this.pageNation(copyResult);
if(res.length > this.pageSize){
this.flDelegationNextPage = true;
}else {
Expand Down Expand Up @@ -431,7 +432,8 @@
}},(res) => {
try {
if(res && res.length > 0){
this.unBondingDelegationPageNationArrayData = this.pageNation(res);
let copyResult = JSON.parse(JSON.stringify(res));
this.unBondingDelegationPageNationArrayData = this.pageNation(copyResult);
if(res.length > this.pageSize){
this.flUnBondingDelegationNextPage = true
}else {
Expand Down Expand Up @@ -682,8 +684,8 @@
this.delegationsItems = this.delegationPageNationArrayData[pageNum].map(item => {
return {
address: item.address,
amount: `${Tools.formatStringToFixedNumber(item.amount.amount.toString(),this.fixedNumber)} ${item.amount.denom.toUpperCase()}`,
shares: (Number(item.shares)).toFixed(2),
amount: `${new BigNumber(Tools.formatStringToFixedNumber(item.amount.amount.toString(),this.fixedNumber)).toFormat()} ${item.amount.denom.toUpperCase()}`,
shares: new BigNumber((Number(item.shares)).toFixed(2)).toFormat(),
block: item.height,
moniker: item.moniker
}
Expand All @@ -692,8 +694,8 @@
this.delegationsItems = this.delegationPageNationArrayData.map(item => {
return {
address: item.address,
amount: `${Tools.formatStringToFixedNumber(item.amount.amount.toString(),this.fixedNumber)} ${item.amount.denom.toUpperCase()}`,
shares: (Number(item.shares)).toFixed(2),
amount: `${new BigNumber(Tools.formatStringToFixedNumber(item.amount.amount.toString(),this.fixedNumber)).toFormat()} ${item.amount.denom.toUpperCase()}`,
shares: new BigNumber((Number(item.shares)).toFixed(2)).toFormat(),
block: item.height,
moniker: item.moniker
}
Expand All @@ -707,7 +709,7 @@
this.unBondingDelegationsItems = this.unBondingDelegationPageNationArrayData[pageNum].map( item =>{
return {
address: item.address,
amount: `${Tools.formatStringToFixedNumber(item.amount.amount.toString(),this.fixedNumber)} ${item.amount.denom.toUpperCase()}`,
amount: `${new BigNumber(Tools.formatStringToFixedNumber(item.amount.amount.toString(),this.fixedNumber)).toFormat()} ${item.amount.denom.toUpperCase()}`,
block: item.height,
endTime: Tools.format2UTC(item.end_time),
moniker: item.moniker
Expand All @@ -717,7 +719,7 @@
this.unBondingDelegationsItems = this.unBondingDelegationPageNationArrayData.map( item =>{
return {
address: item.address,
amount: `${Tools.formatStringToFixedNumber(item.amount.amount.toString(),this.fixedNumber)} ${item.amount.denom.toUpperCase()}`,
amount: `${new BigNumber(Tools.formatStringToFixedNumber(item.amount.amount.toString(),this.fixedNumber)).toFormat()} ${item.amount.denom.toUpperCase()}`,
block: item.height,
endTime: Tools.format2UTC(item.end_time),
moniker: item.moniker
Expand Down

0 comments on commit 51274bf

Please sign in to comment.