-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: unify confirmations in the transaction flow (#4177)
* chore: create a wrapper on top of signOrExecuteForm to fetch async data before showing the ui * chore: show the confirmation view component based on the transaction type * chore: move presentational layer of reviewOwner to SettingsChange component * chore: do not use showMethodCall to signOrExecuteForm component * feat: Add a loader in the signOrExecuteForm component while the necessary data is not fetched * fix: unit tests * fix: lint errors * mend * fix: pass the txInfo in the useTxDetails mock to avoid null pointer exception * fix: generated snapshots * fix: generated snapshots * fix: change the fundReceiver address on snapshots * fix: remove unnecessary casting * chore: rename useDetailsHook to be useProposeTx * fix: grab the transaction id from the txDetails in case the txId is not provided * fix: rename file from utils to mockData * chore: move the settings component to be exported directly in the index file * fix: add the batch button back to the confirmation views * fix: use the txData component in the confirmation view in case any confirmation view component is found * feat: show an error screen if something happens while fetching the txDetails * fix: show contract name when it is a multisend transaction * fix: eslint errors * fix: move error condition to top of the confirmation view component * fix: do not propose transaction for contrafactual safes * fix: cypress drain e2e test * fix: remove duplicated data in the DecodedTx component * fix: Add back showMethodCall and keep prop drilling it * fix: do not show method call for approve transactions * fix: add showMethodCall into the confirmationView component * fix: pass isApproval down to the confirmation view component * fix: Add isCreation check inside DecodedTx to render partial summary * fix: Update snapshot and mock hex data generation to be even length * chore: generated snapshots * chore: refactor changeThresholdReview screen (#4212) * Approval editor * Fix error display in confirmation screen * chore: unify confirmBatch screen (#4217) * fix(account-flow-import): change import src in the recover account flow screen * fix(eslint): eslint hook dependencies * fix(unit-tests): change txDetails mocked data in unit tests * fix(eslint): change operators order * fix(unit-tests): mock useSafeAddress hook * fix(settings-change): add address name in the change owner screen * fix(settings-change): duplicated owner name in the add owner flow --------- Co-authored-by: Usame Algan <[email protected]> Co-authored-by: katspaugh <[email protected]>
- Loading branch information
1 parent
132b4a2
commit aad2bb5
Showing
52 changed files
with
3,682 additions
and
641 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { type Context, createContext } from 'react' | ||
import { type AddOwnerFlowProps } from '.' | ||
import { type ReplaceOwnerFlowProps } from '../ReplaceOwner' | ||
|
||
type SettingsChange = Context<AddOwnerFlowProps | ReplaceOwnerFlowProps> | ||
|
||
export const SettingsChangeContext: SettingsChange = createContext({} as AddOwnerFlowProps | ReplaceOwnerFlowProps) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { createContext } from 'react' | ||
|
||
export const ChangeThresholdReviewContext = createContext({ | ||
newThreshold: 0, | ||
}) |
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
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
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
Oops, something went wrong.