Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/hooks/__tests__/migrations.test.js
import { currency } from '../../components/Common/Ticker'; | import { currency } from 'components/Common/Ticker'; | ||||
import BigNumber from 'bignumber.js'; | import BigNumber from 'bignumber.js'; | ||||
import BCHJS from '@psf/bch-js'; | import BCHJS from '@psf/bch-js'; | ||||
import { | import { | ||||
fromSmallestDenomination, | fromSmallestDenomination, | ||||
toSmallestDenomination, | toSmallestDenomination, | ||||
} from '@utils/cashMethods'; | } from 'utils/cashMethods'; | ||||
describe('Testing functions for upgrading Cashtab', () => { | describe('Testing functions for upgrading Cashtab', () => { | ||||
it('Replacement currency.dustSats parameter parsing matches legacy DUST parameter', () => { | it('Replacement currency.dustSats parameter parsing matches legacy DUST parameter', () => { | ||||
expect( | expect( | ||||
parseFloat( | parseFloat( | ||||
new BigNumber( | new BigNumber( | ||||
fromSmallestDenomination(currency.dustSats, 8).toString(), | fromSmallestDenomination(currency.dustSats, 8).toString(), | ||||
).toFixed(8), | ).toFixed(8), | ||||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |