Read RUN_APPLICATION from sdk
This commit is contained in:
20
src/utils.c
20
src/utils.c
@@ -147,23 +147,3 @@ bool amountToString(const uint8_t *amount,
|
||||
out_buffer[out_buffer_size - 1] = '\0';
|
||||
return true;
|
||||
}
|
||||
|
||||
bool parse_swap_config(const uint8_t *config, uint8_t config_len, char *ticker, uint8_t *decimals) {
|
||||
uint8_t ticker_len, offset = 0;
|
||||
if (config_len == 0) {
|
||||
return false;
|
||||
}
|
||||
ticker_len = config[offset++];
|
||||
if (ticker_len == 0 || ticker_len > MAX_TICKER_LEN - 2 || config_len - offset < ticker_len) {
|
||||
return false;
|
||||
}
|
||||
memcpy(ticker, config + offset, ticker_len);
|
||||
offset += ticker_len;
|
||||
ticker[ticker_len] = '\0';
|
||||
|
||||
if (config_len - offset < 1) {
|
||||
return false;
|
||||
}
|
||||
*decimals = config[offset];
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user