openmonero
openmonero copied to clipboard
v9 Ignoring config.js
Was just playing around with v9, and noticed the frontend does not seem to listen to js/config.js
Is this due to the WASM file from https://github.com/mymonero/mymonero-core-js?
yes. Not all what is in js/config.js being used now. With time, probably will need to clean this file, and throw out what is not-used.
Alright, cool - was just making sure I wasn't crazy. Do you know of the location to change apiUrl: "http://127.0.0.1:1984/" in the WASM? I'm getting "Error connecting to the backend. Can't login."
This acctualy is used in js/config.js :-) So you should not be required to change that elsewhere, unless you want to hook-up mymonero-app-js mobile wallet to openmonero's backend.
just make sure network type is set as well. if backend running on stagnet, stagenet should also be used in js/config.js.
Ahh, OK - got it .. kind-of working, haha.
Was just playing around with some slight modifications to mymonero-core-js. After compiling the wasm, I get the following error when trying to use the newly compiled wasm file:
mymonero-core.js?1:8 wasm streaming compile failed: LinkError: WebAssembly Instantiation: table import 85 has a larger maximum size 45e than the module's declared maximum 1110
Does mymonero-core.js need to be edited? The code looks like it's some type of emscriptten format, is there a way to regenerate this file?
Did you use bin/package_browser_js
to generate wasm and corresponding mymonero-core.js file? You can also ask at https://github.com/mymonero/mymonero-core-js as probably they will now more about wasm things.
Cheers! I found how:
npm install
node --max_old_space_size=8192 node_modules/.bin/webpack --config webpack.browser.prod.config.js --display-modules;
Actually, one more question relevant to this topic. How did you generate the emscriptten file for html/js/crypto.js? Did you just compile crypto/crypto.cpp?
I did not. I downloaded it from https://mymonero.com/js/crypto.js?1
Some info about its origin are here: https://github.com/mymonero/mymonero-core-js/issues/7
New emscriptten code from mymonero eliminates lots of things, and I need to find time to go through all the legacy stuff to see what is actually being used these days and what has become obsolete. I'm not even sure that crypto.js is used this days?