signTransaction method
Method to sign a transaction. It's called from rust
Implementation
Future<Uint8List> signTransaction(
int accountId,
int wallet,
int? signatureId,
List<int> message,
String context,
) async {
try {
return await _handler.signTransaction(
accountId: accountId,
wallet: wallet,
message: message,
context: LedgerSignatureContext.fromJson(jsonDecode(context)),
signatureId: signatureId,
);
} on LedgerOperationCancelledException {
throw ErrorCode.cancelled;
} catch (error) {
throw ErrorCode.generic;
}
}