You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears to me that reflecting the fact, that non-ascii charsets are not supported, with types is more robust than displaying randomly blank chunks without any indication to user, why this happens.
MultiFieldReview::show() can be unwrapped as well at the call sites, if ledger-device-rust-sdk user doesn't want to bother with handling errors,
or the known error variants can be matched and handled, and e.g. a widget displayed to user, stating that Error: non-ASCII payload is not supported and a corresponding APDU status returned, refusing to continue to process.
The text was updated successfully, but these errors were encountered:
dj8yfo
changed the title
Suggestion: propagate error type in MultiFieldReview::show
Suggestion: declare explicit support of ASCII-only charset at SDK level
Jan 25, 2024
this line https://github.com/LedgerHQ/ledger-device-rust-sdk/blob/master/ledger_device_sdk/src/ui/gadgets.rs#L831 can be changed to
Probably two additional checks can be added after line https://github.com/LedgerHQ/ledger-device-rust-sdk/blob/master/ledger_device_sdk/src/ui/gadgets.rs#L693 to assert that
name
andvalue
fields ofField
are comprised only of ASCII chars (https://doc.rust-lang.org/std/primitive.str.html#method.is_ascii), and returningErr(FieldError::NonASCIIChar)
otherwise.It appears to me that reflecting the fact, that non-ascii charsets are not supported, with types is more robust than displaying randomly blank chunks without any indication to user, why this happens.
MultiFieldReview::show()
can be unwrapped as well at the call sites, ifledger-device-rust-sdk
user doesn't want to bother with handling errors,or the known error variants can be matched and handled, and e.g. a widget displayed to user, stating that
Error: non-ASCII payload is not supported
and a corresponding APDU status returned, refusing to continue to process.The text was updated successfully, but these errors were encountered: