RootSoft / algorand-dart

Unofficial community SDK to interact with the Algorand network, for Dart & Flutter
MIT License
36 stars 16 forks source link

Error when rekeying address (At least one signature didn't pass verification) #31

Closed froze9063 closed 2 years ago

froze9063 commented 2 years ago

Hi all!

I'm trying to send Rekey transaction by Dart algorand SDK and getting the error when I send raw transaction: {“message”:“At least one signature didn’t pass verification”}

My code: `try{ final params = await algorand.getSuggestedTransactionParams(); Address address = Address.fromAlgorandAddress(address: );

  RawTransaction transaction = await (PaymentTransactionBuilder()
    ..sender = address
    ..receiver = address
    ..amount = Algo.toMicroAlgos(0)
    ..rekeyTo = <REKEY_TO_ADDRESS>
    ..suggestedParams = params).build();

  final signedTx = await transaction.sign(<SENDER_OBJECT>!);

  await algorand.sendTransaction(signedTx);

  print("success");
} on AlgorandException catch (ex) {
  if(ex.cause is DioError){
    print((ex.cause as DioError).response);
  }
  else{
    print((ex).message);
  }
}`

The issue WhatsApp Image 2022-03-07 at 12 21 59

RootSoft commented 2 years ago

Should be fixed in v1.0.2.

froze9063 commented 2 years ago

Hi I have tested new sdk and it works, thank you