accounts
accounts copied to clipboard
Made SendKeyForAccountFlow return the created key too.
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.
- the initiator has an abstract function, which is overridden with a key creation flow request.
- the responder has an abstract function, which is overridden with a key creation flow
Because both ends need to know the key created, it was not possible to use RequestKeyForAccountFlow
, and instead RequestKeyFlow
was used.
@roastario
- I thought that with a
FlowException
thrown in the responder, it was propagated back to the initiator, which is waiting for a reply. - If I reinstate the found / not found state, the responder will have to return a
PublicKey?
while the initiator can return aPublicKey
. Unless the responder sends back "not found" and then throws (not sure about the implications of this double action). Is any ok?