Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/hooks/__tests__/useWallet.test.js
import useWallet from '../useWallet'; | import useWallet from '../useWallet'; | ||||
import useBCH from '../useBCH'; | |||||
import { renderHook, act } from '@testing-library/react-hooks'; | import { renderHook, act } from '@testing-library/react-hooks'; | ||||
import localforage from 'localforage'; | import localforage from 'localforage'; | ||||
import mockLegacyWallets from '../__mocks__/mockLegacyWallets'; | import mockLegacyWallets from '../__mocks__/mockLegacyWallets'; | ||||
import BCHJS from '@psf/bch-js'; | import BCHJS from '@psf/bch-js'; | ||||
const mockBCH = new BCHJS(); | |||||
Fabien: This appears to be unused | |||||
jest.mock('../useBCH'); | |||||
useBCH.mockReturnValue({ getBCH: () => new BCHJS() }); | |||||
test('Migrating legacy wallet on testnet', async () => { | test('Migrating legacy wallet on testnet', async () => { | ||||
const expectedMigrationResult = { | const expectedMigrationResult = { | ||||
Path145: { | Path145: { | ||||
cashAddress: | cashAddress: | ||||
'bitcoincash:qq47pcxfn8n7w7jy86njd7pvgsv39l9f9v0lgx569z', | 'bitcoincash:qq47pcxfn8n7w7jy86njd7pvgsv39l9f9v0lgx569z', | ||||
fundingAddress: | fundingAddress: | ||||
'simpleledger:qq47pcxfn8n7w7jy86njd7pvgsv39l9f9vryrap6mu', | 'simpleledger:qq47pcxfn8n7w7jy86njd7pvgsv39l9f9vryrap6mu', | ||||
fundingWif: 'L2xvTe6CdNxroR6pbdpGWNjAa55AZX5Wm59W5TXMuH31ihNJdDjt', | fundingWif: 'L2xvTe6CdNxroR6pbdpGWNjAa55AZX5Wm59W5TXMuH31ihNJdDjt', | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |
This appears to be unused