Skip to content

Commit 27ffdd7

Browse files
Aaron Cookusame-alganDiogoSoaresskatspaughManuel Gellfart
authored
fix: highlight confirmed status when signer confirms (#2279)
* Add folder structure for tx flow * feat: create new-tx route and NewTxMenu component * feat: Add StepperFactory and new tx layout (#2040) * feat: Add StepperFactory, new tx pages * wip: context instead of routes * Add tx flows to new modal context * fix: Close modal when user navigates * Export all flows from one file * refactor: Remove unused code from StepperFactory * fix: Duplicate ModalDialog to fix failing tests * Refactor: reactive recommended nonce (#2050) * Refactor: reactive recommended nonce Reduce re-renders Nonce -1 * Use "nonceReadyOnly" instead of -1 * Split sign and execute into two components * feat: Transaction status widget (#2062) * feat: add tx status widget UI * add logic to paint the stepper * port the ConfirmProposedTx to the new layout * pass tx data to the TxStatusWidget to get the tx confirmations * style: add new lines between adjacent tags * Refactor: SafeTxProvider (#2064) * Refactor: SafeTxProvider * Avoid oscillating nonce * fix reject tx for new provider --------- Co-authored-by: Usame Algan <usame@safe.global> * Move progress to TxLayout * Refactor: useRecommendedNonce + useSafeTxGas (#2066) * Refactor: useRecommendedNonce + useSafeTxGas * Fix lint * Get recommended nonce by "estimating" an empty tx * Adjust ConfirmTx and ExecuteTxButton * Refactor: a less verbose ModalProvider (#2068) * Refactor: a less verbose ModalProvider * Fix Cannot redefine property: dispatchTxProposal * Refactor the tx flow system (#2071) * Refactor the tx flow system * Array * Fix: pass nonce correctly (#2072) * Fix linting errors, add TODOs for failing tx flows (#2070) * Editable nonce (#2077) * Editable nonce * Fix tests * refactor: save entire data structure on submission (#2083) * fix: Close modal on sign, only render current step * fix: Close modal on sign, only render current step * fix: set all data + move back button --------- Co-authored-by: Usame Algan <usame@safe.global> * feat: Add SuccessScreen to tx flow (#2080) * Refactor: single type for tx flows (#2084) * Refactor: single type for tx flows * Omit txNonce * FormData type * feat: add owner flow (#2086) * feat: Change threshold flow (#2085) * feat: Port change threshold flow * fix: Only estimate gas when executing * fix: Remove old component * feat: remove owner flow * feat: replace owner flow (#2087) * feat: add owner flow * feat: replace owner flow * feat: replace owner flow * feat: update flow (#2089) * fix: Remove Module tx flow (#2090) * Add flow for remove guard (#2091) * Safe Apps tx flow (#2081) * SafeAppsTx flow * On close * Handle txFlow close * feat: new spending limit flow (#2093) * feat: new spending limit flow * fix: preserve token address + reset time values * Onclose callback (#2094) * Send button in Assets (#2097) * Send button in Assets * Supress contentEditable warning * Fix: align Next and Back buttons (#2103) * feat: remove spending limit flow (#2098) * Refactor: move AdvancedParams to ExecuteForm (#2104) * fix: Move sign msg modal to new flow (#2102) * fix: Move sign msg modal to new flow * Adjust flex property if subtitle exists * fix: Add flag to hide nonce field in TxLayout * TxCard layout (#2105) * Modal title and icon (#2107) * Modal title and icon * NFTs * feat: spending limit selector (#2106) * feat: batch execute flow (#2108) * Move on-chain sign to new flow (#2109) * feat: amount selector (#2111) * feat: amount selector * fix: use CSS variables * fix: cleanup styles * feat: execute/sign `RadioGroup` (#2117) * [Tx flow] feat: address input redesign (#2112) * feat: AddressInputReadOnly component * improve AddressInput * make component readonly * enable create AB entry from input component * show SaveAddressicon if address not in AB * open the list when clicking the caret * fix component height * show caret when there are available options * rm leftover code * do not highlight the readonly input on hover/click * focus the AddressInput on clicking to edit * change add to AB info text * do not truncate the address in the readonly component * show SaveAddressIcon when address is valid * amount input grows until token name * [TX flow] feat: confirm/execute title component (#2119) * feat: confirm/execute titles * place the component as per design * remove redundant code * use willExecute flag to display execution title * adjust the gap between SignOrExecuteForm elements * fix: remove error casting (#2127) * fix: remove error casting * refactor: don't call `asError` twice * fix: execution method style (#2125) * fix: execution method style * fix: change component * fix: change component * fix: update amount field style (#2124) * [TX flow] Send tokens overview (#2136) * fix: Adjust TxLayout header design * fix: Implement Token Transfer overview design * Remove loading state * [TX flow] style: offchain messages info boxes styles (#2134) * style: adjust success and info box styles * adjust msgSigners style * style margins in the info elements * clean up redundant variable * test: update tx builder URL * Feat: editable safeTxGas in Advanced details (#2132) * Feat: editable safeTxGas in Advanced details * Prettier * Make the form a popover * PR comments * fix: Nonce form (#2120) * fix: Update nonce input to show queued txs and reset button * fix: Extract hook, show input error outline, hide reset button if readonly * Add isEmpty flag to nonce input * Fix test * [TX flow] style: send token flow (#2126) * placeholder for AddressInput identicon * rm Send From * add the dividers to the layout * style CardActions * fix tests * [TX flow] styles: fix send token styles (#2138) * style: remove unnecessary CSS * style: consider the input label font-size in spacing * Small UI tweaks * fix: move default value to placeholder (#2139) * Fix DecodedTx tests * [TX flow] feat: add owner modal (#2143) * feat: create add owner * adjust ReviewOwner design * component to wrap owner address and include subtitle in modal * prefer RHF for form fields. use sx instead of classes * use MUI component * fix: remove owner flow styling (#2150) * fix: remove owner flow styling * fix: add titles * feat: add tooltip to advanced details (#2153) * feat: add tooltip to advanced details * fix: alter wording * [TX flow] feat: replace owner (#2151) * feat: redesign replace owner * rm unnecessary files. move css to module * fix: add titles * Update src/components/tx-flow/flows/AddOwner/ReviewOwner.tsx Co-authored-by: Aaron Cook <aaron@safe.global> --------- Co-authored-by: Aaron Cook <aaron@safe.global> * Align buttons in SignMessage modal * [TX flow] Display Token balance (#2155) * Add folder structure for tx flow * feat: create new-tx route and NewTxMenu component * feat: Add StepperFactory and new tx layout (#2040) * feat: Add StepperFactory, new tx pages * wip: context instead of routes * Add tx flows to new modal context * fix: Close modal when user navigates * Export all flows from one file * refactor: Remove unused code from StepperFactory * fix: Duplicate ModalDialog to fix failing tests * Refactor: reactive recommended nonce (#2050) * Refactor: reactive recommended nonce Reduce re-renders Nonce -1 * Use "nonceReadyOnly" instead of -1 * Split sign and execute into two components * feat: Transaction status widget (#2062) * feat: add tx status widget UI * add logic to paint the stepper * port the ConfirmProposedTx to the new layout * pass tx data to the TxStatusWidget to get the tx confirmations * style: add new lines between adjacent tags * Refactor: SafeTxProvider (#2064) * Refactor: SafeTxProvider * Avoid oscillating nonce * fix reject tx for new provider --------- Co-authored-by: Usame Algan <usame@safe.global> * Move progress to TxLayout * Refactor: useRecommendedNonce + useSafeTxGas (#2066) * Refactor: useRecommendedNonce + useSafeTxGas * Fix lint * Get recommended nonce by "estimating" an empty tx * Adjust ConfirmTx and ExecuteTxButton * Refactor: a less verbose ModalProvider (#2068) * Refactor: a less verbose ModalProvider * Fix Cannot redefine property: dispatchTxProposal * Refactor the tx flow system (#2071) * Refactor the tx flow system * Array * Fix: pass nonce correctly (#2072) * Fix linting errors, add TODOs for failing tx flows (#2070) * Editable nonce (#2077) * Editable nonce * Fix tests * refactor: save entire data structure on submission (#2083) * fix: Close modal on sign, only render current step * fix: Close modal on sign, only render current step * fix: set all data + move back button --------- Co-authored-by: Usame Algan <usame@safe.global> * feat: Add SuccessScreen to tx flow (#2080) * Refactor: single type for tx flows (#2084) * Refactor: single type for tx flows * Omit txNonce * FormData type * feat: add owner flow (#2086) * feat: Change threshold flow (#2085) * feat: Port change threshold flow * fix: Only estimate gas when executing * fix: Remove old component * feat: remove owner flow * feat: replace owner flow (#2087) * feat: add owner flow * feat: replace owner flow * feat: replace owner flow * feat: update flow (#2089) * fix: Remove Module tx flow (#2090) * Add flow for remove guard (#2091) * Safe Apps tx flow (#2081) * SafeAppsTx flow * On close * Handle txFlow close * feat: new spending limit flow (#2093) * feat: new spending limit flow * fix: preserve token address + reset time values * Onclose callback (#2094) * Send button in Assets (#2097) * Send button in Assets * Supress contentEditable warning * Fix: align Next and Back buttons (#2103) * feat: remove spending limit flow (#2098) * Refactor: move AdvancedParams to ExecuteForm (#2104) * fix: Move sign msg modal to new flow (#2102) * fix: Move sign msg modal to new flow * Adjust flex property if subtitle exists * fix: Add flag to hide nonce field in TxLayout * TxCard layout (#2105) * Modal title and icon (#2107) * Modal title and icon * NFTs * feat: spending limit selector (#2106) * feat: batch execute flow (#2108) * Move on-chain sign to new flow (#2109) * feat: amount selector (#2111) * feat: amount selector * fix: use CSS variables * fix: cleanup styles * feat: execute/sign `RadioGroup` (#2117) * [Tx flow] feat: address input redesign (#2112) * feat: AddressInputReadOnly component * improve AddressInput * make component readonly * enable create AB entry from input component * show SaveAddressicon if address not in AB * open the list when clicking the caret * fix component height * show caret when there are available options * rm leftover code * do not highlight the readonly input on hover/click * focus the AddressInput on clicking to edit * change add to AB info text * do not truncate the address in the readonly component * show SaveAddressIcon when address is valid * amount input grows until token name * [TX flow] feat: confirm/execute title component (#2119) * feat: confirm/execute titles * place the component as per design * remove redundant code * use willExecute flag to display execution title * adjust the gap between SignOrExecuteForm elements * fix: remove error casting (#2127) * fix: remove error casting * refactor: don't call `asError` twice * fix: execution method style (#2125) * fix: execution method style * fix: change component * fix: change component * fix: update amount field style (#2124) * [TX flow] Send tokens overview (#2136) * fix: Adjust TxLayout header design * fix: Implement Token Transfer overview design * Remove loading state * [TX flow] style: offchain messages info boxes styles (#2134) * style: adjust success and info box styles * adjust msgSigners style * style margins in the info elements * clean up redundant variable * test: update tx builder URL * Feat: editable safeTxGas in Advanced details (#2132) * Feat: editable safeTxGas in Advanced details * Prettier * Make the form a popover * PR comments * fix: Nonce form (#2120) * fix: Update nonce input to show queued txs and reset button * fix: Extract hook, show input error outline, hide reset button if readonly * Add isEmpty flag to nonce input * Fix test * [TX flow] style: send token flow (#2126) * placeholder for AddressInput identicon * rm Send From * add the dividers to the layout * style CardActions * fix tests * [TX flow] styles: fix send token styles (#2138) * style: remove unnecessary CSS * style: consider the input label font-size in spacing * Small UI tweaks * fix: move default value to placeholder (#2139) * Fix DecodedTx tests * [TX flow] feat: add owner modal (#2143) * feat: create add owner * adjust ReviewOwner design * component to wrap owner address and include subtitle in modal * prefer RHF for form fields. use sx instead of classes * use MUI component * fix: remove owner flow styling (#2150) * fix: remove owner flow styling * fix: add titles * feat: add tooltip to advanced details (#2153) * feat: add tooltip to advanced details * fix: alter wording * [TX flow] feat: replace owner (#2151) * feat: redesign replace owner * rm unnecessary files. move css to module * fix: add titles * Update src/components/tx-flow/flows/AddOwner/ReviewOwner.tsx Co-authored-by: Aaron Cook <aaron@safe.global> --------- Co-authored-by: Aaron Cook <aaron@safe.global> * fix: Display token balance in dropdown --------- Co-authored-by: Diogo Soares <diogo.lsoares@gmail.com> Co-authored-by: katspaugh <381895+katspaugh@users.noreply.github.com> Co-authored-by: katspaugh <katspaugh@gmail.com> Co-authored-by: Diogo Soares <32431609+DiogoSoaress@users.noreply.github.com> Co-authored-by: Aaron Cook <aaron@safe.global> * Fix: address book entry dialog (#2156) * [TX flow] Mobile optimisation (#2154) * Add folder structure for tx flow * feat: create new-tx route and NewTxMenu component * feat: Add StepperFactory and new tx layout (#2040) * feat: Add StepperFactory, new tx pages * wip: context instead of routes * Add tx flows to new modal context * fix: Close modal when user navigates * Export all flows from one file * refactor: Remove unused code from StepperFactory * fix: Duplicate ModalDialog to fix failing tests * Refactor: reactive recommended nonce (#2050) * Refactor: reactive recommended nonce Reduce re-renders Nonce -1 * Use "nonceReadyOnly" instead of -1 * Split sign and execute into two components * feat: Transaction status widget (#2062) * feat: add tx status widget UI * add logic to paint the stepper * port the ConfirmProposedTx to the new layout * pass tx data to the TxStatusWidget to get the tx confirmations * style: add new lines between adjacent tags * Refactor: SafeTxProvider (#2064) * Refactor: SafeTxProvider * Avoid oscillating nonce * fix reject tx for new provider --------- Co-authored-by: Usame Algan <usame@safe.global> * Move progress to TxLayout * Refactor: useRecommendedNonce + useSafeTxGas (#2066) * Refactor: useRecommendedNonce + useSafeTxGas * Fix lint * Get recommended nonce by "estimating" an empty tx * Adjust ConfirmTx and ExecuteTxButton * Refactor: a less verbose ModalProvider (#2068) * Refactor: a less verbose ModalProvider * Fix Cannot redefine property: dispatchTxProposal * Refactor the tx flow system (#2071) * Refactor the tx flow system * Array * Fix: pass nonce correctly (#2072) * Fix linting errors, add TODOs for failing tx flows (#2070) * Editable nonce (#2077) * Editable nonce * Fix tests * refactor: save entire data structure on submission (#2083) * fix: Close modal on sign, only render current step * fix: Close modal on sign, only render current step * fix: set all data + move back button --------- Co-authored-by: Usame Algan <usame@safe.global> * feat: Add SuccessScreen to tx flow (#2080) * Refactor: single type for tx flows (#2084) * Refactor: single type for tx flows * Omit txNonce * FormData type * feat: add owner flow (#2086) * feat: Change threshold flow (#2085) * feat: Port change threshold flow * fix: Only estimate gas when executing * fix: Remove old component * feat: remove owner flow * feat: replace owner flow (#2087) * feat: add owner flow * feat: replace owner flow * feat: replace owner flow * feat: update flow (#2089) * fix: Remove Module tx flow (#2090) * Add flow for remove guard (#2091) * Safe Apps tx flow (#2081) * SafeAppsTx flow * On close * Handle txFlow close * feat: new spending limit flow (#2093) * feat: new spending limit flow * fix: preserve token address + reset time values * Onclose callback (#2094) * Send button in Assets (#2097) * Send button in Assets * Supress contentEditable warning * Fix: align Next and Back buttons (#2103) * feat: remove spending limit flow (#2098) * Refactor: move AdvancedParams to ExecuteForm (#2104) * fix: Move sign msg modal to new flow (#2102) * fix: Move sign msg modal to new flow * Adjust flex property if subtitle exists * fix: Add flag to hide nonce field in TxLayout * TxCard layout (#2105) * Modal title and icon (#2107) * Modal title and icon * NFTs * feat: spending limit selector (#2106) * feat: batch execute flow (#2108) * Move on-chain sign to new flow (#2109) * feat: amount selector (#2111) * feat: amount selector * fix: use CSS variables * fix: cleanup styles * feat: execute/sign `RadioGroup` (#2117) * [Tx flow] feat: address input redesign (#2112) * feat: AddressInputReadOnly component * improve AddressInput * make component readonly * enable create AB entry from input component * show SaveAddressicon if address not in AB * open the list when clicking the caret * fix component height * show caret when there are available options * rm leftover code * do not highlight the readonly input on hover/click * focus the AddressInput on clicking to edit * change add to AB info text * do not truncate the address in the readonly component * show SaveAddressIcon when address is valid * amount input grows until token name * [TX flow] feat: confirm/execute title component (#2119) * feat: confirm/execute titles * place the component as per design * remove redundant code * use willExecute flag to display execution title * adjust the gap between SignOrExecuteForm elements * fix: remove error casting (#2127) * fix: remove error casting * refactor: don't call `asError` twice * fix: execution method style (#2125) * fix: execution method style * fix: change component * fix: change component * fix: update amount field style (#2124) * [TX flow] Send tokens overview (#2136) * fix: Adjust TxLayout header design * fix: Implement Token Transfer overview design * Remove loading state * [TX flow] style: offchain messages info boxes styles (#2134) * style: adjust success and info box styles * adjust msgSigners style * style margins in the info elements * clean up redundant variable * test: update tx builder URL * Feat: editable safeTxGas in Advanced details (#2132) * Feat: editable safeTxGas in Advanced details * Prettier * Make the form a popover * PR comments * fix: Nonce form (#2120) * fix: Update nonce input to show queued txs and reset button * fix: Extract hook, show input error outline, hide reset button if readonly * Add isEmpty flag to nonce input * Fix test * [TX flow] style: send token flow (#2126) * placeholder for AddressInput identicon * rm Send From * add the dividers to the layout * style CardActions * fix tests * [TX flow] styles: fix send token styles (#2138) * style: remove unnecessary CSS * style: consider the input label font-size in spacing * Small UI tweaks * fix: move default value to placeholder (#2139) * Fix DecodedTx tests * [TX flow] feat: add owner modal (#2143) * feat: create add owner * adjust ReviewOwner design * component to wrap owner address and include subtitle in modal * prefer RHF for form fields. use sx instead of classes * use MUI component * fix: remove owner flow styling (#2150) * fix: remove owner flow styling * fix: add titles * fix: Optimize new tx flow for mobile screens * refactor: Adjust all max media queries --------- Co-authored-by: Diogo Soares <diogo.lsoares@gmail.com> Co-authored-by: katspaugh <381895+katspaugh@users.noreply.github.com> Co-authored-by: katspaugh <katspaugh@gmail.com> Co-authored-by: Diogo Soares <32431609+DiogoSoaress@users.noreply.github.com> Co-authored-by: Aaron Cook <aaron@safe.global> * Chore: update MUI * fix: Enable spending limit txs in new flow (#2160) * fix: Enable spending limit txs in new flow * fix: Style review spending limit component * Adjust review screen design, fix nft link (#2162) * feat: simulation (#2157) * feat: simulation * Add context, update logos, remove canExecute * fix: reset on tx change + simplify context --------- Co-authored-by: Usame Algan <usame@safe.global> * Fix: hide Edit for safeTxGas when 0 in 1.3.0+ (#2163) * Fix: hide Edit for safeTxGas when 0 in 1.3.0+ * Simplify onBlur * Fix: TxModalDialog zIndex * feat: Move Redefine into new Tx Flow (#2166) * feat: Move Redefine into new Tx Flow * fix: cleanup logos + comments * refactor: Folder structure --------- Co-authored-by: iamacook <aaron@safe.global> * fix: port balance change (#2172) * [TX flow] Replace tx (#2173) * Move replace tx screen into tx layout * Add illustration, fix modal zIndex * fix: update owner management styles (#2174) * feat: add confirmation badge to flow (#2183) * feat: add confirmation badge to flow * fix: condition * fix: dark mode * feat: add replacement to transaction status widget (#2184) * Fix: restore tracking of send modals (#2185) * fix: make balance change more compact (#2186) * fix: make balance change more compact * fix: increase `gap` between changes * fix: disable transition + backdrop of modals (#2189) * Fix: tx modal with collapsed sidebar (#2188) * feat: show alert before closing transaction flow (#2187) * feat: show alert before closing transaction flow * fix: dark mode font colour * fix: handle back button * fix: change text * fix: change text * fix: unmount on final sig + close warning * Adjust spending limit ui for new tx flow (#2190) * Adjust spending limit ui for new tx flow * Adjust titles, fix remove owner button regression * Extract enum and reuse * Remove reset time switch * Adjust enum exports * Adjust Send NFT layout for new tx flow (#2192) * Adjust Remove module ui (#2194) * Fix: autofocus recipient if not set (#2196) * Fix: autofocus recipient if not set * hideBackdrop * Fix NFTs tests * Fix create_tx test * fix: style new tx modal (#2193) * fix: style new tx modal * fix: revert wrapper * fix: type * fix: animated icon * fix: e2e * [TX flow] Adds nonce validation (#2175) * Adds nonce validation * Adjust nonce validation * Disable nonce for reject tx, use correct nonce when replacing a tx * Adjust wording * fix: migrate input to RHF * Limit nonce input width * Fix e2e tests --------- Co-authored-by: iamacook <aaron@safe.global> * fix: don't warn for send NFTs or tx builder (#2202) * fix: don't warn for send NFTs or tx builder * fix: use `instanceof` * feat: add subtitle to confirmation flow (#2204) * fix: make tx check widgets `sticky` (#2203) * fix: make tx check widgets `sticky` * fix: move CSS * Adjust safe apps tx flow ui (#2201) * Adjust safe apps tx flow ui * Fix zIndex issue * Only show divider if there is an approval, fix e2e test * Handle undefined tokenInfo * Fix failing e2e test * fix: change threshold flow style + titles (#2208) * fix: change threshold flow style + titles * fix: change title + add divider * fix: don't rely only on fetch status for error (#2206) * Adjust batch execute ui (#2209) * Adjust icon color for dark mode (#2210) * Fix: show an error if risk isn't acknowledged (#2216) * Fix: show an error if risk isn't acknowledged * Highlight risk checkbox on submit * Don't reset error * Rm timeout * fix: Hide reset nonce button (#2223) * fix: Hide reset nonce button * Use ch units instead of em, absolute positioned reset button * fix: Show unlimited approval amount in readonly mode (#2220) * fix: Handle relayed txs and errors in status screen (#2226) * fix: Handle relayed txs and errors in status screen * fix: Status screen dashboard link to include chain prefix * fix: TxFlow submit button alignment, error message spacing (#2227) * fix: TxFlow submit button alignment, error message spacing * fix: Pass classname to ErrorMessage * fix: Apply input styles to all input fields (#2231) * fix: Apply input styles to all input fields * chore: Add TODO * fix: Hide confirmation dialog if set via setTxFlow (#2233) * feat: show redefine warnings on mobile (#2234) - adds RedefineMessage and tenderly result to TxChecks for small screens - changes order of Redefine scan results and Tenderly Simulation * fix: remove redundant component (#2241) * fix: Adjust decoded tx ui (#2235) * fix: recipient title alignment (#2240) * feat: add missing tooltips (#2245) * fix: reduce space between name and address (#2239) * fix: reduce space between name and address * fix: adjust `line-height` * fix: import * fix: router is undefined when using onboard modal (#2248) * fix: Update illustration for new tx (#2249) * fix: Adjust z-index of new flow (#2250) * fix: Write tests for ApprovalEditor (#2243) * fix: readonly nonce input (#2247) - tweaks nonce input design slightly - fixes e2e tests * fix: remove threshold input when swapping owners (#2253) * feat: add chain indicator (#2242) * fix: change simulation title (#2256) * Small UI adjustments (#2259) * fix: Show recommended nonce in list (#2260) * fix: Show recommended nonce in list * fix: button ref issue * fix: Disable submit button for non-owners (#2261) * fix: Review send NFT view (#2263) * [TX flow] Merge dev (#2265) * fix: Check execute checkbox if execution is the only option (#2230) * v1.14.0 * Chore: escape quotes in release action (#2236) Use printf Use a heredoc Use jq * fix: only initiate WC v2 module if project id provided (#2228) * chore: mark `NEXT_PUBLIC_WC_PROJECT_ID` required * chore: don't prettify * fix: don't return module * fix: revert readme * fix: autoconnect to WC v2 on mobile (#2238) * fix: update token price tooltip (#2257) --------- Co-authored-by: katspaugh <katspaugh@gmail.com> Co-authored-by: katspaugh <381895+katspaugh@users.noreply.github.com> Co-authored-by: Aaron Cook <aaron@safe.global> * [TX flow] Batch execute fixes (#2268) * fix: Hide status for batch execute * fix: Close batch execute flow when submitting tx * fix: Remove hide status flag, add isBatch flag and display different status messages for batch execution * fix: remove unnecessary hook (#2271) * fix: Sticky close button (#2269) * fix: Hide approval editor for non-approval transactions (#2262) * fix: Hide approval editor for non-approval transactions * fix: Adjust useApprovalInfos hook for non-approval txs * fix: Adjust tx flow elements height (#2272) * fix: increase `min-width` of nonce field (#2270) * fix: increase `min-width` of nonce field * fix: prevent recommended nonce jump * fix: align progress bar with new tx button (#2274) * fix: Align decoded tx ui for batch execute (#2275) * fix: Align decoded tx ui for batch execute * fix: Don't show confirmation dialog for batch execute, update spending limit components to use SendAmountBlock * fix: Validation for spending limits (#2277) * fix: Validation for spending limits * fix: Reset amount field to empty string instead of 0 when switching tokens * fix: Add readonly addressbook input to spending limits * fix: Hide nonce for spending limit txs (#2278) * fix: Hide nonce for spending limit txs * Update src/components/tx-flow/flows/TokenTransfer/ReviewSpendingLimitTx.tsx Co-authored-by: Aaron Cook <aaron@safe.global> --------- Co-authored-by: Aaron Cook <aaron@safe.global> * fix: highlight confirmed status when signer confirms * fix: Remove step check for confirm highlight * fix: highlight confirmed status when signer confirms * chore: Update version to 1.15.0 --------- Co-authored-by: Usame Algan <usame@safe.global> Co-authored-by: Diogo Soares <diogo.lsoares@gmail.com> Co-authored-by: Usame Algan <5880855+usame-algan@users.noreply.github.com> Co-authored-by: katspaugh <381895+katspaugh@users.noreply.github.com> Co-authored-by: katspaugh <katspaugh@gmail.com> Co-authored-by: Diogo Soares <32431609+DiogoSoaress@users.noreply.github.com> Co-authored-by: Manuel Gellfart <manu@safe.global>
1 parent 93b761e commit 27ffdd7

4 files changed

Lines changed: 17 additions & 9 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"homepage": "https://github.com/safe-global/safe-wallet-web",
44
"license": "GPL-3.0",
55
"type": "module",
6-
"version": "1.14.0",
6+
"version": "1.15.0",
77
"scripts": {
88
"dev": "next dev",
99
"start": "next dev",

src/components/transactions/TxSigners/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export const TxSigners = ({ txDetails, txSummary }: TxSignersProps): ReactElemen
125125

126126
const { confirmations, confirmationsRequired, executor } = detailedExecutionInfo
127127

128+
// TODO: Refactor to use `isConfirmableBy`
128129
const confirmationsCount = confirmations.length
129130
const canExecute = wallet?.address ? isExecutable(txSummary, wallet.address, safe) : false
130131
const confirmationsNeeded = confirmationsRequired - confirmations.length

src/components/tx-flow/common/TxStatusWidget/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import CreatedIcon from '@/public/images/messages/created.svg'
33
import SignedIcon from '@/public/images/messages/signed.svg'
44
import { type TransactionSummary } from '@safe-global/safe-gateway-typescript-sdk'
55
import useSafeInfo from '@/hooks/useSafeInfo'
6-
import { isMultisigExecutionInfo, isSignableBy } from '@/utils/transaction-guards'
6+
import { isMultisigExecutionInfo, isSignableBy, isConfirmableBy } from '@/utils/transaction-guards'
77
import classnames from 'classnames'
88
import css from './styles.module.css'
99
import CloseIcon from '@mui/icons-material/Close'
@@ -41,7 +41,7 @@ const TxStatusWidget = ({
4141
const { executionInfo = undefined } = txSummary || {}
4242
const { confirmationsSubmitted = 0 } = isMultisigExecutionInfo(executionInfo) ? executionInfo : {}
4343

44-
const isConfirmedStepIncomplete = step < 1 && !confirmationsSubmitted
44+
const canConfirm = txSummary ? isConfirmableBy(txSummary, wallet?.address || '') : safe.threshold === 1
4545
const canSign = txSummary ? isSignableBy(txSummary, wallet?.address || '') : true
4646

4747
return (
@@ -69,7 +69,7 @@ const TxStatusWidget = ({
6969
</ListItemText>
7070
</ListItem>
7171

72-
<ListItem className={classnames({ [css.incomplete]: isConfirmedStepIncomplete && !isBatch })}>
72+
<ListItem className={classnames({ [css.incomplete]: !canConfirm && !isBatch })}>
7373
<ListItemIcon>
7474
<SignedIcon />
7575
</ListItemIcon>

src/utils/transaction-guards.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,17 @@ export const isSignableBy = (txSummary: TransactionSummary, walletAddress: strin
127127
return !!executionInfo?.missingSigners?.some((address) => address.value === walletAddress)
128128
}
129129

130+
export const isConfirmableBy = (txSummary: TransactionSummary, walletAddress: string): boolean => {
131+
if (!txSummary.executionInfo || !isMultisigExecutionInfo(txSummary.executionInfo)) {
132+
return false
133+
}
134+
const { confirmationsRequired, confirmationsSubmitted } = txSummary.executionInfo
135+
return (
136+
confirmationsSubmitted >= confirmationsRequired ||
137+
(confirmationsSubmitted === confirmationsRequired - 1 && isSignableBy(txSummary, walletAddress))
138+
)
139+
}
140+
130141
export const isExecutable = (txSummary: TransactionSummary, walletAddress: string, safe: SafeInfo): boolean => {
131142
if (
132143
!txSummary.executionInfo ||
@@ -135,11 +146,7 @@ export const isExecutable = (txSummary: TransactionSummary, walletAddress: strin
135146
) {
136147
return false
137148
}
138-
const { confirmationsRequired, confirmationsSubmitted } = txSummary.executionInfo
139-
return (
140-
confirmationsSubmitted >= confirmationsRequired ||
141-
(confirmationsSubmitted === confirmationsRequired - 1 && isSignableBy(txSummary, walletAddress))
142-
)
149+
return isConfirmableBy(txSummary, walletAddress)
143150
}
144151

145152
// Spending limits

0 commit comments

Comments
 (0)