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

Skip storing draft in RBF form, reintroduce precomposedForm #15402

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

komret
Copy link
Contributor

@komret komret commented Nov 14, 2024

RBF form should not store transaction drafts. It creates confusion when send form is opened with unexpected pre-filled data and also causes errors when a transaction is created in thusly affected send form.

This PR reintroduces precomposedForm which holds similar data as drafts, but is used by both send form and RBF form synchronize data between the form and the review modal.

These changes may affect the mobile app.

Related Issue

Resolve #13325
Resolve #14753 (create a transaction, , open RBF form, replace the transaction, go to send form, try to send)
Resolve #15114 (create a transaction, open RBF form, close it without replacing the transaction, go to send form, try to send)

@komret komret added bug Something isn't working as expected send Send page labels Nov 14, 2024
@komret komret requested a review from PeKne November 14, 2024 17:29
@komret komret force-pushed the fix/reintroduce-precomposed-form branch from 3a15a9f to 6a0e0f8 Compare November 14, 2024 17:32
Copy link

github-actions bot commented Nov 14, 2024

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 10
  • More info

Learn more about 𝝠 Expo Github Action

@komret komret force-pushed the fix/reintroduce-precomposed-form branch from 6a0e0f8 to 40cdcd5 Compare November 14, 2024 17:40
@PeKne
Copy link
Contributor

PeKne commented Nov 15, 2024

This PR do no harm to the mobile implementation. Only what changes for us is that there will be an extra attribute in the redux state, but we do not interact with it in any way. So feel free to merge this change. I tested your branch locally on mobile and it works as expected 👌.

@@ -36,7 +36,7 @@ import { findLabelsToBeMovedOrDeleted, moveLabelsForRbfAction } from '../moveLab
export const MODULE_PREFIX = '@send';

export const saveSendFormDraftThunk = createThunk(
`${MODULE_PREFIX}/saveSendFormDraftThunk`,
`${MODULE_PREFIX}/ `,
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 probably not intentional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected send Send page
Projects
None yet
2 participants