Closed ShookLyngs closed 6 months ago
The 503 error still exists after the changes, it may require more effort to resolve the issue. I also updated some tests to avoid accessing the Mempool API, or just give it more tries when failed.
Maybe you can consider using https://vitest.dev/guide/mocking.html#modules to mock @mempool/mempool.js
, and then wait for the Assets API https://github.com/ckb-cell/btc-assets-api/pull/96.
vi.mock('@mempool/mempool.js', async (importOriginal) => {
const Mempool = importOriginal('@mempool/mempool.js')
return (config) => {
const mempool = Mempool(config);
mempool.bitcoin.fees.getFeesRecommended = vi.fn().mockResolvedValue({ ... });
return mempool;
}
})
Closing the PR, the PR can be replaced by #148 because it's a more reliable update.
Changes
cell.mempool.space
as the Mempool API hostname