You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
const Api = require('@parity/parity.js').Api;
const transport = new Api.Transport.Http('http://localhost:8545');
const api = new Api(transport);
api.eth
.coinbase()
.then((coinbase) => {
console.log('The coinbase is', coinbase);
});
=======================================================
/home/kyroy/node_modules/@parity/parity.js/library.js:3
[...]
ReferenceError: fetch is not defined
at e.value (/home/kyroy/node_modules/@parity/parity.js/library.js:3:15183)
at e.r._pollConnection (/home/kyroy/node_modules/@parity/parity.js/library.js:3:14669)
at new e (/home/kyroy/node_modules/@parity/parity.js/library.js:3:14760)
at Object.<anonymous> (/home/kyroy/github/offchain-computation-verification/contracts/mm_single_client_parity.js:2:17)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.runMain (module.js:607:10)
Should probably use some kind of https://github.com/matthew-andrews/isomorphic-fetch instead.
The text was updated successfully, but these errors were encountered: