1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts
Mark Stacey 95b4d91116
Replace undefined selectedAddress with null (#7161)
* Replace `undefined` selectedAddress with `null`

The `runtime.Port.postMessage` API will drop keys with a value of
`undefined` on Chrome, but not on Firefox. This was a problem for the
`publicConfig` stream, which passed the key `selectedAddress` with the
value of `undefined` to communicate to dapps that the user had logged
out.

Instead a `null` is now passed for `selectedAddress` upon logout, which
is correctly sent by the `runtime.Port.postMessage` API on both Chrome
and Firefox.

closes #7101
closes #7109

* Update `metamask-inpage-provider` to v3.0.0

The v3.0.0 update includes a change to the `accountsChanged` event. The
event will now emit an empty array instead of an array with `undefined`
or `null`.

The previous behavior was to emit `[undefined]`. The previous commit
would have changed that to `[null]` anyway, so we figured if we're
going to make a public-facing change to the event anyway we should
change it to be correct. `[undefined]` was never intended, and it
technically violates EIP-1193, which states that the `accountsChanged`
event should emit an array of strings.
2019-09-13 11:32:55 -03:00
..
account-import-strategies account-import-strategies - ensure privateKey is prefixed before converting to buffer 2018-06-13 21:06:33 -07:00
controllers Remove redundant error logging (#7158) 2019-09-12 17:00:35 -03:00
lib fix rinkeby spelling (#7148) 2019-09-10 12:51:34 -10:00
migrations Connections settings tab (#7013) 2019-08-15 18:37:18 -02:30
platforms Close window after opening fullscreen (#6966) 2019-08-08 11:50:32 -03:00
background.js Add polyfill for AbortController (#7157) 2019-09-12 17:07:27 -03:00
chromereload.js
contentscript.js Remove reload from Share Address button (#6991) 2019-08-09 15:00:59 -02:30
createStandardProvider.js Refactor ProviderApprovalController to use rpc and publicConfigStore (#6410) 2019-05-03 13:32:05 -04:00
edge-encryptor.js Enable indent linting via ESLint (#6936) 2019-07-31 10:17:11 -10:00
first-time-state.js
inpage.js Add warning about reload on network change 2019-08-21 14:14:35 -03:00
metamask-controller.js Replace undefined selectedAddress with null (#7161) 2019-09-13 11:32:55 -03:00
phishing-detect.js Rename accountManager usages (#6790) 2019-07-10 16:31:48 -02:30
README.md
ui.js Add polyfill for AbortController (#7157) 2019-09-12 17:07:27 -03:00

Main MetaMask Code

This folder contains the core-code.

Currently, it is organized mostly based on file category, like:

controllers, migrations, lib

Ongoing Task

Refactor code-structure, thus the subsystems are reflected on the filesystem.

Examples