-
Notifications
You must be signed in to change notification settings - Fork 13
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
[NO-CHANGELOG] Adds Smart Checkout to state and flow of Sale Widget #1005
Merged
jwhardwick
merged 24 commits into
main
from
gpr-210/add-smart-checkout-shared-context-pr-branch
Oct 19, 2023
Merged
[NO-CHANGELOG] Adds Smart Checkout to state and flow of Sale Widget #1005
jwhardwick
merged 24 commits into
main
from
gpr-210/add-smart-checkout-shared-context-pr-branch
Oct 19, 2023
Conversation
This file contains 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
…ckout uses contract address and amount from url params.
…Coins. SaleWidget.tsx shows INSUFFICIENT_BALANCE error when smart checkout has no available funding routes.
jwhardwick
commented
Oct 17, 2023
jhesgodi
reviewed
Oct 17, 2023
packages/checkout/widgets-lib/src/widgets/sale/context/SaleContextProvider.tsx
Outdated
Show resolved
Hide resolved
jhesgodi
reviewed
Oct 17, 2023
packages/checkout/widgets-lib/src/widgets/sale/context/SaleContextProvider.tsx
Outdated
Show resolved
Hide resolved
jhesgodi
reviewed
Oct 17, 2023
packages/checkout/widgets-lib/src/widgets/sale/hooks/useSmartCheckout.ts
Show resolved
Hide resolved
jhesgodi
reviewed
Oct 17, 2023
packages/checkout/widgets-lib/src/widgets/sale/hooks/useSmartCheckout.ts
Outdated
Show resolved
Hide resolved
jhesgodi
requested changes
Oct 17, 2023
packages/checkout/widgets-lib/src/widgets/sale/views/PaymentMethods.tsx
Outdated
Show resolved
Hide resolved
…-210/add-smart-checkout-shared-context-pr-branch
jwhardwick
commented
Oct 18, 2023
return result; | ||
}, [smartCheckout]); | ||
|
||
useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved all the SC logic stuff here, including calling sign
before moving to PayWithCoins
.
If there are funding routes, they get set here setFundingRoutes()
. Then FundWithSmartCheckout
only cares about two things globally:
- calling
querySmartCheckout
onINIT
- once
FundingRoutes
are set, showing these to user and letting them complete each step
jwhardwick
commented
Oct 18, 2023
packages/checkout/widgets-lib/src/widgets/sale/views/PaymentMethods.tsx
Outdated
Show resolved
Hide resolved
jwhardwick
changed the title
Gpr 210/add smart checkout shared context pr branch
[NO-CHANGELOG] Adds Smart Checkout to state and flow of Sale Widget
Oct 18, 2023
jhesgodi
reviewed
Oct 18, 2023
packages/checkout/widgets-lib/src/widgets/sale/context/SaleContextProvider.tsx
Show resolved
Hide resolved
jhesgodi
reviewed
Oct 18, 2023
packages/checkout/widgets-lib/src/widgets/sale/context/SaleContextProvider.tsx
Show resolved
Hide resolved
jhesgodi
reviewed
Oct 18, 2023
packages/checkout/widgets-lib/src/widgets/sale/views/FundWithSmartCheckout.tsx
Outdated
Show resolved
Hide resolved
… github.com:immutable/ts-immutable-sdk into gpr-210/add-smart-checkout-shared-context-pr-branch
imx-mikhala
approved these changes
Oct 19, 2023
jhesgodi
approved these changes
Oct 19, 2023
jwhardwick
deleted the
gpr-210/add-smart-checkout-shared-context-pr-branch
branch
October 19, 2023 02:49
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.
Summary
NOTE: swaps are geo blocked, so to see this with swaps you'll need to modify
packages/checkout/sdk/src/smartCheckout/routing/routingOptions.ts
Flows
(All urls will be specific for my wallet balance)
1 - SC balance is
!sufficient
- no funding routes availableShow user error and try again.
http://localhost:3001/sale?amount=100000000.023&env=sandbox&fromContractAddress=0x12739A8f1A8035F439092D016DAE19A2874F30d2&environmentId=43c50b21-97e3-4d15-a67f-c37db28ac086
SC.Insufficient.mov
2 - SC balance is
!sufficient
- funding routes availableShow FundingRouteSelect for user to select from
http://localhost:3001/sale?amount=0.023&env=sandbox&fromContractAddress=0x12739A8f1A8035F439092D016DAE19A2874F30d2&environmentId=43c50b21-97e3-4d15-a67f-c37db28ac086
SC.Insufficient.Available.Routes.mov
3 SC balance is sufficient
Send user to PayWithCoins
http://localhost:3001/sale?amount=0.0023&env=sandbox&fromContractAddress=0x21B51Ec6fB7654B7e59e832F9e9687f29dF94Fb8&environmentId=4dfc4bec-1867-49aa-ad35-d8a13b206c94
SC.Sufficient.mov