alert user when full while migrating (#1072)
test it by doing this a couple of times in your console
```
let r = await fetch('https://raw.githubusercontent.com/ethereum/remix-project/179c9634fb7469d9799a93de6b7dfa4aabc982ed/package-lock.json')
window.remixFileSystem.writeFileSync(`${Date.now()}.json`, await r.text())
```
it will fill up the storage, after 2 times or so. then run the migration.
this will give you how much is used, after 9mb it starts to fail
```
var _lsTotal=0,_xLen,_x;for(_x in localStorage){ if(!localStorage.hasOwnProperty(_x)){continue;} _xLen= ((localStorage[_x].length + _x.length)* 2);_lsTotal+=_xLen; console.log(_x.substr(0,50)+" = "+ (_xLen/1024).toFixed(2)+" KB")};console.log("Total = " + (_lsTotal / 1024).toFixed(2) + " KB");
```
Showing
Please
register
or
sign in
to comment