Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v9 Ignoring config.js #108

Open
QuantumLeaper opened this issue Nov 6, 2018 · 8 comments
Open

v9 Ignoring config.js #108

QuantumLeaper opened this issue Nov 6, 2018 · 8 comments

Comments

@QuantumLeaper
Copy link

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?

@moneroexamples
Copy link
Owner

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.

@QuantumLeaper
Copy link
Author

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

@moneroexamples
Copy link
Owner

moneroexamples commented Nov 6, 2018

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.

@QuantumLeaper
Copy link
Author

QuantumLeaper commented Nov 9, 2018

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?

@moneroexamples
Copy link
Owner

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.

@QuantumLeaper
Copy link
Author

QuantumLeaper commented Nov 10, 2018

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
Copy link
Author

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 QuantumLeaper reopened this Nov 10, 2018
@moneroexamples
Copy link
Owner

I did not. I downloaded it from https://mymonero.com/js/crypto.js?1

Some info about its origin are here: mymonero/mymonero-core-js#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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants