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

feat: add cancel button for offline deals waiting for data #1413

Merged
merged 5 commits into from
May 3, 2023

Conversation

LexLuthr
Copy link
Collaborator

@LexLuthr LexLuthr commented May 3, 2023

fixes #1403

Screenshot 2023-05-03 at 3 16 06 PM

Screenshot 2023-05-03 at 3 17 44 PM

Screenshot 2023-05-03 at 3 17 54 PM

@LexLuthr LexLuthr requested a review from dirkmc May 3, 2023 10:19
@dirkmc
Copy link
Contributor

dirkmc commented May 3, 2023

Nice work 🙌

I'd suggest that instead of creating a new mutation CancelOfflineDealAwaitingData we just use the existing dealCancel endpoint, and make it work for offline deals.
So in the DealCancel resolver, check if it's an offline deal, and if so call provider.CancelOfflineDealAwaitingImport(dealUuid)

@LexLuthr
Copy link
Collaborator Author

LexLuthr commented May 3, 2023

@dirkmc I have updated the mutations. I should have caught that during the initial commit.

Copy link
Contributor

@dirkmc dirkmc left a comment

Choose a reason for hiding this comment

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

One nit but otherwise LGTM 👍

Please test manually to make sure it works after the refactor and then feel free to merge

@@ -2,7 +2,7 @@

import React, {useEffect, useState} from "react";
import {useMutation, useQuery, useSubscription} from "@apollo/react-hooks";
import {DealCancelMutation, DealFailPausedMutation, DealRetryPausedMutation, DealSubscription, EpochQuery} from "./gql";
import {DealCancelMutation, DealFailPausedMutation, DealRetryPausedMutation, DealSubscription, EpochQuery, CancelOfflineDealAwaitingData} from "./gql";
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need CancelOfflineDealAwaitingData anymore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tested again manually. Removed CancelOfflineDealAwaitingData from JS file.

Screenshot 2023-05-03 at 10 01 35 PM

Screenshot 2023-05-03 at 10 01 45 PM

@LexLuthr LexLuthr merged commit 0fa020d into main May 3, 2023
@LexLuthr LexLuthr deleted the feat/cancel-offline branch May 30, 2023 09:41
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.

Add cancel button for offline deals waiting for data import
2 participants