openmonero icon indicating copy to clipboard operation
openmonero copied to clipboard

v9 Ignoring config.js

Open QuantumLeaper opened this issue 6 years ago • 8 comments

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?

QuantumLeaper avatar Nov 06 '18 05:11 QuantumLeaper

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.

moneroexamples avatar Nov 06 '18 05:11 moneroexamples

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."

QuantumLeaper avatar Nov 06 '18 06:11 QuantumLeaper

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.

moneroexamples avatar Nov 06 '18 06:11 moneroexamples

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?

QuantumLeaper avatar Nov 09 '18 23:11 QuantumLeaper

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.

moneroexamples avatar Nov 10 '18 03:11 moneroexamples

Cheers! I found how: npm install node --max_old_space_size=8192 node_modules/.bin/webpack --config webpack.browser.prod.config.js --display-modules;

QuantumLeaper avatar Nov 10 '18 03:11 QuantumLeaper

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?

QuantumLeaper avatar Nov 10 '18 09:11 QuantumLeaper

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?

moneroexamples avatar Nov 10 '18 09:11 moneroexamples