Skip to content

Commit 8e0de45

Browse files
committed
rpc: rename get_uint64_t to get_uint64
1 parent f6e946a commit 8e0de45

7 files changed

Lines changed: 11 additions & 11 deletions

File tree

main/process/get_commitments.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void get_commitments_process(void* process_ptr)
5151
goto cleanup;
5252
}
5353

54-
bool ret = rpc_get_uint64_t("value", &params, &ec.c.value);
54+
bool ret = rpc_get_uint64("value", &params, &ec.c.value);
5555
if (!ret) {
5656
jade_process_reject_message(process, CBOR_RPC_BAD_PARAMETERS, "Failed to extract value from parameters");
5757
goto cleanup;

main/process/get_otp_code.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void get_otp_code_process(void* process_ptr)
7171
// totp token/code updates with time - but we disable that if an explicit epoch value is passed
7272
bool auto_update = true;
7373
#ifdef CONFIG_DEBUG_MODE
74-
if (rpc_get_uint64_t("override", &params, &value)) {
74+
if (rpc_get_uint64("override", &params, &value)) {
7575
otp_set_explicit_value(&otp_ctx, value);
7676
auto_update = false; // frozen on passed override value
7777
}

main/process/process_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int params_set_epoch_time(CborValue* params, const char** errmsg)
8484
JADE_INIT_OUT_PPTR(errmsg);
8585

8686
uint64_t epoch = 0;
87-
if (!rpc_get_uint64_t("epoch", params, &epoch)) {
87+
if (!rpc_get_uint64("epoch", params, &epoch)) {
8888
*errmsg = "Failed to extract valid epoch value from parameters";
8989
return CBOR_RPC_BAD_PARAMETERS;
9090
}

main/process/sign_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ static void sign_tx_impl(jade_process_t* process, const bool for_liquid)
736736
// Get the amount
737737
uint64_t satoshi;
738738
int res = WALLY_EINVAL;
739-
if (rpc_get_uint64_t("satoshi", &params, &satoshi)) {
739+
if (rpc_get_uint64("satoshi", &params, &satoshi)) {
740740
res = wally_map_add_integer(&signing_data->amounts, index, (uint8_t*)&satoshi, sizeof(uint64_t));
741741
// Keep a running total
742742
input_amount += satoshi;

main/process/sign_utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static void rpc_get_asset_summary(
140140

141141
if (!cbor_value_is_map(&arrayItem)
142142
|| !rpc_get_n_bytes("asset_id", &arrayItem, sizeof(item->asset_id), item->asset_id)
143-
|| !rpc_get_uint64_t("satoshi", &arrayItem, &item->value)) {
143+
|| !rpc_get_uint64("satoshi", &arrayItem, &item->value)) {
144144
return;
145145
}
146146

@@ -353,7 +353,7 @@ bool params_commitment_data(
353353

354354
if (!(ec.c.content & (COMMITMENTS_VBF | COMMITMENTS_VALUE_BLIND_PROOF))
355355
|| !rpc_get_n_bytes("asset_id", item, sizeof(ec.c.asset_id), ec.c.asset_id)
356-
|| !rpc_get_uint64_t("value", item, &ec.c.value)) {
356+
|| !rpc_get_uint64("value", item, &ec.c.value)) {
357357
*errmsg = "Invalid or missing trusted commitment data";
358358
return false;
359359
}

main/utils/cbor_rpc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ bool rpc_get_bool_or(const char* field, const CborValue* value, const bool defau
303303
return res;
304304
}
305305

306-
bool rpc_get_uint64_t(const char* field, const CborValue* value, uint64_t* res)
306+
bool rpc_get_uint64(const char* field, const CborValue* value, uint64_t* res)
307307
{
308308
JADE_ASSERT(value);
309309
JADE_ASSERT(res);
@@ -318,10 +318,10 @@ bool rpc_get_uint64_t(const char* field, const CborValue* value, uint64_t* res)
318318
return true;
319319
}
320320

321-
uint64_t rpc_get_uint64_t_or(const char* field, const CborValue* value, const uint64_t default_value)
321+
uint64_t rpc_get_uint64_or(const char* field, const CborValue* value, const uint64_t default_value)
322322
{
323323
uint64_t res = default_value;
324-
IGNORE_RESULT(rpc_get_uint64_t(field, value, &res));
324+
IGNORE_RESULT(rpc_get_uint64(field, value, &res));
325325
return res;
326326
}
327327

main/utils/cbor_rpc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ void rpc_get_bytes(const char* field, size_t max, const CborValue* value, uint8_
5353
WARN_UNUSED_RESULT bool rpc_get_n_bytes(const char* field, const CborValue* value, size_t expected_size, uint8_t* data);
5454
WARN_UNUSED_RESULT bool rpc_get_sizet(const char* field, const CborValue* value, size_t* res);
5555
WARN_UNUSED_RESULT size_t rpc_get_sizet_or(const char* field, const CborValue* value, size_t default_value);
56-
WARN_UNUSED_RESULT bool rpc_get_uint64_t(const char* field, const CborValue* value, uint64_t* res);
57-
WARN_UNUSED_RESULT uint64_t rpc_get_uint64_t_or(const char* field, const CborValue* value, uint64_t default_value);
56+
WARN_UNUSED_RESULT bool rpc_get_uint64(const char* field, const CborValue* value, uint64_t* res);
57+
WARN_UNUSED_RESULT uint64_t rpc_get_uint64_or(const char* field, const CborValue* value, uint64_t default_value);
5858
WARN_UNUSED_RESULT bool rpc_get_bool(const char* field, const CborValue* value, bool* res);
5959
WARN_UNUSED_RESULT bool rpc_get_bool_or(const char* field, const CborValue* value, bool default_value);
6060

0 commit comments

Comments
 (0)