accounts icon indicating copy to clipboard operation
accounts copied to clipboard

Made SendKeyForAccountFlow return the created key too.

Open xavierlepretre opened this issue 4 years ago • 1 comments

Added tests too.

Unlike ProvideKeyFlow, SendKeyForAccountFlow does not return the created key. This pull request fixes that.

The use case is where both ends of the flow come to agreement about which key to use.

Because both ends need to know the key created, it was not possible to use RequestKeyForAccountFlow, and instead RequestKeyFlow was used.

xavierlepretre avatar May 18 '20 20:05 xavierlepretre

@roastario

  1. I thought that with a FlowException thrown in the responder, it was propagated back to the initiator, which is waiting for a reply.
  2. If I reinstate the found / not found state, the responder will have to return a PublicKey? while the initiator can return a PublicKey. Unless the responder sends back "not found" and then throws (not sure about the implications of this double action). Is any ok?

xavierlepretre avatar May 21 '20 12:05 xavierlepretre