diff --git a/libstellar/formatter.c b/libstellar/formatter.c index db925e62..7018edc4 100644 --- a/libstellar/formatter.c +++ b/libstellar/formatter.c @@ -254,12 +254,10 @@ static bool format_memo(formatter_data_t *fdata) { case MEMO_TEXT: { STRLCPY(fdata->caption, "Memo Text", fdata->caption_len); if (is_printable_binary(memo->text.text, memo->text.text_size)) { - if (memo->text.text_size >= fdata->value_len) { - return false; - } - - memcpy(fdata->value, (char *) memo->text.text, memo->text.text_size); - fdata->value[memo->text.text_size] = '\0'; + FORMATTER_CHECK(print_string(fdata->value, + fdata->value_len, + memo->text.text, + memo->text.text_size)) } else { char tmp[41]; // (28 / 3) * 4 = 37.33, 4 is for padding FORMATTER_CHECK( @@ -384,21 +382,8 @@ static bool format_account_merge_destination(formatter_data_t *fdata) { } static bool format_account_merge_detail(formatter_data_t *fdata) { - STRLCPY(fdata->caption, "Merge Account", fdata->caption_len); - if (fdata->envelope->tx_details.tx.op_details.source_account_present) { - FORMATTER_CHECK( - print_muxed_account(&fdata->envelope->tx_details.tx.op_details.source_account, - fdata->value, - fdata->value_len, - 0, - 0)) - } else { - FORMATTER_CHECK(print_muxed_account(&fdata->envelope->tx_details.tx.source_account, - fdata->value, - fdata->value_len, - 0, - 0)) - } + STRLCPY(fdata->caption, "Send", fdata->caption_len); + STRLCPY(fdata->value, "All Funds", fdata->value_len); FORMATTER_CHECK(push_to_formatter_stack(&format_account_merge_destination)) return true; } @@ -420,11 +405,11 @@ static bool format_manage_data_value(formatter_data_t *fdata) { fdata->value_len) { return false; } - memcpy(fdata->value, - (char *) fdata->envelope->tx_details.tx.op_details.manage_data_op.data_value, - fdata->envelope->tx_details.tx.op_details.manage_data_op.data_value_size); - fdata->value[fdata->envelope->tx_details.tx.op_details.manage_data_op.data_value_size] = - '\0'; + FORMATTER_CHECK( + print_string(fdata->value, + fdata->value_len, + fdata->envelope->tx_details.tx.op_details.manage_data_op.data_value, + fdata->envelope->tx_details.tx.op_details.manage_data_op.data_value_size)) } else { char tmp[89]; // (64 / 3) * 4 = 85.33, 4 is for padding FORMATTER_CHECK( @@ -439,10 +424,11 @@ static bool format_manage_data_value(formatter_data_t *fdata) { } static bool format_manage_data(formatter_data_t *fdata) { - memcpy(fdata->value, - fdata->envelope->tx_details.tx.op_details.manage_data_op.data_name, - fdata->envelope->tx_details.tx.op_details.manage_data_op.data_name_size); - fdata->value[fdata->envelope->tx_details.tx.op_details.manage_data_op.data_name_size] = '\0'; + FORMATTER_CHECK( + print_string(fdata->value, + fdata->value_len, + fdata->envelope->tx_details.tx.op_details.manage_data_op.data_name, + fdata->envelope->tx_details.tx.op_details.manage_data_op.data_name_size)) if (fdata->envelope->tx_details.tx.op_details.manage_data_op.data_value_size) { STRLCPY(fdata->caption, "Set Data", fdata->caption_len); @@ -465,22 +451,27 @@ static bool format_allow_trust_authorize(formatter_data_t *fdata) { static bool format_allow_trust_asset_code(formatter_data_t *fdata) { STRLCPY(fdata->caption, "Asset Code", fdata->caption_len); - char tmp[ASSET_CODE_MAX_LENGTH] = {0}; switch (fdata->envelope->tx_details.tx.op_details.allow_trust_op.asset_type) { case ASSET_TYPE_CREDIT_ALPHANUM4: { - memcpy(tmp, fdata->envelope->tx_details.tx.op_details.allow_trust_op.asset_code, 4); - tmp[4] = '\0'; + FORMATTER_CHECK( + print_string(fdata->value, + fdata->value_len, + fdata->envelope->tx_details.tx.op_details.allow_trust_op.asset_code, + 4)) + break; } case ASSET_TYPE_CREDIT_ALPHANUM12: { - memcpy(tmp, fdata->envelope->tx_details.tx.op_details.allow_trust_op.asset_code, 12); - tmp[12] = '\0'; + FORMATTER_CHECK( + print_string(fdata->value, + fdata->value_len, + fdata->envelope->tx_details.tx.op_details.allow_trust_op.asset_code, + 12)) break; } default: return false; // unknown asset type } - STRLCPY(fdata->value, tmp, fdata->value_len); FORMATTER_CHECK(push_to_formatter_stack(&format_allow_trust_authorize)) return true; } @@ -514,29 +505,24 @@ static bool format_set_option_signer_weight(formatter_data_t *fdata) { return format_operation_source_prepare(fdata); } -static bool format_set_option_signer_detail(formatter_data_t *fdata) { - STRLCPY(fdata->caption, "Signer Key", fdata->caption_len); - signer_key_t *key = &fdata->envelope->tx_details.tx.op_details.set_options_op.signer.key; - +static bool print_signer_key_detail(signer_key_t *key, char *value, size_t value_len) { switch (key->type) { case SIGNER_KEY_TYPE_ED25519: { - FORMATTER_CHECK(print_account_id(key->ed25519, fdata->value, fdata->value_len, 0, 0)) + FORMATTER_CHECK(print_account_id(key->ed25519, value, value_len, 0, 0)) break; } case SIGNER_KEY_TYPE_HASH_X: { - FORMATTER_CHECK(print_hash_x_key(key->hash_x, fdata->value, fdata->value_len, 0, 0)) + FORMATTER_CHECK(print_hash_x_key(key->hash_x, value, value_len, 0, 0)) break; } - case SIGNER_KEY_TYPE_PRE_AUTH_TX: { - FORMATTER_CHECK( - print_pre_auth_x_key(key->pre_auth_tx, fdata->value, fdata->value_len, 0, 0)) + FORMATTER_CHECK(print_pre_auth_x_key(key->pre_auth_tx, value, value_len, 0, 0)) break; } case SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD: { FORMATTER_CHECK(print_ed25519_signed_payload(&key->ed25519_signed_payload, - fdata->value, - fdata->value_len, + value, + value_len, 12, 12)) break; @@ -544,6 +530,15 @@ static bool format_set_option_signer_detail(formatter_data_t *fdata) { default: return false; } + return true; +} + +static bool format_set_option_signer_detail(formatter_data_t *fdata) { + STRLCPY(fdata->caption, "Signer Key", fdata->caption_len); + signer_key_t *key = &fdata->envelope->tx_details.tx.op_details.set_options_op.signer.key; + + FORMATTER_CHECK(print_signer_key_detail(key, fdata->value, fdata->value_len)) + if (fdata->envelope->tx_details.tx.op_details.set_options_op.signer.weight != 0) { FORMATTER_CHECK(push_to_formatter_stack(&format_set_option_signer_weight)) } else { @@ -595,11 +590,11 @@ static bool format_set_option_signer_prepare(formatter_data_t *fdata) { static bool format_set_option_home_domain(formatter_data_t *fdata) { STRLCPY(fdata->caption, "Home Domain", fdata->caption_len); if (fdata->envelope->tx_details.tx.op_details.set_options_op.home_domain_size) { - memcpy(fdata->value, - fdata->envelope->tx_details.tx.op_details.set_options_op.home_domain, - fdata->envelope->tx_details.tx.op_details.set_options_op.home_domain_size); - fdata->value[fdata->envelope->tx_details.tx.op_details.set_options_op.home_domain_size] = - '\0'; + FORMATTER_CHECK( + print_string(fdata->value, + fdata->value_len, + fdata->envelope->tx_details.tx.op_details.set_options_op.home_domain, + fdata->envelope->tx_details.tx.op_details.set_options_op.home_domain_size)) } else { STRLCPY(fdata->value, "[remove home domain from account]", fdata->value_len); } @@ -871,28 +866,14 @@ static bool format_change_trust(formatter_data_t *fdata) { } static bool format_manage_sell_offer_price(formatter_data_t *fdata) { + manage_sell_offer_op_t *op = &fdata->envelope->tx_details.tx.op_details.manage_sell_offer_op; STRLCPY(fdata->caption, "Price", fdata->caption_len); - uint64_t price = - ((uint64_t) fdata->envelope->tx_details.tx.op_details.manage_sell_offer_op.price.n * - 10000000) / - fdata->envelope->tx_details.tx.op_details.manage_sell_offer_op.price.d; - FORMATTER_CHECK( - print_amount(price, NULL, fdata->envelope->network, fdata->value, fdata->value_len)) - STRLCAT(fdata->value, " ", fdata->value_len); - char tmp_asset_code[13] = {0}; - FORMATTER_CHECK( - print_asset_name(&fdata->envelope->tx_details.tx.op_details.manage_sell_offer_op.buying, - fdata->envelope->network, - tmp_asset_code, - sizeof(tmp_asset_code))) - STRLCAT(fdata->value, tmp_asset_code, fdata->value_len); - STRLCAT(fdata->value, "/", fdata->value_len); - FORMATTER_CHECK( - print_asset_name(&fdata->envelope->tx_details.tx.op_details.manage_sell_offer_op.selling, - fdata->envelope->network, - tmp_asset_code, - sizeof(tmp_asset_code))) - STRLCAT(fdata->value, tmp_asset_code, fdata->value_len); + FORMATTER_CHECK(print_price(&op->price, + &op->buying, + &op->selling, + fdata->envelope->network, + fdata->value, + fdata->value_len)) return format_operation_source_prepare(fdata); } @@ -936,7 +917,6 @@ static bool format_manage_sell_offer(formatter_data_t *fdata) { fdata->value_len)) } else { STRLCPY(fdata->caption, "Create Offer", fdata->caption_len); - STRLCPY(fdata->value, "Type Active", fdata->value_len); } FORMATTER_CHECK(push_to_formatter_stack(&format_manage_sell_offer_buy)) } @@ -945,26 +925,13 @@ static bool format_manage_sell_offer(formatter_data_t *fdata) { static bool format_manage_buy_offer_price(formatter_data_t *fdata) { manage_buy_offer_op_t *op = &fdata->envelope->tx_details.tx.op_details.manage_buy_offer_op; - STRLCPY(fdata->caption, "Price", fdata->caption_len); - uint64_t price = ((uint64_t) op->price.n * 10000000) / op->price.d; - FORMATTER_CHECK( - print_amount(price, NULL, fdata->envelope->network, fdata->value, fdata->value_len)) - STRLCAT(fdata->value, " ", fdata->value_len); - char tmp_asset_code[13] = {0}; - FORMATTER_CHECK( - print_asset_name(&fdata->envelope->tx_details.tx.op_details.manage_buy_offer_op.selling, - fdata->envelope->network, - tmp_asset_code, - sizeof(tmp_asset_code))) - STRLCAT(fdata->value, tmp_asset_code, fdata->value_len); - STRLCAT(fdata->value, "/", fdata->value_len); - FORMATTER_CHECK( - print_asset_name(&fdata->envelope->tx_details.tx.op_details.manage_buy_offer_op.buying, - fdata->envelope->network, - tmp_asset_code, - sizeof(tmp_asset_code))) - STRLCAT(fdata->value, tmp_asset_code, fdata->value_len); + FORMATTER_CHECK(print_price(&op->price, + &op->selling, + &op->buying, + fdata->envelope->network, + fdata->value, + fdata->value_len)) return format_operation_source_prepare(fdata); } @@ -1004,7 +971,6 @@ static bool format_manage_buy_offer(formatter_data_t *fdata) { FORMATTER_CHECK(print_uint64_num(op->offer_id, fdata->value, fdata->value_len)) } else { STRLCPY(fdata->caption, "Create Offer", fdata->caption_len); - STRLCPY(fdata->value, "Type Active", fdata->value_len); } FORMATTER_CHECK(push_to_formatter_stack(&format_manage_buy_offer_sell)) } @@ -1012,28 +978,15 @@ static bool format_manage_buy_offer(formatter_data_t *fdata) { } static bool format_create_passive_sell_offer_price(formatter_data_t *fdata) { - STRLCPY(fdata->caption, "Price", fdata->caption_len); - create_passive_sell_offer_op_t *op = &fdata->envelope->tx_details.tx.op_details.create_passive_sell_offer_op; - uint64_t price = ((uint64_t) op->price.n * 10000000) / op->price.d; - FORMATTER_CHECK( - print_amount(price, NULL, fdata->envelope->network, fdata->value, fdata->value_len)) - STRLCAT(fdata->value, " ", fdata->value_len); - char tmp_asset_code[13] = {0}; - FORMATTER_CHECK(print_asset_name( - &fdata->envelope->tx_details.tx.op_details.create_passive_sell_offer_op.buying, - fdata->envelope->network, - tmp_asset_code, - sizeof(tmp_asset_code))) - STRLCAT(fdata->value, tmp_asset_code, fdata->value_len); - STRLCAT(fdata->value, "/", fdata->value_len); - FORMATTER_CHECK(print_asset_name( - &fdata->envelope->tx_details.tx.op_details.create_passive_sell_offer_op.selling, - fdata->envelope->network, - tmp_asset_code, - sizeof(tmp_asset_code))) - STRLCAT(fdata->value, tmp_asset_code, fdata->value_len); + STRLCPY(fdata->caption, "Price", fdata->caption_len); + FORMATTER_CHECK(print_price(&op->price, + &op->buying, + &op->selling, + fdata->envelope->network, + fdata->value, + fdata->value_len)) return format_operation_source_prepare(fdata); } @@ -1312,6 +1265,7 @@ static bool format_revoke_sponsorship_trust_line_account(formatter_data_t *fdata FORMATTER_CHECK(push_to_formatter_stack(&format_revoke_sponsorship_trust_line_asset)) return true; } + static bool format_revoke_sponsorship_offer_offer_id(formatter_data_t *fdata) { STRLCPY(fdata->caption, "Offer ID", fdata->caption_len); FORMATTER_CHECK(print_uint64_num( @@ -1336,13 +1290,12 @@ static bool format_revoke_sponsorship_offer_seller_id(formatter_data_t *fdata) { static bool format_revoke_sponsorship_data_data_name(formatter_data_t *fdata) { STRLCPY(fdata->caption, "Data Name", fdata->caption_len); - memcpy( + FORMATTER_CHECK(print_string( fdata->value, + fdata->value_len, fdata->envelope->tx_details.tx.op_details.revoke_sponsorship_op.ledger_key.data.data_name, fdata->envelope->tx_details.tx.op_details.revoke_sponsorship_op.ledger_key.data - .data_name_size); - fdata->value[fdata->envelope->tx_details.tx.op_details.revoke_sponsorship_op.ledger_key.data - .data_name_size] = '\0'; + .data_name_size)) return format_operation_source_prepare(fdata); } @@ -1387,31 +1340,7 @@ static bool format_revoke_sponsorship_claimable_signer_signer_key_detail(formatt signer_key_t *key = &fdata->envelope->tx_details.tx.op_details.revoke_sponsorship_op.signer.signer_key; - switch (key->type) { - case SIGNER_KEY_TYPE_ED25519: { - FORMATTER_CHECK(print_account_id(key->ed25519, fdata->value, fdata->value_len, 0, 0)) - break; - } - case SIGNER_KEY_TYPE_HASH_X: { - FORMATTER_CHECK(print_hash_x_key(key->hash_x, fdata->value, fdata->value_len, 0, 0)) - break; - } - case SIGNER_KEY_TYPE_PRE_AUTH_TX: { - FORMATTER_CHECK( - print_pre_auth_x_key(key->pre_auth_tx, fdata->value, fdata->value_len, 0, 0)) - break; - } - case SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD: { - FORMATTER_CHECK(print_ed25519_signed_payload(&key->ed25519_signed_payload, - fdata->value, - fdata->value_len, - 12, - 12)) - break; - } - default: - return false; - } + FORMATTER_CHECK(print_signer_key_detail(key, fdata->value, fdata->value_len)) return format_operation_source_prepare(fdata); } @@ -1606,26 +1535,28 @@ static bool format_set_trust_line_flags(formatter_data_t *fdata) { } static bool format_liquidity_pool_deposit_max_price(formatter_data_t *fdata) { + liquidity_pool_deposit_op_t *op = + &fdata->envelope->tx_details.tx.op_details.liquidity_pool_deposit_op; STRLCPY(fdata->caption, "Max Price", fdata->caption_len); - uint64_t price = - ((uint64_t) - fdata->envelope->tx_details.tx.op_details.liquidity_pool_deposit_op.max_price.n * - 10000000) / - fdata->envelope->tx_details.tx.op_details.liquidity_pool_deposit_op.max_price.d; - FORMATTER_CHECK( - print_amount(price, NULL, fdata->envelope->network, fdata->value, fdata->value_len)) + FORMATTER_CHECK(print_price(&op->max_price, + NULL, + NULL, + fdata->envelope->network, + fdata->value, + fdata->value_len)) return format_operation_source_prepare(fdata); } static bool format_liquidity_pool_deposit_min_price(formatter_data_t *fdata) { + liquidity_pool_deposit_op_t *op = + &fdata->envelope->tx_details.tx.op_details.liquidity_pool_deposit_op; STRLCPY(fdata->caption, "Min Price", fdata->caption_len); - uint64_t price = - ((uint64_t) - fdata->envelope->tx_details.tx.op_details.liquidity_pool_deposit_op.min_price.n * - 10000000) / - fdata->envelope->tx_details.tx.op_details.liquidity_pool_deposit_op.min_price.d; - FORMATTER_CHECK( - print_amount(price, NULL, fdata->envelope->network, fdata->value, fdata->value_len)) + FORMATTER_CHECK(print_price(&op->min_price, + NULL, + NULL, + fdata->envelope->network, + fdata->value, + fdata->value_len)) FORMATTER_CHECK(push_to_formatter_stack(&format_liquidity_pool_deposit_max_price)) return true; } @@ -1947,11 +1878,10 @@ static bool format_sub_invocation_invoke_host_function_func_name(formatter_data_ fdata->envelope->tx_details.tx.op_details.invoke_host_function_op.invoke_contract_args; } STRLCPY(fdata->caption, "Function", fdata->caption_len); - - memcpy(fdata->value, - invoke_contract_args.function.name, - invoke_contract_args.function.name_size); - fdata->value[invoke_contract_args.function.name_size] = '\0'; + FORMATTER_CHECK(print_string(fdata->value, + fdata->value_len, + invoke_contract_args.function.name, + invoke_contract_args.function.name_size)) uint8_t data_count = should_move_control_to_plugin(fdata); if (data_count == 0) { @@ -2210,11 +2140,11 @@ static bool format_invoke_host_function_func_name(formatter_data_t *fdata) { fdata->envelope->tx_details.tx.op_details.invoke_host_function_op.invoke_contract_args; } STRLCPY(fdata->caption, "Function", fdata->caption_len); + FORMATTER_CHECK(print_string(fdata->value, + fdata->value_len, + invoke_contract_args.function.name, + invoke_contract_args.function.name_size)) - memcpy(fdata->value, - invoke_contract_args.function.name, - invoke_contract_args.function.name_size); - fdata->value[invoke_contract_args.function.name_size] = '\0'; uint8_t data_count = should_move_control_to_plugin(fdata); if (data_count == 0) { // we should not move control to plugin @@ -2300,13 +2230,13 @@ static bool format_auth_function(formatter_data_t *fdata) { } static bool format_extend_footprint_ttl(formatter_data_t *fdata) { - STRLCPY(fdata->caption, "Soroban", fdata->caption_len); + STRLCPY(fdata->caption, "Operation Type", fdata->caption_len); STRLCPY(fdata->value, "Extend Footprint TTL", fdata->value_len); return format_operation_source_prepare(fdata); } static bool format_restore_footprint(formatter_data_t *fdata) { - STRLCPY(fdata->caption, "Soroban", fdata->caption_len); + STRLCPY(fdata->caption, "Operation Type", fdata->caption_len); STRLCPY(fdata->value, "Restore Footprint", fdata->value_len); return format_operation_source_prepare(fdata); } diff --git a/libstellar/include/stellar/printer.h b/libstellar/include/stellar/printer.h index ef83cf6a..9d35c37b 100644 --- a/libstellar/include/stellar/printer.h +++ b/libstellar/include/stellar/printer.h @@ -443,3 +443,34 @@ bool add_separator_to_number(char *out, size_t out_len); * @return True if the decimal point was added successfully, false otherwise. */ bool add_decimal_point(char *out, size_t out_len, uint8_t decimals); + +/** + * Print a string. + * + * @param out The output buffer. + * @param out_len The length of the output buffer. + * @param src The source buffer. + * @param src_size The size of the source buffer, don't include the null terminator. + * + * @return True if the string was printed successfully, false otherwise. + */ +bool print_string(char *out, size_t out_len, const uint8_t *src, size_t src_size); + +/** + * Print a price. + * + * @param price The price to print. + * @param asset_a The first asset. + * @param asset_b The second asset. + * @param network_id The network ID to consider when printing the price. + * @param out The output buffer. + * @param out_len The length of the output buffer. + * + * @return True if the price was printed successfully, false otherwise. + */ +bool print_price(const price_t *price, + const asset_t *asset_a, + const asset_t *asset_b, + uint8_t network_id, + char *out, + size_t out_len); \ No newline at end of file diff --git a/libstellar/printer.c b/libstellar/printer.c index ed903cee..bff8b8d8 100644 --- a/libstellar/printer.c +++ b/libstellar/printer.c @@ -27,6 +27,7 @@ uint16_t crc16(const uint8_t *input_str, uint32_t num_bytes) { } return crc; } + bool encode_key(const uint8_t *in, uint8_t version_byte, char *out, uint8_t out_len) { if (in == NULL || out_len < 56 + 1) { return false; @@ -241,14 +242,11 @@ bool print_ed25519_signed_payload(const ed25519_signed_payload_t *signed_payload }; if (num_chars_l > 0) { - if (out_len < num_chars_l + num_chars_r + 2) { + if (out_len < num_chars_l + num_chars_r + 2 + 1) { return false; } return print_summary(tmp, out, out_len, num_chars_l, num_chars_r); } else { - if (out_len < ED25519_SIGNED_PAYLOAD_MAX_LENGTH) { - return false; - } if (strlcpy(out, tmp, out_len) >= out_len) { return false; } @@ -289,17 +287,15 @@ bool print_claimable_balance_id(const claimable_balance_id_t *claimable_balance_ size_t out_len, uint8_t num_chars_l, uint8_t num_chars_r) { - if (out_len < 36 * 2 + 1) { + if (out_len < (4 + CLAIMABLE_BALANCE_ID_SIZE) * 2 + 1) { return false; } - uint8_t data[36]; - // enum is 1 byte - data[0] = '\0'; - data[1] = '\0'; - data[2] = '\0'; - data[3] = claimable_balance_id_t->type; + uint8_t data[(4 + CLAIMABLE_BALANCE_ID_SIZE)]; + for (uint8_t i = 0; i < 4; i++) { + data[i] = claimable_balance_id_t->type >> (8 * (3 - i)); + } memcpy(data + 4, claimable_balance_id_t->v0, CLAIMABLE_BALANCE_ID_SIZE); - return print_binary(data, 36, out, out_len, num_chars_l, num_chars_r); + return print_binary(data, sizeof(data), out, out_len, num_chars_l, num_chars_r); } bool print_uint64_num(uint64_t num, char *out, size_t out_len) { @@ -405,8 +401,12 @@ bool print_asset(const asset_t *asset, uint8_t network_id, char *out, size_t out return false; } if (asset->type != ASSET_TYPE_NATIVE) { - strlcat(out, "@", out_len); - strlcat(out, asset_issuer, out_len); + if (strlcat(out, "@", out_len) >= out_len) { + return false; + } + if (strlcat(out, asset_issuer, out_len) >= out_len) { + return false; + } } return true; } @@ -512,8 +512,12 @@ bool print_amount(uint64_t amount, if (!print_asset(asset, network_id, asset_info, 23)) { return false; }; - strlcat(out, " ", out_len); - strlcat(out, asset_info, out_len); + if (strlcat(out, " ", out_len) >= out_len) { + return false; + } + if (strlcat(out, asset_info, out_len) >= out_len) { + return false; + } } return true; } @@ -765,7 +769,6 @@ bool add_separator_to_number(char *out, size_t out_len) { // If there is a decimal point, append the part after the decimal point if (decimal_point) { - // strlcpy(temp + new_length, decimal_point, NUMBER_WITH_COMMAS_MAX_LENGTH - new_length); if (strlcpy(temp + new_length, decimal_point, NUMBER_WITH_COMMAS_MAX_LENGTH - new_length) >= NUMBER_WITH_COMMAS_MAX_LENGTH - new_length) { return false; @@ -874,8 +877,9 @@ bool print_scv_symbol(const scv_symbol_t *scv_symbol, char *out, size_t out_len) if (!is_printable_binary(scv_symbol->symbol, scv_symbol->size)) { return false; } - memcpy(out, scv_symbol->symbol, scv_symbol->size); - out[scv_symbol->size] = '\0'; + if (!print_string(out, out_len, scv_symbol->symbol, scv_symbol->size)) { + return false; + } return true; } @@ -936,3 +940,40 @@ bool print_scv_string(const scv_string_t *scv_string, char *out, size_t out_len) return true; } + +bool print_string(char *out, size_t out_len, const uint8_t *src, size_t src_size) { + if (out == NULL || src == NULL || out_len == 0) { + return false; + } + if (src_size + 1 > out_len) { + return false; + } + memcpy(out, src, src_size); + out[src_size] = '\0'; + return true; +} + +bool print_price(const price_t *price, + const asset_t *asset_a, + const asset_t *asset_b, + uint8_t network_id, + char *out, + size_t out_len) { + uint64_t scaled_price = ((uint64_t) price->n * 10000000) / price->d; + if (!print_amount(scaled_price, NULL, network_id, out, out_len)) { + return false; + } + + if (asset_a != NULL && asset_b != NULL) { + char tmp_asset_code[ASSET_CODE_MAX_LENGTH] = {0}; + if (strlcat(out, " ", out_len) >= out_len || + !print_asset_name(asset_a, network_id, tmp_asset_code, sizeof(tmp_asset_code)) || + strlcat(out, tmp_asset_code, out_len) >= out_len || + strlcat(out, "/", out_len) >= out_len || + !print_asset_name(asset_b, network_id, tmp_asset_code, sizeof(tmp_asset_code)) || + strlcat(out, tmp_asset_code, out_len) >= out_len) { + return false; + } + } + return true; +} \ No newline at end of file diff --git a/tests_unit/testcases/opAccountMerge.txt b/tests_unit/testcases/opAccountMerge.txt index 10f4402a..b574eacb 100644 --- a/tests_unit/testcases/opAccountMerge.txt +++ b/tests_unit/testcases/opAccountMerge.txt @@ -4,6 +4,6 @@ Sequence Num; 103720918407102568 Valid Before (UTC); 2022-12-12 04:12:12 Tx Source; GDUTHC..XM2FN7 Operation Type; Account Merge -Merge Account; GDUTHCF37UX32EMANXIL2WOOVEDZ47GHBTT3DYKU6EKM37SOIZXM2FN7 +Send; All Funds Destination; GDRMNAIPTNIJWJSL6JOF76CJORN47TDVMWERTXO2G2WKOMXGNHUFL5QX Op Source; GDUTHC..XM2FN7 diff --git a/tests_unit/testcases/opAccountMergeWithMuxedDestination.txt b/tests_unit/testcases/opAccountMergeWithMuxedDestination.txt index af9256a6..bb310913 100644 --- a/tests_unit/testcases/opAccountMergeWithMuxedDestination.txt +++ b/tests_unit/testcases/opAccountMergeWithMuxedDestination.txt @@ -4,6 +4,6 @@ Sequence Num; 103720918407102568 Valid Before (UTC); 2022-12-12 04:12:12 Tx Source; GDUTHC..XM2FN7 Operation Type; Account Merge -Merge Account; GDUTHCF37UX32EMANXIL2WOOVEDZ47GHBTT3DYKU6EKM37SOIZXM2FN7 +Send; All Funds Destination; MDRMNAIPTNIJWJSL6JOF76CJORN47TDVMWERTXO2G2WKOMXGNHUFKAAAAAAAAABHCCLDW Op Source; GDUTHC..XM2FN7 diff --git a/tests_unit/testcases/opExtendFootprintTtl.txt b/tests_unit/testcases/opExtendFootprintTtl.txt index c5230703..ec7de134 100644 --- a/tests_unit/testcases/opExtendFootprintTtl.txt +++ b/tests_unit/testcases/opExtendFootprintTtl.txt @@ -2,4 +2,4 @@ Network; Testnet Max Fee; 0.0040914 XLM Sequence Num; 12842214208045061 Tx Source; GDUTHC..XM2FN7 -Soroban; Extend Footprint TTL +Operation Type; Extend Footprint TTL diff --git a/tests_unit/testcases/opManageBuyOfferCreate.txt b/tests_unit/testcases/opManageBuyOfferCreate.txt index ce1a0488..8a5708f6 100644 --- a/tests_unit/testcases/opManageBuyOfferCreate.txt +++ b/tests_unit/testcases/opManageBuyOfferCreate.txt @@ -3,7 +3,7 @@ Max Fee; 0.00001 XLM Sequence Num; 103720918407102568 Valid Before (UTC); 2022-12-12 04:12:12 Tx Source; GDUTHC..XM2FN7 -Create Offer; Type Active +Create Offer; Sell; BTC@GAT..MTCH Buy; 988,448,111.2222 XLM Price; 0.0001011 BTC/XLM diff --git a/tests_unit/testcases/opManageSellOfferCreate.txt b/tests_unit/testcases/opManageSellOfferCreate.txt index 1d8759fe..128f20a0 100644 --- a/tests_unit/testcases/opManageSellOfferCreate.txt +++ b/tests_unit/testcases/opManageSellOfferCreate.txt @@ -3,7 +3,7 @@ Max Fee; 0.00001 XLM Sequence Num; 103720918407102568 Valid Before (UTC); 2022-12-12 04:12:12 Tx Source; GDUTHC..XM2FN7 -Create Offer; Type Active +Create Offer; Buy; XLM Sell; 988,448,423.2134 BTC@GAT..MTCH Price; 0.0001234 XLM/BTC diff --git a/tests_unit/testcases/opRestoreFootprint.txt b/tests_unit/testcases/opRestoreFootprint.txt index 867e7f7a..ff06435b 100644 --- a/tests_unit/testcases/opRestoreFootprint.txt +++ b/tests_unit/testcases/opRestoreFootprint.txt @@ -3,5 +3,5 @@ Max Fee; 0.00001 XLM Sequence Num; 103720918407102568 Valid Before (UTC); 2022-12-12 04:12:12 Tx Source; GDUTHC..XM2FN7 -Soroban; Restore Footprint +Operation Type; Restore Footprint Op Source; GDUTHC..XM2FN7 diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00007.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00007.png index 04d1b52a..cd6b3049 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00007.png and b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00007.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00008.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00008.png index d9b399df..bf84b39e 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00008.png and b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00008.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00009.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00009.png index 0364577a..e8bf07c8 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00009.png and b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00009.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00010.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00010.png index 9840b285..5c6ed2c4 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00010.png and b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00010.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00011.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00011.png index bf84b39e..beb98eb9 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00011.png and b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00011.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00012.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00012.png index e8bf07c8..41489948 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00012.png and b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00012.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00013.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00013.png index 5c6ed2c4..0dc3dfc0 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00013.png and b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00013.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00014.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00014.png index beb98eb9..fbb9ce10 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00014.png and b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00014.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00015.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00015.png index 41489948..fcbedd82 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00015.png and b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00015.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00016.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00016.png deleted file mode 100644 index 0dc3dfc0..00000000 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00016.png and /dev/null differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00017.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00017.png deleted file mode 100644 index fbb9ce10..00000000 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00017.png and /dev/null differ diff --git a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00018.png b/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00018.png deleted file mode 100644 index fcbedd82..00000000 Binary files a/tests_zemu/snapshots/s-op-account-merge-with-muxed-destination/00018.png and /dev/null differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00007.png b/tests_zemu/snapshots/s-op-account-merge/00007.png index 04d1b52a..cd6b3049 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge/00007.png and b/tests_zemu/snapshots/s-op-account-merge/00007.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00008.png b/tests_zemu/snapshots/s-op-account-merge/00008.png index d9b399df..40185d19 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge/00008.png and b/tests_zemu/snapshots/s-op-account-merge/00008.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00009.png b/tests_zemu/snapshots/s-op-account-merge/00009.png index 0364577a..3b1db03f 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge/00009.png and b/tests_zemu/snapshots/s-op-account-merge/00009.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00010.png b/tests_zemu/snapshots/s-op-account-merge/00010.png index 9840b285..76faef47 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge/00010.png and b/tests_zemu/snapshots/s-op-account-merge/00010.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00011.png b/tests_zemu/snapshots/s-op-account-merge/00011.png index 40185d19..175657e8 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge/00011.png and b/tests_zemu/snapshots/s-op-account-merge/00011.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00012.png b/tests_zemu/snapshots/s-op-account-merge/00012.png index 3b1db03f..0dc3dfc0 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge/00012.png and b/tests_zemu/snapshots/s-op-account-merge/00012.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00013.png b/tests_zemu/snapshots/s-op-account-merge/00013.png index 76faef47..fbb9ce10 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge/00013.png and b/tests_zemu/snapshots/s-op-account-merge/00013.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00014.png b/tests_zemu/snapshots/s-op-account-merge/00014.png index 175657e8..fcbedd82 100644 Binary files a/tests_zemu/snapshots/s-op-account-merge/00014.png and b/tests_zemu/snapshots/s-op-account-merge/00014.png differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00015.png b/tests_zemu/snapshots/s-op-account-merge/00015.png deleted file mode 100644 index 0dc3dfc0..00000000 Binary files a/tests_zemu/snapshots/s-op-account-merge/00015.png and /dev/null differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00016.png b/tests_zemu/snapshots/s-op-account-merge/00016.png deleted file mode 100644 index fbb9ce10..00000000 Binary files a/tests_zemu/snapshots/s-op-account-merge/00016.png and /dev/null differ diff --git a/tests_zemu/snapshots/s-op-account-merge/00017.png b/tests_zemu/snapshots/s-op-account-merge/00017.png deleted file mode 100644 index fcbedd82..00000000 Binary files a/tests_zemu/snapshots/s-op-account-merge/00017.png and /dev/null differ diff --git a/tests_zemu/snapshots/s-op-extend-footprint-ttl/00005.png b/tests_zemu/snapshots/s-op-extend-footprint-ttl/00005.png index 97e49b17..4415b946 100644 Binary files a/tests_zemu/snapshots/s-op-extend-footprint-ttl/00005.png and b/tests_zemu/snapshots/s-op-extend-footprint-ttl/00005.png differ diff --git a/tests_zemu/snapshots/s-op-manage-buy-offer-create/00006.png b/tests_zemu/snapshots/s-op-manage-buy-offer-create/00006.png index 1527226a..ae905bf9 100644 Binary files a/tests_zemu/snapshots/s-op-manage-buy-offer-create/00006.png and b/tests_zemu/snapshots/s-op-manage-buy-offer-create/00006.png differ diff --git a/tests_zemu/snapshots/s-op-manage-sell-offer-create/00006.png b/tests_zemu/snapshots/s-op-manage-sell-offer-create/00006.png index 1527226a..ae905bf9 100644 Binary files a/tests_zemu/snapshots/s-op-manage-sell-offer-create/00006.png and b/tests_zemu/snapshots/s-op-manage-sell-offer-create/00006.png differ diff --git a/tests_zemu/snapshots/s-op-restore-footprint/00006.png b/tests_zemu/snapshots/s-op-restore-footprint/00006.png index 2c27b1ca..011634f0 100644 Binary files a/tests_zemu/snapshots/s-op-restore-footprint/00006.png and b/tests_zemu/snapshots/s-op-restore-footprint/00006.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00007.png b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00007.png index 39d85d54..dbcfa155 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00007.png and b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00007.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00008.png b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00008.png index d36cda7a..a9670471 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00008.png and b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00008.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00009.png b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00009.png index a9670471..c66f0b2f 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00009.png and b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00009.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00010.png b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00010.png index c66f0b2f..2debbe6c 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00010.png and b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00010.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00011.png b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00011.png index 2debbe6c..62b55891 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00011.png and b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00011.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00012.png b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00012.png index 62b55891..fb27b648 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00012.png and b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00012.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00013.png b/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00013.png deleted file mode 100644 index fb27b648..00000000 Binary files a/tests_zemu/snapshots/sp-op-account-merge-with-muxed-destination/00013.png and /dev/null differ diff --git a/tests_zemu/snapshots/sp-op-account-merge/00007.png b/tests_zemu/snapshots/sp-op-account-merge/00007.png index 39d85d54..dbcfa155 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge/00007.png and b/tests_zemu/snapshots/sp-op-account-merge/00007.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge/00008.png b/tests_zemu/snapshots/sp-op-account-merge/00008.png index d36cda7a..21ca90fc 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge/00008.png and b/tests_zemu/snapshots/sp-op-account-merge/00008.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge/00009.png b/tests_zemu/snapshots/sp-op-account-merge/00009.png index 21ca90fc..cffd5a33 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge/00009.png and b/tests_zemu/snapshots/sp-op-account-merge/00009.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge/00010.png b/tests_zemu/snapshots/sp-op-account-merge/00010.png index cffd5a33..2debbe6c 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge/00010.png and b/tests_zemu/snapshots/sp-op-account-merge/00010.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge/00011.png b/tests_zemu/snapshots/sp-op-account-merge/00011.png index 2debbe6c..62b55891 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge/00011.png and b/tests_zemu/snapshots/sp-op-account-merge/00011.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge/00012.png b/tests_zemu/snapshots/sp-op-account-merge/00012.png index 62b55891..fb27b648 100644 Binary files a/tests_zemu/snapshots/sp-op-account-merge/00012.png and b/tests_zemu/snapshots/sp-op-account-merge/00012.png differ diff --git a/tests_zemu/snapshots/sp-op-account-merge/00013.png b/tests_zemu/snapshots/sp-op-account-merge/00013.png deleted file mode 100644 index fb27b648..00000000 Binary files a/tests_zemu/snapshots/sp-op-account-merge/00013.png and /dev/null differ diff --git a/tests_zemu/snapshots/sp-op-extend-footprint-ttl/00005.png b/tests_zemu/snapshots/sp-op-extend-footprint-ttl/00005.png index 4c973d72..065e2312 100644 Binary files a/tests_zemu/snapshots/sp-op-extend-footprint-ttl/00005.png and b/tests_zemu/snapshots/sp-op-extend-footprint-ttl/00005.png differ diff --git a/tests_zemu/snapshots/sp-op-manage-buy-offer-create/00006.png b/tests_zemu/snapshots/sp-op-manage-buy-offer-create/00006.png index 3a59efb0..d1da9756 100644 Binary files a/tests_zemu/snapshots/sp-op-manage-buy-offer-create/00006.png and b/tests_zemu/snapshots/sp-op-manage-buy-offer-create/00006.png differ diff --git a/tests_zemu/snapshots/sp-op-manage-sell-offer-create/00006.png b/tests_zemu/snapshots/sp-op-manage-sell-offer-create/00006.png index 3a59efb0..d1da9756 100644 Binary files a/tests_zemu/snapshots/sp-op-manage-sell-offer-create/00006.png and b/tests_zemu/snapshots/sp-op-manage-sell-offer-create/00006.png differ diff --git a/tests_zemu/snapshots/sp-op-restore-footprint/00006.png b/tests_zemu/snapshots/sp-op-restore-footprint/00006.png index 4ddb7cc3..8224111d 100644 Binary files a/tests_zemu/snapshots/sp-op-restore-footprint/00006.png and b/tests_zemu/snapshots/sp-op-restore-footprint/00006.png differ diff --git a/tests_zemu/snapshots/stax-op-account-merge-with-muxed-destination/00002.png b/tests_zemu/snapshots/stax-op-account-merge-with-muxed-destination/00002.png index 6c0e247c..1d1e84de 100644 Binary files a/tests_zemu/snapshots/stax-op-account-merge-with-muxed-destination/00002.png and b/tests_zemu/snapshots/stax-op-account-merge-with-muxed-destination/00002.png differ diff --git a/tests_zemu/snapshots/stax-op-account-merge-with-muxed-destination/00003.png b/tests_zemu/snapshots/stax-op-account-merge-with-muxed-destination/00003.png index 66e04549..6c562095 100644 Binary files a/tests_zemu/snapshots/stax-op-account-merge-with-muxed-destination/00003.png and b/tests_zemu/snapshots/stax-op-account-merge-with-muxed-destination/00003.png differ diff --git a/tests_zemu/snapshots/stax-op-account-merge/00002.png b/tests_zemu/snapshots/stax-op-account-merge/00002.png index 6c0e247c..ba866e2b 100644 Binary files a/tests_zemu/snapshots/stax-op-account-merge/00002.png and b/tests_zemu/snapshots/stax-op-account-merge/00002.png differ diff --git a/tests_zemu/snapshots/stax-op-account-merge/00003.png b/tests_zemu/snapshots/stax-op-account-merge/00003.png index fac23323..6c562095 100644 Binary files a/tests_zemu/snapshots/stax-op-account-merge/00003.png and b/tests_zemu/snapshots/stax-op-account-merge/00003.png differ diff --git a/tests_zemu/snapshots/stax-op-extend-footprint-ttl/00001.png b/tests_zemu/snapshots/stax-op-extend-footprint-ttl/00001.png index 62d257d0..9a8202b2 100644 Binary files a/tests_zemu/snapshots/stax-op-extend-footprint-ttl/00001.png and b/tests_zemu/snapshots/stax-op-extend-footprint-ttl/00001.png differ diff --git a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00001.png b/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00001.png index 3c818e4b..c8d1a41b 100644 Binary files a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00001.png and b/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00001.png differ diff --git a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00002.png b/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00002.png index ee0d9eb9..3615a631 100644 Binary files a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00002.png and b/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00002.png differ diff --git a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00003.png b/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00003.png index 6c562095..ebc0b7e3 100644 Binary files a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00003.png and b/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00003.png differ diff --git a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00004.png b/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00004.png index 75a118a0..076c6ae0 100644 Binary files a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00004.png and b/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00004.png differ diff --git a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00005.png b/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00005.png deleted file mode 100644 index 076c6ae0..00000000 Binary files a/tests_zemu/snapshots/stax-op-manage-buy-offer-create/00005.png and /dev/null differ diff --git a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00001.png b/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00001.png index 3c818e4b..c8d1a41b 100644 Binary files a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00001.png and b/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00001.png differ diff --git a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00002.png b/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00002.png index c5b2526c..3cea1e4a 100644 Binary files a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00002.png and b/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00002.png differ diff --git a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00003.png b/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00003.png index 6c562095..ebc0b7e3 100644 Binary files a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00003.png and b/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00003.png differ diff --git a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00004.png b/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00004.png index 75a118a0..076c6ae0 100644 Binary files a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00004.png and b/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00004.png differ diff --git a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00005.png b/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00005.png deleted file mode 100644 index 076c6ae0..00000000 Binary files a/tests_zemu/snapshots/stax-op-manage-sell-offer-create/00005.png and /dev/null differ diff --git a/tests_zemu/snapshots/stax-op-restore-footprint/00002.png b/tests_zemu/snapshots/stax-op-restore-footprint/00002.png index 0942da34..1f9f023f 100644 Binary files a/tests_zemu/snapshots/stax-op-restore-footprint/00002.png and b/tests_zemu/snapshots/stax-op-restore-footprint/00002.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00007.png b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00007.png index 39d85d54..dbcfa155 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00007.png and b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00007.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00008.png b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00008.png index d36cda7a..a9670471 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00008.png and b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00008.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00009.png b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00009.png index a9670471..c66f0b2f 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00009.png and b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00009.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00010.png b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00010.png index c66f0b2f..2debbe6c 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00010.png and b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00010.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00011.png b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00011.png index 2debbe6c..62b55891 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00011.png and b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00011.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00012.png b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00012.png index 62b55891..fb27b648 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00012.png and b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00012.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00013.png b/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00013.png deleted file mode 100644 index fb27b648..00000000 Binary files a/tests_zemu/snapshots/x-op-account-merge-with-muxed-destination/00013.png and /dev/null differ diff --git a/tests_zemu/snapshots/x-op-account-merge/00007.png b/tests_zemu/snapshots/x-op-account-merge/00007.png index 39d85d54..dbcfa155 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge/00007.png and b/tests_zemu/snapshots/x-op-account-merge/00007.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge/00008.png b/tests_zemu/snapshots/x-op-account-merge/00008.png index d36cda7a..21ca90fc 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge/00008.png and b/tests_zemu/snapshots/x-op-account-merge/00008.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge/00009.png b/tests_zemu/snapshots/x-op-account-merge/00009.png index 21ca90fc..cffd5a33 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge/00009.png and b/tests_zemu/snapshots/x-op-account-merge/00009.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge/00010.png b/tests_zemu/snapshots/x-op-account-merge/00010.png index cffd5a33..2debbe6c 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge/00010.png and b/tests_zemu/snapshots/x-op-account-merge/00010.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge/00011.png b/tests_zemu/snapshots/x-op-account-merge/00011.png index 2debbe6c..62b55891 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge/00011.png and b/tests_zemu/snapshots/x-op-account-merge/00011.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge/00012.png b/tests_zemu/snapshots/x-op-account-merge/00012.png index 62b55891..fb27b648 100644 Binary files a/tests_zemu/snapshots/x-op-account-merge/00012.png and b/tests_zemu/snapshots/x-op-account-merge/00012.png differ diff --git a/tests_zemu/snapshots/x-op-account-merge/00013.png b/tests_zemu/snapshots/x-op-account-merge/00013.png deleted file mode 100644 index fb27b648..00000000 Binary files a/tests_zemu/snapshots/x-op-account-merge/00013.png and /dev/null differ diff --git a/tests_zemu/snapshots/x-op-extend-footprint-ttl/00005.png b/tests_zemu/snapshots/x-op-extend-footprint-ttl/00005.png index 4c973d72..065e2312 100644 Binary files a/tests_zemu/snapshots/x-op-extend-footprint-ttl/00005.png and b/tests_zemu/snapshots/x-op-extend-footprint-ttl/00005.png differ diff --git a/tests_zemu/snapshots/x-op-manage-buy-offer-create/00006.png b/tests_zemu/snapshots/x-op-manage-buy-offer-create/00006.png index 3a59efb0..d1da9756 100644 Binary files a/tests_zemu/snapshots/x-op-manage-buy-offer-create/00006.png and b/tests_zemu/snapshots/x-op-manage-buy-offer-create/00006.png differ diff --git a/tests_zemu/snapshots/x-op-manage-sell-offer-create/00006.png b/tests_zemu/snapshots/x-op-manage-sell-offer-create/00006.png index 3a59efb0..d1da9756 100644 Binary files a/tests_zemu/snapshots/x-op-manage-sell-offer-create/00006.png and b/tests_zemu/snapshots/x-op-manage-sell-offer-create/00006.png differ diff --git a/tests_zemu/snapshots/x-op-restore-footprint/00006.png b/tests_zemu/snapshots/x-op-restore-footprint/00006.png index 4ddb7cc3..8224111d 100644 Binary files a/tests_zemu/snapshots/x-op-restore-footprint/00006.png and b/tests_zemu/snapshots/x-op-restore-footprint/00006.png differ