mirror of
https://github.com/status-im/EIPs.git
synced 2025-01-27 23:26:03 +00:00
Automatically merged updates to draft EIP(s) 1102
Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing
This commit is contained in:
parent
95317d5126
commit
5e71d200da
@ -51,7 +51,7 @@ Dapps MUST request an Ethereum provider API by sending a message using the [`win
|
|||||||
|
|
||||||
#### `[2] INJECT`
|
#### `[2] INJECT`
|
||||||
|
|
||||||
Ethereum-enabled DOM environments MUST expose an Ethereum provider API as a global `ETHEREUM_PROVIDER` variable on the `window` object.
|
Ethereum-enabled DOM environments MUST expose an Ethereum provider API as a global `ethereum` variable on the `window` object.
|
||||||
|
|
||||||
#### `[3] NOTIFY`
|
#### `[3] NOTIFY`
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ window.addEventListener('message', function (event) {
|
|||||||
if (!event.data || !event.data.type) { return; }
|
if (!event.data || !event.data.type) { return; }
|
||||||
if (event.data.type === 'ETHEREUM_PROVIDER_SUCCESS') {
|
if (event.data.type === 'ETHEREUM_PROVIDER_SUCCESS') {
|
||||||
// Provider API exposed, continue
|
// Provider API exposed, continue
|
||||||
const networkVersion = await ETHEREUM_PROVIDER.send('net_version', []);
|
const networkVersion = await ethereum.send('net_version', []);
|
||||||
console.log(networkVersion);
|
console.log(networkVersion);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user