fyziktom / VirtualEconomyFramework

Framework for economy applications
https://veframework.com/
MIT License
24 stars 7 forks source link

Refactor Neblio transaction helpers #6

Open DeerajChakravarthy opened 2 years ago

DeerajChakravarthy commented 2 years ago

List of refactoring changes done:

In NeblioTransactionHelper.cs class

  1. SignAndBroadcast -> Removed unnecessary Try/Catch.
  2. IsEnoughConfirmationsForSend -> Sending output as a string, Removed try catch block.
  3. GetAddressFromPrivateKey -> removed Async, removed boolean param.
  4. IsPrivateKeyValid -> removed Async, removed boolean output param as it is false for all failure cases.
  5. GetSendAmount -> merged address and removed Async, removed exception object.
  6. CalcFee -> removed inputScriptSignatureAddress.
  7. ValidateNeblioAddress -> removed Async, removed bool property, removed exception object, merged all the IF conditions.
  8. ValidateOneTokenNFTUtxo -> removed bool param.

In EncryptionKey.cs class

  1. LoadPassword -> Removed Async and made the method void.

Equivalent changes in other classes where the above methods are referred. All the Unit tests passed and in terms of complexity and risk the changes are minimal.

VenkataRoundSqr commented 2 years ago

Closing this Issue as the code is pushed to Development branch.