refactor: [M3-8101] - Use network-transfer/prices endpoint for transfer overage pricing#10566
Merged
mjac0bs merged 8 commits intolinode:developfrom Jun 13, 2024
Conversation
added 6 commits
June 11, 2024 08:20
network-transfer/pricing endpoint for transfer overage pricingnetwork-transfer/prices endpoint for transfer overage pricing
mjac0bs
commented
Jun 11, 2024
Comment on lines
+81
to
+94
| data: objTypes, | ||
| isError: isErrorObjTypes, | ||
| isInitialLoading: isLoadingObjTypes, | ||
| } = useObjectStorageTypesQuery(isOpen); | ||
|
|
||
| const isInvalidPrice = !types || isErrorTypes; | ||
| const { | ||
| data: transferTypes, | ||
| isError: isErrorTransferTypes, | ||
| isInitialLoading: isLoadingTransferTypes, | ||
| } = useNetworkTransferPricesQuery(isOpen); | ||
|
|
||
| const isErrorTypes = isErrorTransferTypes || isErrorObjTypes; | ||
| const isLoadingTypes = isLoadingTransferTypes || isLoadingObjTypes; | ||
| const isInvalidPrice = | ||
| !objTypes || !transferTypes || isErrorTypes || isErrorTransferTypes; |
Contributor
Author
There was a problem hiding this comment.
These additions are made twice (once here, once in the next file) since we currently have two create bucket drawer components.
Comment on lines
+198
to
+206
| (showGDPRCheckbox && !hasSignedAgreement) || | ||
| isErrorTypes, | ||
| label: 'Create Bucket', | ||
| loading: isLoading, | ||
| loading: | ||
| isLoading || Boolean(formik.values.region && isLoadingTypes), | ||
| tooltipText: | ||
| !isLoadingTypes && isInvalidPrice | ||
| ? PRICES_RELOAD_ERROR_NOTICE_TEXT | ||
| : '', |
Contributor
Author
There was a problem hiding this comment.
I didn't add the loading and error state for the Create button in the initial PR for the first type of overage pricing in the OMC drawer - I forgot we had two drawers - so it has been added here now.
(OveragePricing is shared between the original and OMC drawer, so we were fine there.)
Contributor
Author
There was a problem hiding this comment.
Now being returned from API.
Contributor
Author
There was a problem hiding this comment.
Now being returned from API.
|
Coverage Report: ❌ |
hana-akamai
approved these changes
Jun 13, 2024
This was referenced Jun 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description 📝
This PR is a follow up to #10468 and uses the newly added
network-transfer/pricesendpoint to fetch network transfer overage pricing from the API, finishing off the transition for OBJ to dynamic pricing data.Loading and error states are addressed, especially in the OMC Create Bucket drawer, which I missed in the first PR - see Reproduction steps in the Testing section.
Changes 🔄
network-transfer/pricesendpoint.Target release date 🗓️
6/24
Preview 📷
How to test 🧪
Prerequisites
Reproduction steps
(How to reproduce the issue, if applicable)
Verification steps
(How to verify changes)
As an Author I have considered 🤔
Check all that apply