I’m writing property tests and getting this error:
error: invalid value 'deffl-liaaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-aaa' for '--specified-id <PRINCIPAL>': Text is too long.
I’m generating random bytes of length 32 and doing Principal.fromUint8Array(bytes);. Then I’m trying to deploy a canister with that princpal’s string representation like this:
This is strange…but I am using Principal from @dfinity/principal and passing in a 32-byte Uint8Array, there is nothing going wrong there it is giving me that final string.
How is @dfinity/principal giving me an incorrect string? Wouldn’t it throw?