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: cctp withdrawals: withdraw form [OTE-855][5/n] #1155

Merged
merged 13 commits into from
Oct 22, 2024

Conversation

yogurtandjam
Copy link
Contributor

@yogurtandjam yogurtandjam commented Oct 15, 2024

Adds the withdrawform component and hooks it up to the subcomponents in the stack

Adds ArrowIcon and USDCIcon

Adds backgroundColorOverride to formInput and Input components to enable dark themed

TODOS:

  • calculate default withdrawal address for keplr wallets
  • transfer status notifications
  • optimize useTransfers
  • coinbase withdrawals
  • replace testflag with statsig feature flagging

Figma https://www.figma.com/design/fMQodZKzn9B5aZTN5G0fLJ/dYdX-%E2%80%BA-Web?node-id=41402-168816&node-type=frame&t=HtXCnIXhOiY4jfOY-0

What it actually looks like
https://www.loom.com/share/c7904c9fd90a4bd6a921257cd81f5461?sid=66851029-b82e-4e93-a34e-f33822f1bdb5

Copy link

linear bot commented Oct 15, 2024

OTE-855 CCTP Withdrawals

Copy link

vercel bot commented Oct 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v4-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 7:36pm
v4-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 7:36pm

@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-4 branch 2 times, most recently from 6cb13aa to c3ad6a0 Compare October 16, 2024 00:56
@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-5 branch 2 times, most recently from f91234c to e3e08cf Compare October 16, 2024 00:57
@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-4 branch from c3ad6a0 to 5504986 Compare October 16, 2024 01:05
@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-5 branch from e3e08cf to 01d41ae Compare October 16, 2024 18:47
@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-4 branch from 5504986 to ed6d288 Compare October 16, 2024 21:14
@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-5 branch 2 times, most recently from 4ee597b to 76a7484 Compare October 16, 2024 21:15
@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-5 branch from 9792997 to 3e09292 Compare October 17, 2024 17:00
@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-5 branch 3 times, most recently from 9486824 to 762e73e Compare October 17, 2024 17:21
@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-4 branch from ed6d288 to 8de27cd Compare October 17, 2024 19:34
@yogurtandjam yogurtandjam force-pushed the jerms/OTE-855_cctp-withdrawals-5 branch from 762e73e to 4f8cb71 Compare October 17, 2024 19:36
src/components/Input.tsx Show resolved Hide resolved
testFlags.onboardingRewrite ? (
<span tw="row gap-[0.5ch]">
<Icon iconName={IconName.Usdc} size="1.5em" />
{stringGetter({ key: STRING_KEYS.WITHDRAW })} USDC
Copy link
Contributor

Choose a reason for hiding this comment

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

usdc needs to be a parameter, can't guarantee all languages put object after verb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh good point, this should have the localize TODO on it. i just haven't been localizing any of these strings yet.

return (
<$Form onSubmit={onSubmit}>
<div tw="text-color-text-0">
Make sure everything looks correct with your withdrawal before confirming
Copy link
Contributor

Choose a reason for hiding this comment

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

localize

</span>
}
validationConfig={
toAddress && Boolean(exchange) && !isValidDestinationAddress
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer !!exchange but this works too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmmm okay i'm down. tbh i've always preferred Boolean but i think !! is more common at this company so it makes sense to match that pattern

/>
}
/>
<ArrowContainer tw="z-1 mx-auto -mb-1.25 -mt-1.25 flex h-1.5 w-1.5 items-center justify-center rounded-0.25 border-color-layer-7 bg-color-layer-4">
Copy link
Contributor

Choose a reason for hiding this comment

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

this one is probably at the point it's better as a styled component. Why the "-" in front of mb and mt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

negative margins to allow for overlapping components
Uploading image.png…

Copy link
Contributor

Choose a reason for hiding this comment

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

still somewhat prefer this being a styled component but it's not a big deal

Copy link
Contributor

@tyleroooo tyleroooo left a comment

Choose a reason for hiding this comment

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

i didn't re-review, assuming the pr that just came in was reviewed

@yogurtandjam yogurtandjam merged commit 0c048df into main Oct 22, 2024
9 checks passed
@yogurtandjam yogurtandjam deleted the jerms/OTE-855_cctp-withdrawals-5 branch October 22, 2024 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants