Open adrienlacombe opened 1 year ago
Fixes for the issues raised:
checkpoint
as well: https://github.com/cometh-game/ledger-app-plugin/commit/a562721ae7ae7dfdcb15c3bc30053c03402017d9amountToString(context->uint256_one, INT256_LENGTH, 0, "", msg->msg, msg->msgLength)
makes the app to crashRegarding 3. and 7. I'll try to modify the app so that is uses erc20OfInterest
and handle_provider_token.c
.
Will post an update when this is working.
Fix for 3. and 7: https://github.com/cometh-game/ledger-app-plugin/commit/1320dc1c2be3f5fa6a0d53e002d7b107a0684633
As discussed with @adrienlacombe-ledger, the app will display Unknown token
for the entry fee 'til MUST token is whitelisted.
hi @jeje few more comments from the Donjon
On https://github.com/cometh-game/ledger-app-plugin/blob/0086ac770b6d7ddbfb7574ccde77705bdf479abd/src/handle_provide_parameter.c#L122 and https://github.com/cometh-game/ledger-app-plugin/blob/0086ac770b6d7ddbfb7574ccde77705bdf479abd/src/handle_provide_parameter.c#L171 it is possible to trick the user by setting a tx with 0x10001 nfts, since it will be shown to the user that there is only 1 nft. A function could be created in order to read correctly this parameter, where it also makes sure that the rest of the parameter is zero.
https://github.com/cometh-game/ledger-app-plugin/blob/0086ac770b6d7ddbfb7574ccde77705bdf479abd/src/handle_query_contract_ui.c#L43 amountToString should be used. The app was crashing since an exception overflow was being thrown by the ethereum-plugin-sdk https://github.com/LedgerHQ/ethereum-plugin-sdk/blob/0de74c6382f876f89f82ef0eef90408fd94888a3/include/eth_internals.c#L203-L216 With the new commit https://github.com/cometh-game/ledger-app-plugin/commit/0086ac770b6d7ddbfb7574ccde77705bdf479abd the exception is caught and the signing process is aborted (meaning the app no longer crashes)
@adrienlacombe-ledger
amountToString
is now not crashing the app, but the change still makes the test to fail for an unknown (to me) reason.
As in that particular case we are dealing with integer values with no token symbol, I don't really understand why using amountToString
is wise.Merged welcome pack transactions and U4BE_from_parameter
fix with this commit: https://github.com/cometh-game/ledger-app-plugin/commit/cd069240b284c60693666e3b84ea2b50d1ff1f68
hi @jeje minor update needed
@adrienlacombe-ledger removed the superfluous code here: https://github.com/cometh-game/ledger-app-plugin/commit/789ae828634c4a30918c50a11961c7577f3e0bc0