Skip to content

Commit

Permalink
optimized page view
Browse files Browse the repository at this point in the history
  • Loading branch information
winter520 committed Aug 9, 2022
1 parent e3a1630 commit 2377e73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/CrossChainPanelV2/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function calcReceiveValueAndFee (inputBridgeValue: any, destConfig:any, d
const minFee = destConfig.BaseFeePercent ? (destConfig.MinimumSwapFee / (100 + destConfig.BaseFeePercent)) * 100 : destConfig.MinimumSwapFee
const baseFee = destConfig.BaseFeePercent ? minFee * destConfig.BaseFeePercent / 100 : 0
let fee = Number(inputBridgeValue) * Number(destConfig.SwapFeeRatePerMillion) / 100
let value = Number(inputBridgeValue) - fee
let value:any = Number(inputBridgeValue) - fee
// console.log(minFee)
// console.log(baseFee)
if (fee < Number(minFee)) {
Expand All @@ -22,8 +22,10 @@ export function calcReceiveValueAndFee (inputBridgeValue: any, destConfig:any, d
fee = fee
}
value = Number(inputBridgeValue) - fee - baseFee
// console.log(value)
if (value && Number(value) && Number(value) > 0) {
const dec = Math.min(6, decimals)
value = value.toFixed(16)
return {
fee: fee,
outputBridgeValue: thousandBit(formatDecimal(value, dec), 'no')
Expand Down
2 changes: 1 addition & 1 deletion src/utils/indexedDB/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (!w.indexedDB) {

const TOKENLIST = 'token-list'

const version = '0.1.4'
const version = '0.1.5'

function initVersion (version:any, configVersion:any) {
const VERSION = version + '_DB_VERSION'
Expand Down

0 comments on commit 2377e73

Please sign in to comment.