This commit is contained in:
James Long 2022-11-12 22:13:25 -05:00
parent 2d9b319e45
commit a4a7803407
4 changed files with 6 additions and 6 deletions

View file

@ -6,9 +6,9 @@ export function generateAccount(name, isConnected, type, offbudget) {
return {
id: uuid.v4Sync(),
name,
balance_current: isConnected ? Math.floor(Math.random() * 100000): null,
bank: isConnected ? Math.floor(Math.random() * 10000): null,
bankId: isConnected ? Math.floor(Math.random() * 10000): null,
balance_current: isConnected ? Math.floor(Math.random() * 100000) : null,
bank: isConnected ? Math.floor(Math.random() * 10000) : null,
bankId: isConnected ? Math.floor(Math.random() * 10000) : null,
bankName: isConnected ? 'boa' : null,
type: type || 'checking',
offbudget: offbudget ? 1 : 0,

View file

@ -1,9 +1,9 @@
import * as monthUtils from '../../shared/months';
import { safeNumber } from '../../shared/util';
import * as db from '../db';
import * as prefs from '../prefs';
import * as sheet from '../sheet';
import { batchMessages } from '../sync';
import { safeNumber } from '../../shared/util';
async function getSheetValue(sheetName, cell) {
const node = await sheet.getCell(sheetName, cell);

View file

@ -1,5 +1,5 @@
import { number } from '../spreadsheet/globals';
import { safeNumber } from '../../shared/util';
import { number } from '../spreadsheet/globals';
export { number } from '../spreadsheet/globals';

View file

@ -307,7 +307,7 @@ setNumberFormat('comma-dot');
// because we always do that on numbers, the app would potentially
// display wrong numbers. Instead of `2**53` we use `2**51` which
// gives division more room to be correct
const MAX_SAFE_NUMBER = 2**51 - 1;
const MAX_SAFE_NUMBER = 2 ** 51 - 1;
const MIN_SAFE_NUMBER = -MAX_SAFE_NUMBER;
export function safeNumber(value) {