Fix provider fallbacks for non dev networks

This now checks if frame or a local node is running and else uses infura
to connect to the ethereum network.
Now you can use all the helpers for the testnets/mainnet without running
anything (in readonly mode)
This commit is contained in:
bumi 2019-04-05 13:51:23 +02:00
parent 551edcfa72
commit 6510dca4b1

View File

@ -28,7 +28,7 @@ const providerForNetwork = (network) => (
let [first, ...rest] = network; let [first, ...rest] = network;
preset = `infura${first.toUpperCase()}${rest.join('')}`; preset = `infura${first.toUpperCase()}${rest.join('')}`;
} }
return provider('frame', 'local', preset); return provider(['frame', 'local', preset]);
} }
} }
) )