Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add receive file rejection functionality #114

Merged
merged 11 commits into from
Jan 12, 2023

Conversation

JustusFT
Copy link
Contributor

@JustusFT JustusFT commented Dec 19, 2022

Currently, if the receiver tries to cancel the transfer on the ReceiveConsentScreen, the sender is not notified that the transfer was cancelled. This PR fixes that

Also needs LeastAuthority/wormhole-william#100 to be merged

@donpui
Copy link
Contributor

donpui commented Jan 3, 2023

Assuming fix of w-w part is correct, can we adjust behavior on frontend side, because now only Receiver side initiate rejections, also after rejection on Receiver side, it still stays in the same page (also Sender stays in the same page).

@JustusFT
Copy link
Contributor Author

JustusFT commented Jan 4, 2023

@donpui I updated this pr so that the sender and receiver resets back to the begin pages when a rejection happens. This pr as well as LeastAuthority/wormhole-william#100 should be ok now.

@JustusFT JustusFT marked this pull request as ready for review January 4, 2023 06:13
@JustusFT JustusFT requested a review from donpui January 4, 2023 06:13
@donpui
Copy link
Contributor

donpui commented Jan 4, 2023

@donpui I updated this pr so that the sender and receiver resets back to the begin pages when a rejection happens. This pr as well as LeastAuthority/wormhole-william#100 should be ok now.

CI and for me fails to build:

#48 31.18     [tsl] ERROR in /usr/src/app/client/src/app/wormhole/client_worker.ts(243,19)
#48 31.18       TS2345: Argument of type '{ code: any; cancel: () => Promise<void>; done: Promise<void>; }' is not assignable to parameter of type 'TransferProgress | PromiseLike<TransferProgress>'.
#48 31.18   Property 'reject' is missing in type '{ code: any; cancel: () => Promise<void>; done: Promise<void>; }' but required in type 'TransferProgress'.

@JustusFT
Copy link
Contributor Author

JustusFT commented Jan 4, 2023

@donpui fixed the type error, it should be ok now

Copy link
Contributor

@donpui donpui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W-W merged and updated submodule. Additionally corrected E2E test to support current behaviour (@JustusFT take a look at last commit, before merging).

@JustusFT JustusFT merged commit 33ba520 into 103.error-map Jan 12, 2023
@JustusFT JustusFT deleted the handle-receiver-rejection branch January 12, 2023 01:59
JustusFT added a commit that referenced this pull request Jan 12, 2023
* Add new error for receiver rejection
- adds an error handler when a transfer is rejected.

* Add receive file rejection functionality (#114)
- Updates the wormhole-william submodule which includes the fix for deadlock on cancel.
- Adds reject function to `wormhole.fileMeta` for the receiver. Will cancel the transfer if called before the transfer starts.
  - This replaces the browser refresh workaround previously used for rejection.

Co-authored-by: Justus Tumacder <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants