openbazaar-go icon indicating copy to clipboard operation
openbazaar-go copied to clipboard

Reconsider wallet Get* interfaces to allow caller to consider individual responses

Open placer14 opened this issue 5 years ago • 0 comments

When resolving #1960, we considered that the caller might want a partial error and result set when requesting a set of updates. Before #1961 was merged, any error would prevent the processing of the rest of the set which now just continues past the erroring items. Instead it would be ideal for the caller to be able to consider each individual response (either result or error) by returning a channel or some similar pattern.

Steps to acceptance:

  • [ ] Plan actual pattern to implement
  • [ ] Define requirements and acceptance criteria
  • [ ] Apply changes to interfaces (wallet-interface and APIClient) ((in their upstream repos))
  • [ ] Update any implementing methods that match the changed interfaces ((in their upstream repos))
  • [ ] Merge changes into ob-go and update consumption of new pattern

This requires the external wallet-interface and internal APIClient interface to change as well as all implementing functions. The pattern should be applied to the following methods:

  • Transactions (APIClient)
  • GetTransactions (wallet-interface and APIClient)
  • GetRawTransactions (APIClient)
  • GetUtxos (APIClient)

placer14 avatar Jan 07 '20 22:01 placer14