sign method

  1. @override
Future<CombineSignedTransactionResult> sign(
  1. ConstructionPayloadsResponse payload, {
  2. SignType? signType = SignType.ed25519,
  3. SigningCallback? callback,
})
override

Implementation

@override
Future<CombineSignedTransactionResult> sign(
  ConstructionPayloadsResponse payload, {
  SignType? signType = SignType.ed25519,
  SigningCallback? callback,
}) async {
  try {
    if (signType == SignType.ed25519) {
      var res = await transferCombine(
        account.identity!,
        payload,
      );
      return res;
    }
    if (signType == SignType.ecdsa) {
      var res = await ecTransferCombine(
        account.ecIdentity!,
        payload,
      );
      return res;
    } else {
      throw "Signtype $signType is not supported";
    }
  } catch (e) {
    rethrow;
  }
}