yoroi-frontend: Transaction signing fails with the Ergo dApp connector
When trying to sign an unsigned transaction, I get the following error:
Error: genLookupOrFail no token info for {"identifier":"d58b85b6e6319796d42feccfee4f80086efbd4d9098dd435f205750845d501f9","amount":"-1","networkId":200}
at Object.getTokenInfo (ergo.bundle.js:1)
at Vn.renderAmountDisplay (ergo.bundle.js:1)
at s (ergo.bundle.js:1)
at ergo.bundle.js:1
at Array.map (<anonymous>)
at Vn.renderRow (ergo.bundle.js:1)
at ergo.bundle.js:1
at Array.map (<anonymous>)
at Vn.render (ergo.bundle.js:1)
at Se (813.bundle.js:2)
rs @ 587.bundle.js:2
The unsigned transaction is perfectly fine because the node is able to sign it (with the same secrets as my Yoroi wallet).
The d58b85b6e6319796d42feccfee4f80086efbd4d9098dd435f205750845d501f9 is a token in one of the inputs of the transaction (not related to my wallet’s UTXOs).
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 16 (7 by maintainers)
Hi, @anon-real! Thank you for that great hosted resource and the instruction to reproduce the problems!
Regarding this first problem - I am now releasing a new nightly version of Yoroi 4.5.7005 - please update to that version and try it again, this should be fixed there. I have got connection to wallet working on your page with no problems with that fix.
To be able to reproduce other problems you will have to upgrade to the changes in the latest Yoroi, tho, because the dapp-connector now requires all the output values and asset amounts to be specified as strings always, see this PR (the nightly is now built from this branch) - https://github.com/Emurgo/yoroi-frontend/pull/2246
I am getting to the point where your page receives utxos, but their values are now strings, so things seem to be breaking after that. This update will be needed in any way as we are positively making this change for safe value exchange going forward.
Once you page is updated to the strings - I will look into any further errors ASAP.
cc @oskin1 for more details if needed.
I am also experiencing some other issues like “Uncaught (in promise) Error: [mobx] An invariant failed, however the error is obfuscated because this is a production build.” when trying to connect to my wallet. I have set up a test auction house so you can see the issues for yourselves: https://yoroi.ergoauctions.org/
You can produce all these issues (#2157 #2160 and the error above) by following these steps:
The requested unsigned tx will be printed, the source code which you may find useful: https://github.com/anon-real/ErgoAuctionHouse/blob/yoroi/src/auction/bidYoroi.js#L123
It can be signed as is, yes. When an asset is initially minted it also stores info like a friendly name, how many decimal places it has, etc. We use this information to display a more user-friendly tx signing screen since I guess we hadn’t considered this when the UI was written. Worst case we could just only show the ID, but I’m not familiar with the UI code. I’ve informed the guy who did it though so we’ll see.