dfinity / invoice-canister

Providing an example and simplified experience for accepting payments in smart contracts
Apache License 2.0
44 stars 13 forks source link

second review #9

Closed crusso closed 2 years ago

crusso commented 2 years ago

(No longer sure this builds as my dfx got corrupted). Is CI working?

Some questions spring to mind:

krpeacock commented 2 years ago
  1. Dfx 0.9.0 was always a corrupted release and shouldn't be used. There is no CI yet
  2. I don't want to delete invoices, because a default behavior of deleting records of financial transactions does not seem like a best/desirable practice to me
  3. I'm not sure what the fixed size would be - maybe we can discuss in a dedicated issue
  4. For failed awaits - this would be for the ICP.transfer scenario, right? Would wrapping those in a try/catch resolve this behavior?
  5. The verifyInvoice is meant to be pollable - all we care is that the invoice is eventually satisfied.
    • overpaying is not a significant concern because we can allow the invoice creator to handle that logic themselves
    • Additional payments sent to a closed invoice for whatever reason could be a problem.
    • I would consider adding some new method to reclaim surplus balance from an invoice account, but only allow it to be called after the invoice has been verified. Otherwise, it could be abused to prevent the invoice from being satisfied