mymonero / mymonero-core-js

The JS library containing the Monero crypto plus lightwallet functions behind the official MyMonero apps
BSD 3-Clause "New" or "Revised" License
101 stars 103 forks source link

Fix electron import missing __IPCSafe_remote_monero_utils #66

Closed gutenye closed 5 years ago

gutenye commented 5 years ago

require('electron').remote.require is relative to main.js file, but you can put main.js file anywhere.

While if you use yarn add mymonero/mymonero-core-js#1.1.2 to install it, this fix will work always.

paulshapiro commented 5 years ago

Hm that just seems to break it for those who are expecting it to work the existing way, though. Is there any way to fix it for both?

gutenye commented 5 years ago

What's the existing way to use it? Put the mymonero-core-js source code in the parent directory of main.js file.

We can use an environemnt variable or options to toggle the behavior.

paulshapiro commented 5 years ago

you know, I may end up being able to just remove this. Ok if I take a couple days before getting back to you?

gutenye commented 5 years ago

Sure, thanks for the help.

I'm new to wasm, is it possible to use wat2js to load wasm, just like blake2b-wasm does. And wabt is a tool to do conversion between wasm and wat format.

paulshapiro commented 5 years ago

I'd love to investigate using wat, et cetera. I'd be happy to look at any proposals and suggestions.

Re this PR, I'm going to close it, since as mentioned, we were simply able to remove the whole thing. Thanks!