mymonero-app-js: "This wallet must be first imported" - cant sent xmr
HI I imported stagenet wallet and even though it has plenty of stagenet xmr the error message is “This wallet must be first imported” and I can cant spent anything. I had this error before, but due to focus on v11 over last week or so had not time to make any issue nor revisit this problem.
Error: "This wallet must first be imported."
error_fn Wallet.js:1430 i MyMoneroLibAppBridgeClass.js:109 fromCpp__SendFundsFormSubmission__error MyMoneroLibAppBridgeClass.js:65 Le MyMoneroLibAppCpp_WASM.js:8 _emscripten_asm_const_ii MyMoneroLibAppCpp_WASM.js:8 dynCall_vi MyMoneroLibAppCpp_WASM.js:8 invoke_vi MyMoneroLibAppCpp_WASM.js:8 dynCall_viiiii MyMoneroLibAppCpp_WASM.js:8 invoke_viiiii MyMoneroLibAppCpp_WASM.js:8 dynCall_viiiii MyMoneroLibAppCpp_WASM.js:8 invoke_viiiii MyMoneroLibAppCpp_WASM.js:8 dynCall_viiiiii MyMoneroLibAppCpp_WASM.js:8 invoke_viiiiii MyMoneroLibAppCpp_WASM.js:8 dynCall_vi MyMoneroLibAppCpp_WASM.js:8 invoke_vi MyMoneroLibAppCpp_WASM.js:8 dynCall_vi MyMoneroLibAppCpp_WASM.js:8 invoke_vi MyMoneroLibAppCpp_WASM.js:8 dynCall_vii MyMoneroLibAppCpp_WASM.js:8 invoke_vii MyMoneroLibAppCpp_WASM.js:8 dynCall_iii_43 mymonero-app-bundle.js:4 send_funds mymonero-app-bundle.js:8 async__send_funds MyMoneroLibAppBridgeClass.js:252 SendFunds Wallet.js:1446 y SendFundsView_Base.web.js:1572 _tryToGenerateSend SendFundsView_Base.web.js:1568 Navigation_New_RightBarButtonView SendFundsView_Base.web.js:946
Wallet.js:1431:3
err Error: "This wallet must first be imported."
error_fn Wallet.js:1430 i MyMoneroLibAppBridgeClass.js:109 fromCpp__SendFundsFormSubmission__error MyMoneroLibAppBridgeClass.js:65 Le MyMoneroLibAppCpp_WASM.js:8 _emscripten_asm_const_ii MyMoneroLibAppCpp_WASM.js:8 dynCall_vi MyMoneroLibAppCpp_WASM.js:8 invoke_vi MyMoneroLibAppCpp_WASM.js:8 dynCall_viiiii MyMoneroLibAppCpp_WASM.js:8 invoke_viiiii MyMoneroLibAppCpp_WASM.js:8 dynCall_viiiii MyMoneroLibAppCpp_WASM.js:8 invoke_viiiii MyMoneroLibAppCpp_WASM.js:8 dynCall_viiiiii MyMoneroLibAppCpp_WASM.js:8 invoke_viiiiii MyMoneroLibAppCpp_WASM.js:8 dynCall_vi MyMoneroLibAppCpp_WASM.js:8 invoke_vi MyMoneroLibAppCpp_WASM.js:8 dynCall_vi MyMoneroLibAppCpp_WASM.js:8 invoke_vi MyMoneroLibAppCpp_WASM.js:8 dynCall_vii MyMoneroLibAppCpp_WASM.js:8 invoke_vii MyMoneroLibAppCpp_WASM.js:8 dynCall_iii_43 mymonero-app-bundle.js:4 send_funds mymonero-app-bundle.js:8 async__send_funds MyMoneroLibAppBridgeClass.js:252 SendFunds Wallet.js:1446 y SendFundsView_Base.web.js:1572 _tryToGenerateSend SendFundsView_Base.web.js:1568 Navigation_New_RightBarButtonView SendFundsView_Base.web.js:946
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 33 (2 by maintainers)
Commits related to this issue
- Add generated_locally to login endpoint https://github.com/mymonero/mymonero-app-js/issues/278 — committed to moneroexamples/openmonero by moneroexamples 5 years ago
Yeah, this is a server matter… we’re about to deploy our fix for it. You have to deploy the “generated_locally” flag so the client can combine that with the account_scan_start_height to determine that the wallet no longer needs to be imported. The reason it’s happening is that the app doesn’t have any other way, in the absence of these fields, to tell that the wallet doesn’t need to be imported anymore… because it was looking at the new_address field combined with the wallet’s local reckoning of whether the wallet was locally generated.
A temporary workaround is to remove the wallet then add it back.
The generated_locally flag is sent to the server like this
https://github.com/mymonero/mymonero-app-js/blob/5dd9053b39ceeb946315b4adca7adff2443349f5/local_modules/HostedMoneroAPIClient/HostedMoneroAPIClient_Base.js#L78
and it gets sent back to the client accordingly…
and it gets used like this
https://github.com/mymonero/mymonero-app-js/blob/5dd9053b39ceeb946315b4adca7adff2443349f5/local_modules/Wallets/Models/Wallet.js#L845