-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Donjon code review #19
Comments
|
|
|
Hi @adrienlacombe-ledger , thank you for the review. I have a question about the However, when I don't want to parse a certain parameter I put |
hi @GuilaneDen When there is no need to parse more parameters we can use |
|
|
|
|
|
Modify main according with LedgerHQ/app-plugin-nft@12d0bc1
Add the following to apwine_plugin.h https://github.com/LedgerHQ/app-plugin-boilerplate/blob/9faab4bed0fb0a57e4b60dc2acfd5a32ee4c5421/src/boilerplate_plugin.h#L61
Use
copy_address
instead inLedgerHQ-app-plugin-apwine/src/handle_provide_parameter.c
Lines 18 to 29 in 6c6bdd7
When when getting an offset/length from a parameter, one of these functions should be used https://github.com/LedgerHQ/ethereum-plugin-sdk/blob/81eb658b138f8201c666351315e79d04400219aa/include/eth_internals.h#L109-L111 , for instance in
LedgerHQ-app-plugin-apwine/src/handle_provide_parameter.c
Line 34 in 6c6bdd7
Looking at https://github.com/APWine/apwine-smart-contracts-public/blob/ec7468cd879bb245cb0ba2881e9df9141b8e80a3/amm/contracts/AMMRouterV1.sol#L69 , https://github.com/APWine/apwine-smart-contracts-public/blob/ec7468cd879bb245cb0ba2881e9df9141b8e80a3/amm/contracts/AMMRouterV1.sol#L149 it seems that
length(_pairPath) <= 2
, yet inLedgerHQ-app-plugin-apwine/src/handle_provide_parameter.c
Lines 89 to 91 in 6c6bdd7
When all parameters are parsed correctly, set
context->valid = true
and then onhandle_finalize.c
ifcontext->valid == false
set an error. It should be initialized to false before starting parsing parameters.Remove the following lines
LedgerHQ-app-plugin-apwine/src/handle_provide_parameter.c
Lines 179 to 180 in 6c6bdd7
The code should have been ready to be reviewed
LedgerHQ-app-plugin-apwine/src/handle_finalize.c
Lines 35 to 40 in 6c6bdd7
The text was updated successfully, but these errors were encountered: