diff --git a/a3p-integration/proposals/z:acceptance/test-lib/rpc.js b/a3p-integration/proposals/z:acceptance/test-lib/rpc.js index 955f1235477..2a25b534911 100644 --- a/a3p-integration/proposals/z:acceptance/test-lib/rpc.js +++ b/a3p-integration/proposals/z:acceptance/test-lib/rpc.js @@ -43,12 +43,12 @@ export { networkConfig }; * @param {typeof window.fetch} powers.fetch * @param {MinimalNetworkConfig} config */ -export const makeVStorage = (powers, config = networkConfig) => { +export const makeVStorage = ({ fetch }, config = networkConfig) => { /** @param {string} path */ const getJSON = path => { const url = config.rpcAddrs[0] + path; // console.warn('fetching', url); - return powers.fetch(url, { keepalive: true }).then(res => res.json()); + return fetch(url, { keepalive: true }).then(res => res.json()); }; // height=0 is the same as omitting height and implies the highest block const url = (path = 'published', { kind = 'children', height = 0 } = {}) => diff --git a/packages/client-utils/src/vstorage.js b/packages/client-utils/src/vstorage.js index b8eec61330e..be365debf3d 100644 --- a/packages/client-utils/src/vstorage.js +++ b/packages/client-utils/src/vstorage.js @@ -9,12 +9,12 @@ * @param {typeof window.fetch} powers.fetch * @param {MinimalNetworkConfig} config */ -export const makeVStorage = (powers, config) => { +export const makeVStorage = ({ fetch }, config) => { /** @param {string} path */ const getJSON = path => { const url = config.rpcAddrs[0] + path; // console.warn('fetching', url); - return powers.fetch(url, { keepalive: true }).then(res => res.json()); + return fetch(url, { keepalive: true }).then(res => res.json()); }; // height=0 is the same as omitting height and implies the highest block const url = (path = 'published', { kind = 'children', height = 0 } = {}) =>