Skip to content

Commit

Permalink
Merge pull request #1873 from hypersign-protocol/stage
Browse files Browse the repository at this point in the history
Stage=> develop
  • Loading branch information
Raj6939 authored Jan 23, 2023
2 parents abcffb8 + d44b832 commit 332442a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
45 changes: 29 additions & 16 deletions src/components/admin/marketPlaceSlider/marketPlaceSlide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ allButtons {
<label for="placeHolder" class="col-form-label">Total:</label>
</div>
<div class="col-lg-6 col-md-6 px-0">
<span v-if="feeStructure.fyrePlatformCommision!==''" style="float:right">{{ (getFriendlyValue(feeStructure.totalAmountToDistribute) - getFriendlyValue(feeStructure.fyrePlatformCommision)).toFixed(4)}}
<span v-if="feeStructure.fyrePlatformCommision!==''" style="float:right">{{ total}}
{{feeStructure.symbol}} Tokens</span>
</div>
</div>
Expand All @@ -234,7 +234,7 @@ allButtons {
<label for="placeHolder" class="col-form-label">Platform Fee:</label>
</div>
<div class="col-lg-6 col-md-6 px-0">
<span v-if="feeStructure.fyrePlatformCommision!==''" style="float:right">{{getFriendlyValue(feeStructure.fyrePlatformCommision)}}
<span v-if="feeStructure.fyrePlatformCommision!==''" style="float:right">{{getPlatformFee}}
{{feeStructure.symbol}} Tokens</span>
</div>
</div>
Expand All @@ -244,7 +244,7 @@ allButtons {
<label for="placeHolder" class="col-form-label">Total Payable:</label>
</div>
<div class="col-lg-6 col-md-6 px-0">
<span v-if="feeStructure.totalAmountToDistribute!==''" style="float:right">{{getFriendlyValue(feeStructure.totalAmountToDistribute)}}
<span v-if="feeStructure.totalAmountToDistribute!==''" style="float:right">{{totalPayable(feeStructure.totalAmountToDistribute)}}
{{feeStructure.symbol}} Tokens</span>
</div>
</div>
Expand Down Expand Up @@ -366,7 +366,31 @@ export default {
'--header-bg-color': config.app.headerBGColor,
'--header-text-color':config.app.headerTextColor
}
}
},
getPlatformFee() {
const convertToDecimal = Number(this.feeStructure.fyrePlatformCommision)/Number(10 ** this.feeStructure.decimals)
const roundedFyreCommisson = Number(convertToDecimal).toFixed(4)
return roundedFyreCommisson
},
totalPayable() {
return friendlyValue => {
const convertToDecimal = Number(friendlyValue)/Number(10 ** this.feeStructure.decimals)
const rounded = Number(convertToDecimal).toFixed(4)
return rounded
}
},
total(){
let amountWithCommisson = Number(this.feeStructure.totalAmountToDistribute)/Number(10 **this.feeStructure.decimals)
let onlyAmountCommission = Number(this.feeStructure.fyrePlatformCommision)/Number(10 **this.feeStructure.decimals)
return (amountWithCommisson-onlyAmountCommission).toFixed(4)
},
getRoundOffValue(){
return roudOff => {
const inwei = (10 ** this.feeStructure.decimal)
const inNumber = roudOff/inwei
return inNumber
}
}
},
data() {
return {
Expand Down Expand Up @@ -480,18 +504,7 @@ export default {
this.files = null
this.showDismissibleAlert.status = false
this.simpleData=""
},
getFriendlyValue(str) {
const convertToDecimal = Number(str)/Number(10 ** this.feeStructure.decimals)
const rounded = Number(convertToDecimal).toFixed(4)
return rounded
},
getRoundOffValue(num) {
const inwei = (10 ** this.feeStructure.decimal)
const inNumber = num/inwei
return inNumber
},
},
async onSelectChain(e) {
if(e===null) {
return this.notifyErr('Select Chain')
Expand Down
3 changes: 1 addition & 2 deletions src/mixins/fieldValidationMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ export function shortenName(first,last) {
}
const eachLen = 3
const firstPart = first.substr(0, eachLen);
const lastPart = last.slice(-eachLen);
console.log(firstPart+lastPart)
const lastPart = last.slice(-eachLen);
return firstPart + lastPart;
}

Expand Down

0 comments on commit 332442a

Please sign in to comment.