1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 09:28:13 +00:00

core/nem: don't use mp_obj_new_str_of_type

This commit is contained in:
Pavol Rusnak 2019-11-09 12:05:58 +00:00
parent d5129b916d
commit 4462fb522c
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -56,8 +56,7 @@ STATIC mp_obj_t mod_trezorcrypto_nem_compute_address(mp_obj_t public_key,
mp_raise_ValueError( mp_raise_ValueError(
"Failed to compute a NEM address from provided public key"); "Failed to compute a NEM address from provided public key");
} }
return mp_obj_new_str_of_type(&mp_type_str, (const uint8_t *)address, return mp_obj_new_str(address, strlen(address));
strlen(address));
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_trezorcrypto_nem_compute_address_obj, STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_trezorcrypto_nem_compute_address_obj,
mod_trezorcrypto_nem_compute_address); mod_trezorcrypto_nem_compute_address);