atomicDEX-API
atomicDEX-API copied to clipboard
Misleading comment in js file bundled with wasm version of kdf
Describe the bug In the latest release ( https://github.com/KomodoPlatform/komodo-defi-framework/releases/tag/v2.5.0-beta ) the kdflib.js file has misleading jsdoc comment
import init, {mm2_main, LogLevel, StartupResultCode} from "./path/to/mm2.js";
const params = {
conf: { "gui":"WASMTEST", mm2:1, "passphrase":"YOUR_PASSPHRASE_HERE", "rpc_password":"test123", "coins":[{"coin":"ETH","protocol":{"type":"ETH"}}] },
log_level: LogLevel.Info,
};
let handle_log = function (_level, line) { console.log(line) };
try {
mm2_main(params, handle_log);
} catch (e) {
switch (e.code) {
case StartupResultCode.AlreadyRunning:
alert("MarketMaker2 already runs...");
break;
// handle other errors...
default:
alert(`Unexpected error: ${e}`);
break;
}
}
StartupResultCode is not exported and the conf in this example and others need to be updated to a working version
Although it's low priority, it's trivial to fix, so targeting next release.