diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 0cd66a3c..086d2443 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -181,18 +181,18 @@ const isResizableLayout = computed(() => ['', 'sm', 'md', 'lg', 'xl'].includes(currentBreakpoint.value), ); const isLayoutLocked = computed(() => { - return layoutStore.layoutLocked || !isResizableLayout; + return layoutStore.layoutLocked || !isResizableLayout.value; }); const gridLayoutData = computed((): GridItemData[] => { - if (isResizableLayout) { + if (isResizableLayout.value) { return layoutStore.dashboardLayout; } return [...layoutStore.getDashboardLayoutSm]; }); const layoutUpdatedEvent = (newLayout) => { - if (isResizableLayout) { + if (isResizableLayout.value) { console.log('newlayout', newLayout); console.log('saving dashboard'); layoutStore.dashboardLayout = newLayout; diff --git a/src/views/Trading.vue b/src/views/Trading.vue index 3a476567..5d7be213 100644 --- a/src/views/Trading.vue +++ b/src/views/Trading.vue @@ -177,10 +177,10 @@ const isResizableLayout = computed(() => ['', 'sm', 'md', 'lg', 'xl'].includes(currentBreakpoint.value), ); const isLayoutLocked = computed(() => { - return layoutStore.layoutLocked || !isResizableLayout; + return layoutStore.layoutLocked || !isResizableLayout.value; }); const gridLayoutData = computed((): GridItemData[] => { - if (isResizableLayout) { + if (isResizableLayout.value) { return layoutStore.tradingLayout; } return [...layoutStore.getTradingLayoutSm]; diff --git a/tests/unit/formatters.spec.ts b/tests/unit/formatters.spec.ts index 446670c7..10949a6c 100644 --- a/tests/unit/formatters.spec.ts +++ b/tests/unit/formatters.spec.ts @@ -10,7 +10,7 @@ describe('formatters.ts', () => { expect(formatPriceCurrency(5123.551123, 'USDT', 3)).toEqual('5123.551 USDT'); expect(formatPriceCurrency(5123.551123, 'USDT')).toEqual('5123.551 USDT'); expect(formatPriceCurrency(5123.551123, 'USDT', 5)).toEqual('5123.55112 USDT'); - expect(formatPriceCurrency(5123.5511230000000001, 'USDT', 5)).toEqual('5123.55112 USDT'); + expect(formatPriceCurrency(5123.551123000001, 'USDT', 5)).toEqual('5123.55112 USDT'); expect(formatPriceCurrency(0.00001, 'BTC', 5)).toEqual('0.00001 BTC'); }); @@ -18,7 +18,7 @@ describe('formatters.ts', () => { expect(formatPrice(5123.5123512)).toEqual('5123.5123512'); expect(formatPrice(5123.5123512, 8)).toEqual('5123.5123512'); expect(formatPrice(5123.5123512, 3)).toEqual('5123.512'); - expect(formatPrice(5123.51200000000000001, 8)).toEqual('5123.512'); + expect(formatPrice(5123.512000000001, 8)).toEqual('5123.512'); expect(formatPrice(0.001, 3)).toEqual('0.001'); expect(formatPrice(0.0019, 3)).toEqual('0.002'); expect(formatPrice(2.701e-9, 3)).toEqual('0');