Add pointer to msg_sender in Eth_plugin_finalize (#170)

* Add some PRINTF debug statements and fir additional screens init

* Memzero struture and use two pointers less

* Clang-format

* Use ADDRESS_LENGTH where possible; Add printf statements when failing to compare contracts

* clang-format

* Remove 'token1' and 'token2' locals

* Fix typo

* apply clang-format

* Add bip32path to sharedRO for plugins

* Change getEthAddressStringFromKey to accept char instead of uint8_t

* Update ethereum plugin sdk

* Add BYPASS_SIGNATURES compilation option

* Remove bip32path and pathLength from sharedRO; add msg_sender pointer to pluginFinalize.address

* clang format eth_plugin_interface

* Update submodule

* Set address BEFORE making the finalize call

* Update SDK

Co-authored-by: TamtamHero <10632523+TamtamHero@users.noreply.github.com>
This commit is contained in:
pscott
2021-07-09 11:16:23 +02:00
committed by TamtamHero
parent 5ef3e77820
commit d541f1f524
13 changed files with 87 additions and 36 deletions

View File

@@ -88,8 +88,10 @@ void handleProvideErc20TokenInformation(uint8_t p1,
32,
workBuffer + offset,
dataLength)) {
#ifndef HAVE_BYPASS_SIGNATURES
PRINTF("Invalid token signature\n");
THROW(0x6A80);
#endif
}
tmpCtx.transactionContext.tokenSet[tmpCtx.transactionContext.currentTokenIndex] = 1;
THROW(0x9000);
@@ -175,8 +177,10 @@ void handleProvideErc20TokenInformation(uint8_t p1,
32,
workBuffer + offset,
dataLength)) {
#ifndef HAVE_BYPASS_SIGNATURES
PRINTF("Invalid token signature\n");
THROW(0x6A80);
#endif
}
}
@@ -193,8 +197,10 @@ void handleProvideErc20TokenInformation(uint8_t p1,
32,
workBuffer + offset,
dataLength)) {
#ifndef HAVE_BYPASS_SIGNATURES
PRINTF("Invalid token signature\n");
THROW(0x6A80);
#endif
}
#endif