Skip to content

move: Sapphire to CEX#106

Merged
lubej merged 1 commit intomasterfrom
ml/move/sapphire-to-cex
Nov 15, 2024
Merged

move: Sapphire to CEX#106
lubej merged 1 commit intomasterfrom
ml/move/sapphire-to-cex

Conversation

@lubej
Copy link
Collaborator

@lubej lubej commented Nov 15, 2024

Description

The current flow changes were introduced:

  • in case there is some left over balance, a form with address only will show up
  • with no leftover balance, form with address and balance is shown. The transfer triggers directly on submit.
  • dev environment now connects to testnet
  • addressed and private keys exporting of withdrawal flow are hidden for now

Resolves #94

Resources

https://www.loom.com/share/a3669d9c19504c4b89547ceb906b5bc8?sid=0856742a-8ab8-4eaf-a32a-c1c227045c14

@lubej lubej requested a review from lukaw3d November 15, 2024 09:19
@lubej lubej merged commit d9df2d4 into master Nov 15, 2024
@lubej lubej deleted the ml/move/sapphire-to-cex branch November 15, 2024 10:06
window.mock = false

export const amountPattern = '^[0-9]*[.]?[0-9]{0,9}$'
export const withdrawEstimatedFee = parseUnits('0.007', 18)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a duplicate of withdrawFeeAmount

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in #210

try {
const amount = parseUnits(_value, consensusConfig.decimals)

if (amount * 10n ** 9n < withdrawEstimatedFee) {
Copy link
Contributor

@lukaw3d lukaw3d Jan 14, 2025

Choose a reason for hiding this comment

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

This allows values that are too low, and the transaction fails (move app doesn't detect the failure). It should be checking at least minimalWithdrawableAmount, but I only verified as low as 0.1; that's why I was using <input name="amount" type="number" step="any" min="0.1" required />

(related #87)

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in #210

Comment on lines +93 to +95
// Loop unless in input mode, case when user click transfer more
if (!isInputMode) {
await step4(consensusAddress)
Copy link
Contributor

Choose a reason for hiding this comment

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

Somehow this still often loops and then causes race conditions. Not sure if due to later changes like 61504fc

Related #155 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in #207

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.

move: Sapphire to CEX flow [UI/UX]

2 participants

Comments