Closed richvdh closed 1 year ago
(I just thought that an alternative design would be to create a large promise wrapping the three others: if first is present, run it and mark it as sync; then run second; then run third — and expose only that large promise to JS. It would simplify the end user API.)
(I just thought that an alternative design would be to create a large promise wrapping the three others: if first is present, run it and mark it as sync; then run second; then run third — and expose only that large promise to JS. It would simplify the end user API.)
I'm not really following this. We do need the details of the actual requests, because it's up to the JS side to actually make those requests over HTTP: rust-sdk-crypto-wasm itself does no networking.
(I just thought that an alternative design would be to create a large promise wrapping the three others: if first is present, run it and mark it as sync; then run second; then run third — and expose only that large promise to JS. It would simplify the end user API.)
I'm not really following this. We do need the details of the actual requests, because it's up to the JS side to actually make those requests over HTTP: rust-sdk-crypto-wasm itself does no networking.
Ah yes, i lacked that context, nevermind me.
bootstrapCrossSigning
now returns its own type, which can contain two or three nested requests. Create a new response type wrapper and return it.Some other cleanups while we are here:
Get rid of
OutgoingRequests
wrapper, which was more confusing than helpful.Rename
SigningKeysUploadRequest
toUploadSigningKeysRequest
for consistency with matrix-rust-sdk.