ETH plugin SDK : Move some parts from plugin boilerplate to Eth plugin SDK to ease the plugins development, remove throw and fix the CI issues
This commit is contained in:
committed by
Alexandre Paillier
parent
03c43f73da
commit
eeb52344df
@@ -463,12 +463,16 @@ void finalizeParsing(bool direct) {
|
||||
|
||||
// Format the amount in a temporary buffer, if in swap case compare it with validated
|
||||
// amount, else commit it
|
||||
amountToString(tmpContent.txContent.value.value,
|
||||
tmpContent.txContent.value.length,
|
||||
decimals,
|
||||
ticker,
|
||||
displayBuffer,
|
||||
sizeof(displayBuffer));
|
||||
if (!amountToString(tmpContent.txContent.value.value,
|
||||
tmpContent.txContent.value.length,
|
||||
decimals,
|
||||
ticker,
|
||||
displayBuffer,
|
||||
sizeof(displayBuffer))) {
|
||||
PRINTF("OVERFLOW, amount to string failed\n");
|
||||
THROW(EXCEPTION_OVERFLOW);
|
||||
}
|
||||
|
||||
if (G_called_from_swap) {
|
||||
// Ensure the values are the same that the ones that have been previously validated
|
||||
if (strcmp(strings.common.fullAmount, displayBuffer) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user