Add printf and adapt logic for provideToken
@@ -289,11 +289,17 @@ void finalizeParsing(bool direct) {
}
}
// Lookup tokens if requested
- if (pluginFinalize.tokenLookup1 != NULL) {
+ if ((pluginFinalize.tokenLookup1 != NULL) || (pluginFinalize.tokenLookup2 != NULL)) {
ethPluginProvideToken_t pluginProvideToken;
+ if (pluginFinalize.tokenLookup1 != NULL) {
+ PRINTF("Lookup1: %.*H\n", ADDRESS_LENGTH, pluginFinalize.tokenLookup1);
token1 = getKnownToken(pluginFinalize.tokenLookup1);
+ PRINTF("Token1 ticker: %s\n", token1->ticker);
+ }
if (pluginFinalize.tokenLookup2 != NULL) {
+ PRINTF("Lookup2: %.*H\n", ADDRESS_LENGTH, pluginFinalize.tokenLookup2);
token2 = getKnownToken(pluginFinalize.tokenLookup2);
+ PRINTF("Token2 ticker: %s\n", token2->ticker);
}
eth_plugin_prepare_provide_token(&pluginProvideToken, token1, token2);
if (!eth_plugin_call(ETH_PLUGIN_PROVIDE_TOKEN, (void *) &pluginProvideToken)) {
