Skip to content

Commit 2377e73

Browse files
committed
optimized page view
1 parent e3a1630 commit 2377e73

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/CrossChainPanelV2/hooks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function calcReceiveValueAndFee (inputBridgeValue: any, destConfig:any, d
1111
const minFee = destConfig.BaseFeePercent ? (destConfig.MinimumSwapFee / (100 + destConfig.BaseFeePercent)) * 100 : destConfig.MinimumSwapFee
1212
const baseFee = destConfig.BaseFeePercent ? minFee * destConfig.BaseFeePercent / 100 : 0
1313
let fee = Number(inputBridgeValue) * Number(destConfig.SwapFeeRatePerMillion) / 100
14-
let value = Number(inputBridgeValue) - fee
14+
let value:any = Number(inputBridgeValue) - fee
1515
// console.log(minFee)
1616
// console.log(baseFee)
1717
if (fee < Number(minFee)) {
@@ -22,8 +22,10 @@ export function calcReceiveValueAndFee (inputBridgeValue: any, destConfig:any, d
2222
fee = fee
2323
}
2424
value = Number(inputBridgeValue) - fee - baseFee
25+
// console.log(value)
2526
if (value && Number(value) && Number(value) > 0) {
2627
const dec = Math.min(6, decimals)
28+
value = value.toFixed(16)
2729
return {
2830
fee: fee,
2931
outputBridgeValue: thousandBit(formatDecimal(value, dec), 'no')

src/utils/indexedDB/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (!w.indexedDB) {
1616

1717
const TOKENLIST = 'token-list'
1818

19-
const version = '0.1.4'
19+
const version = '0.1.5'
2020

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

0 commit comments

Comments
 (0)