-
Notifications
You must be signed in to change notification settings - Fork 25
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
[ENG-3594] feature: Send Max STX #767
Conversation
…-consolidation-logic-tx
…-consolidation-logic-tx
Co-authored-by: Jordan K. <[email protected]>
Co-authored-by: Jordan K. <[email protected]>
…-consolidation-logic-tx
3b265b1
to
c5ab910
Compare
and default to currentColor in spinner
…-extension into jordankzf/send-max-stx
src/app/ui-library/inputFeedback.tsx
Outdated
|
||
const colors: Record<FeedbackVariant, string> = { | ||
info: Theme.colors.white_200, | ||
danger: Theme.colors.danger_light, | ||
plain: Theme.colors.white_200, |
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.
|
||
const colors: Record<FeedbackVariant, string> = { | ||
info: Theme.colors.white_200, | ||
danger: Theme.colors.danger_light, | ||
plain: Theme.colors.white_200, | ||
plainIndented: Theme.colors.white_200, |
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.
nit: maybe this should be a indentedNoIcon?: boolean
prop?
so that any of the variants can replace the icon with an indent
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.
alternatively, you could use
noIcon?: boolean
and add a margin-left where you're using it for bns names, because we don't want to bloat the ui-library with random exceptions that may not be used much in other places
src/app/ui-library/button.tsx
Outdated
@@ -6,10 +6,13 @@ type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'danger'; | |||
|
|||
const StyledButton = styled.button` | |||
width: 100%; | |||
min-height: 42.5px; |
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.
question: is this something that is needed for all buttons and their variations? in zeroheight it's height: 44px.
if it's only for an edge case usage, consider applying this min-height where you need it rather than enforcing it here
new BigNumber(stxBtcRate), | ||
new BigNumber(btcFiatRate), | ||
) | ||
.toNumber() |
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.
nit: is toNumber() necessary here?
fiatUnit={fiatCurrency} | ||
getFeeForFeeRate={getFeeForFeeRate} | ||
feeRates={fees} | ||
feeRateLimits={{ min: 0.000001, max: feeMultipliers?.thresholdHighStacksFee }} |
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.
is this min/max logic stated somewhere in requirements?
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.
No, it's not documented. It's the same logic used for the current send stx implementation.
const [low, medium, high] = await estimateTransaction( | ||
unsignedTx.payload, | ||
undefined, | ||
selectedNetwork, | ||
); | ||
setFees({ | ||
low: Number(microstacksToStx(new BigNumber(low.fee)).toFixed(2)), | ||
medium: Number(microstacksToStx(new BigNumber(medium.fee)).toFixed(2)), | ||
high: Number(microstacksToStx(new BigNumber(high.fee)).toFixed(2)), | ||
}); | ||
if (!fee) | ||
setFeeRate(Number(microstacksToStx(new BigNumber(medium.fee)).toFixed(2)).toString()); |
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.
need to clarify with the requirements on what this logic should be. it looks to me that the notion requirements point to this section: https://www.notion.so/xverseapp/Speed-up-Stacks-transaction-Improve-fee-estimation-4455d27f8bdc4ebfbd94a16d7f18fe12?pvs=4#9509f0afd87d40eba297b357aa28763c
but there's no capping logic being applied here
@jordankzf I think the main points here are:
I think in order to keep this feature moving, let's focus on 1. and 2. to be ready for testing, and 3. can be a follow up task to include refactoring how best to share code between the various send flows, (including btc, stx, and other fungible token protocols) |
Test with build here: https://github.com/secretkeylabs/xverse-web-extension/actions/runs/8107403960 |
🔘 PR Type
What kind of change does this PR introduce?
Notes:
📜 Background
Provide a brief explanation of why this pull request is needed. Include the problem you are solving or the functionality you are adding. Reference any related issues.
Issue Link: #[issue_number]
Context Link (if applicable):
🔄 Changes
Enumerate the changes made in this pull request, detailing what has been modified, added, or removed. Include technical details and implications if necessary.
Impact:
🖼 Screenshot / 📹 Video
Include screenshots or a video demonstrating the changes. This is especially helpful for UI changes.
✅ Review checklist
Please ensure the following are true before merging: