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

fix: highlight confirmed status when signer confirms #2279

Merged
merged 148 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
00f0e11
Add folder structure for tx flow
usame-algan May 23, 2023
92efde1
feat: create new-tx route and NewTxMenu component
DiogoSoaress May 24, 2023
e2c9972
feat: Add StepperFactory and new tx layout (#2040)
usame-algan May 30, 2023
6387992
Refactor: reactive recommended nonce (#2050)
katspaugh May 31, 2023
a2a2933
Merge dev
katspaugh May 31, 2023
50ab68c
feat: Transaction status widget (#2062)
DiogoSoaress May 31, 2023
5e8476d
Refactor: SafeTxProvider (#2064)
katspaugh May 31, 2023
a4c362c
Move progress to TxLayout
katspaugh Jun 1, 2023
1152232
Refactor: useRecommendedNonce + useSafeTxGas (#2066)
katspaugh Jun 2, 2023
50f58d7
Merge dev
katspaugh Jun 2, 2023
72a126d
Adjust ConfirmTx and ExecuteTxButton
katspaugh Jun 2, 2023
603a6d2
Refactor: a less verbose ModalProvider (#2068)
katspaugh Jun 2, 2023
0bd24db
Refactor the tx flow system (#2071)
katspaugh Jun 2, 2023
c810ad3
Fix: pass nonce correctly (#2072)
katspaugh Jun 2, 2023
8d74bfc
Fix linting errors, add TODOs for failing tx flows (#2070)
usame-algan Jun 2, 2023
61cf1b5
Merge dev
katspaugh Jun 12, 2023
1362202
Editable nonce (#2077)
katspaugh Jun 12, 2023
1b63a8f
refactor: save entire data structure on submission (#2083)
iamacook Jun 12, 2023
6f51b42
feat: Add SuccessScreen to tx flow (#2080)
usame-algan Jun 12, 2023
2e8a049
Refactor: single type for tx flows (#2084)
katspaugh Jun 13, 2023
b966ab5
feat: add owner flow (#2086)
iamacook Jun 13, 2023
eb1731e
feat: Change threshold flow (#2085)
usame-algan Jun 13, 2023
3afdea1
feat: remove owner flow
iamacook Jun 13, 2023
f0c63ef
feat: replace owner flow (#2087)
iamacook Jun 13, 2023
5b5c261
feat: update flow (#2089)
iamacook Jun 13, 2023
f4c6b86
fix: Remove Module tx flow (#2090)
usame-algan Jun 13, 2023
53c7df3
Add flow for remove guard (#2091)
usame-algan Jun 13, 2023
60ce628
Safe Apps tx flow (#2081)
katspaugh Jun 14, 2023
d69cd67
feat: new spending limit flow (#2093)
iamacook Jun 14, 2023
83d5e8f
Onclose callback (#2094)
katspaugh Jun 14, 2023
58b3ab1
Send button in Assets (#2097)
katspaugh Jun 14, 2023
ab815e9
Fix: align Next and Back buttons (#2103)
katspaugh Jun 14, 2023
99cdacc
feat: remove spending limit flow (#2098)
iamacook Jun 14, 2023
d73f223
Refactor: move AdvancedParams to ExecuteForm (#2104)
katspaugh Jun 15, 2023
0d9aedf
fix: Move sign msg modal to new flow (#2102)
usame-algan Jun 15, 2023
b8ba35a
TxCard layout (#2105)
katspaugh Jun 15, 2023
46d5220
Modal title and icon (#2107)
katspaugh Jun 15, 2023
6d006d2
feat: spending limit selector (#2106)
iamacook Jun 15, 2023
0e55a9e
feat: batch execute flow (#2108)
iamacook Jun 15, 2023
1956413
Move on-chain sign to new flow (#2109)
usame-algan Jun 15, 2023
fcdaaae
Merge branch 'dev' of github.com:safe-global/web-core into epic-tx-flow
katspaugh Jun 15, 2023
d4bb5d0
feat: amount selector (#2111)
iamacook Jun 16, 2023
29bb975
feat: execute/sign `RadioGroup` (#2117)
iamacook Jun 16, 2023
6beb249
Merge branch 'dev' of github.com:safe-global/web-core into epic-tx-flow
katspaugh Jun 16, 2023
6896493
[Tx flow] feat: address input redesign (#2112)
DiogoSoaress Jun 16, 2023
ed25480
[TX flow] feat: confirm/execute title component (#2119)
DiogoSoaress Jun 19, 2023
7b0d350
fix: remove error casting (#2127)
iamacook Jun 20, 2023
3443bfd
fix: execution method style (#2125)
iamacook Jun 20, 2023
d108272
fix: update amount field style (#2124)
iamacook Jun 20, 2023
d884f74
Merge branch 'dev' of github.com:safe-global/web-core into epic-tx-flow
katspaugh Jun 20, 2023
b824d12
Merge branch 'dev' of github.com:safe-global/web-core into epic-tx-flow
katspaugh Jun 20, 2023
c270f11
[TX flow] Send tokens overview (#2136)
usame-algan Jun 20, 2023
23bbb96
[TX flow] style: offchain messages info boxes styles (#2134)
DiogoSoaress Jun 20, 2023
599b707
Feat: editable safeTxGas in Advanced details (#2132)
katspaugh Jun 20, 2023
ae65632
fix: Nonce form (#2120)
usame-algan Jun 20, 2023
9ab5212
[TX flow] style: send token flow (#2126)
DiogoSoaress Jun 20, 2023
b11a5d4
[TX flow] styles: fix send token styles (#2138)
DiogoSoaress Jun 21, 2023
1e2e88c
Small UI tweaks
katspaugh Jun 21, 2023
1b1288f
fix: move default value to placeholder (#2139)
iamacook Jun 21, 2023
82d2ee0
Fix DecodedTx tests
katspaugh Jun 21, 2023
9dc087b
Merge remote-tracking branch 'origin/dev' into epic-tx-flow
usame-algan Jun 21, 2023
434da9f
[TX flow] feat: add owner modal (#2143)
DiogoSoaress Jun 21, 2023
d5e23c1
fix: remove owner flow styling (#2150)
iamacook Jun 22, 2023
a378007
feat: add tooltip to advanced details (#2153)
iamacook Jun 22, 2023
e1227c9
[TX flow] feat: replace owner (#2151)
DiogoSoaress Jun 22, 2023
af3bf94
Align buttons in SignMessage modal
katspaugh Jun 22, 2023
ccf93fd
[TX flow] Display Token balance (#2155)
usame-algan Jun 22, 2023
c0f5fab
Fix: address book entry dialog (#2156)
katspaugh Jun 22, 2023
714fc35
[TX flow] Mobile optimisation (#2154)
usame-algan Jun 23, 2023
f49c17d
Merge branch 'dev' of github.com:safe-global/web-core into epic-tx-flow
katspaugh Jun 23, 2023
1c5163e
Chore: update MUI
katspaugh Jun 23, 2023
83d0c35
fix: Enable spending limit txs in new flow (#2160)
usame-algan Jun 23, 2023
d259685
Adjust review screen design, fix nft link (#2162)
usame-algan Jun 23, 2023
4eae3e6
feat: simulation (#2157)
iamacook Jun 26, 2023
9ffe15b
Fix: hide Edit for safeTxGas when 0 in 1.3.0+ (#2163)
katspaugh Jun 26, 2023
fe673a4
Fix: TxModalDialog zIndex
katspaugh Jun 26, 2023
2013f5f
feat: Move Redefine into new Tx Flow (#2166)
usame-algan Jun 26, 2023
2d6cd18
fix: port balance change (#2172)
iamacook Jun 26, 2023
2cc1c42
Merge branch 'dev' of github.com:safe-global/web-core into epic-tx-flow
katspaugh Jun 27, 2023
367eea6
[TX flow] Replace tx (#2173)
usame-algan Jun 27, 2023
df5730d
fix: update owner management styles (#2174)
iamacook Jun 27, 2023
b0d9964
feat: add confirmation badge to flow (#2183)
iamacook Jun 27, 2023
c97615f
feat: add replacement to transaction status widget (#2184)
iamacook Jun 27, 2023
1da2c1c
Fix: restore tracking of send modals (#2185)
katspaugh Jun 27, 2023
0b21e3f
fix: make balance change more compact (#2186)
iamacook Jun 27, 2023
b553fa8
fix: disable transition + backdrop of modals (#2189)
iamacook Jun 27, 2023
1c42b0a
Fix: tx modal with collapsed sidebar (#2188)
katspaugh Jun 28, 2023
42bf8b3
feat: show alert before closing transaction flow (#2187)
iamacook Jun 28, 2023
b83ed3a
Adjust spending limit ui for new tx flow (#2190)
usame-algan Jun 28, 2023
ad441c9
Adjust Send NFT layout for new tx flow (#2192)
usame-algan Jun 28, 2023
4ac4a0d
Adjust Remove module ui (#2194)
usame-algan Jun 28, 2023
2fac4ca
Fix: autofocus recipient if not set (#2196)
katspaugh Jun 29, 2023
9bfaa87
fix: style new tx modal (#2193)
iamacook Jun 29, 2023
75f142d
[TX flow] Adds nonce validation (#2175)
usame-algan Jun 29, 2023
bd9b5fb
fix: don't warn for send NFTs or tx builder (#2202)
iamacook Jun 29, 2023
b852cd6
feat: add subtitle to confirmation flow (#2204)
iamacook Jun 30, 2023
e791db6
fix: make tx check widgets `sticky` (#2203)
iamacook Jun 30, 2023
741fe5b
Adjust safe apps tx flow ui (#2201)
usame-algan Jun 30, 2023
d60efc9
fix: change threshold flow style + titles (#2208)
iamacook Jun 30, 2023
bf40590
fix: don't rely only on fetch status for error (#2206)
iamacook Jun 30, 2023
179af20
Adjust batch execute ui (#2209)
usame-algan Jul 1, 2023
804cdf7
Adjust icon color for dark mode (#2210)
usame-algan Jul 2, 2023
5a5a733
Merge branch 'dev' of github.com:safe-global/web-core into epic-tx-flow
katspaugh Jul 3, 2023
fc23c8b
Merge branch 'dev' of github.com:safe-global/web-core into epic-tx-flow
katspaugh Jul 3, 2023
7575033
Fix: show an error if risk isn't acknowledged (#2216)
katspaugh Jul 4, 2023
f7d521e
fix: Hide reset nonce button (#2223)
usame-algan Jul 4, 2023
e55c962
fix: Show unlimited approval amount in readonly mode (#2220)
usame-algan Jul 4, 2023
4ab2902
fix: Handle relayed txs and errors in status screen (#2226)
usame-algan Jul 5, 2023
6b19bac
fix: TxFlow submit button alignment, error message spacing (#2227)
usame-algan Jul 5, 2023
55cdf74
fix: Apply input styles to all input fields (#2231)
usame-algan Jul 5, 2023
4e95926
fix: Hide confirmation dialog if set via setTxFlow (#2233)
usame-algan Jul 5, 2023
c9bff78
feat: show redefine warnings on mobile (#2234)
schmanu Jul 5, 2023
7b4f301
fix: remove redundant component (#2241)
iamacook Jul 6, 2023
58291de
fix: Adjust decoded tx ui (#2235)
usame-algan Jul 6, 2023
0e071e6
fix: recipient title alignment (#2240)
iamacook Jul 6, 2023
47c9858
feat: add missing tooltips (#2245)
iamacook Jul 6, 2023
28bffa5
fix: reduce space between name and address (#2239)
iamacook Jul 6, 2023
20b140e
fix: router is undefined when using onboard modal (#2248)
usame-algan Jul 7, 2023
d2b70b3
fix: Update illustration for new tx (#2249)
usame-algan Jul 7, 2023
9baef84
fix: Adjust z-index of new flow (#2250)
usame-algan Jul 7, 2023
699ce67
fix: Write tests for ApprovalEditor (#2243)
usame-algan Jul 7, 2023
7c5cc5f
fix: readonly nonce input (#2247)
schmanu Jul 7, 2023
52c7c4d
fix: remove threshold input when swapping owners (#2253)
schmanu Jul 10, 2023
890b112
feat: add chain indicator (#2242)
iamacook Jul 10, 2023
92c4e87
fix: change simulation title (#2256)
iamacook Jul 10, 2023
13ba925
Small UI adjustments (#2259)
usame-algan Jul 10, 2023
878032e
fix: Show recommended nonce in list (#2260)
usame-algan Jul 10, 2023
3e56abd
fix: Disable submit button for non-owners (#2261)
usame-algan Jul 10, 2023
089e287
fix: Review send NFT view (#2263)
usame-algan Jul 10, 2023
6149335
[TX flow] Merge dev (#2265)
usame-algan Jul 10, 2023
db76669
Merge branch 'dev' into epic-tx-flow
iamacook Jul 10, 2023
6d6859e
[TX flow] Batch execute fixes (#2268)
usame-algan Jul 11, 2023
21878ba
fix: remove unnecessary hook (#2271)
iamacook Jul 11, 2023
57c053f
fix: Sticky close button (#2269)
usame-algan Jul 11, 2023
9792587
fix: Hide approval editor for non-approval transactions (#2262)
usame-algan Jul 11, 2023
cbf8119
Merge branch 'dev' into epic-tx-flow
iamacook Jul 11, 2023
62c740d
fix: Adjust tx flow elements height (#2272)
usame-algan Jul 11, 2023
da39b3d
fix: increase `min-width` of nonce field (#2270)
iamacook Jul 11, 2023
d2113f3
fix: align progress bar with new tx button (#2274)
iamacook Jul 11, 2023
f487649
fix: Align decoded tx ui for batch execute (#2275)
usame-algan Jul 11, 2023
cbb24e3
fix: Validation for spending limits (#2277)
usame-algan Jul 12, 2023
5ceda2e
fix: Hide nonce for spending limit txs (#2278)
usame-algan Jul 12, 2023
476f865
fix: highlight confirmed status when signer confirms
iamacook Jul 12, 2023
66fa81e
fix: Remove step check for confirm highlight
usame-algan Jul 12, 2023
a0eed9f
Merge branch 'dev' into confirmed-status
iamacook Jul 12, 2023
53473b7
fix: highlight confirmed status when signer confirms
iamacook Jul 12, 2023
b0a45e7
Merge branch 'confirmed-status' of github.com:safe-global/web-core in…
iamacook Jul 12, 2023
264824e
chore: Update version to 1.15.0
usame-algan Jul 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"homepage": "https://github.com/safe-global/safe-wallet-web",
"license": "GPL-3.0",
"type": "module",
"version": "1.14.0",
"version": "1.15.0",
"scripts": {
"dev": "next dev",
"start": "next dev",
Expand Down
1 change: 1 addition & 0 deletions src/components/transactions/TxSigners/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export const TxSigners = ({ txDetails, txSummary }: TxSignersProps): ReactElemen

const { confirmations, confirmationsRequired, executor } = detailedExecutionInfo

// TODO: Refactor to use `isConfirmableBy`
const confirmationsCount = confirmations.length
const canExecute = wallet?.address ? isExecutable(txSummary, wallet.address, safe) : false
const confirmationsNeeded = confirmationsRequired - confirmations.length
Expand Down
6 changes: 3 additions & 3 deletions src/components/tx-flow/common/TxStatusWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CreatedIcon from '@/public/images/messages/created.svg'
import SignedIcon from '@/public/images/messages/signed.svg'
import { type TransactionSummary } from '@safe-global/safe-gateway-typescript-sdk'
import useSafeInfo from '@/hooks/useSafeInfo'
import { isMultisigExecutionInfo, isSignableBy } from '@/utils/transaction-guards'
import { isMultisigExecutionInfo, isSignableBy, isConfirmableBy } from '@/utils/transaction-guards'
import classnames from 'classnames'
import css from './styles.module.css'
import CloseIcon from '@mui/icons-material/Close'
Expand Down Expand Up @@ -41,7 +41,7 @@ const TxStatusWidget = ({
const { executionInfo = undefined } = txSummary || {}
const { confirmationsSubmitted = 0 } = isMultisigExecutionInfo(executionInfo) ? executionInfo : {}

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

return (
Expand Down Expand Up @@ -69,7 +69,7 @@ const TxStatusWidget = ({
</ListItemText>
</ListItem>

<ListItem className={classnames({ [css.incomplete]: isConfirmedStepIncomplete && !isBatch })}>
<ListItem className={classnames({ [css.incomplete]: !canConfirm && !isBatch })}>
<ListItemIcon>
<SignedIcon />
</ListItemIcon>
Expand Down
17 changes: 12 additions & 5 deletions src/utils/transaction-guards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@ export const isSignableBy = (txSummary: TransactionSummary, walletAddress: strin
return !!executionInfo?.missingSigners?.some((address) => address.value === walletAddress)
}

export const isConfirmableBy = (txSummary: TransactionSummary, walletAddress: string): boolean => {
if (!txSummary.executionInfo || !isMultisigExecutionInfo(txSummary.executionInfo)) {
return false
}
const { confirmationsRequired, confirmationsSubmitted } = txSummary.executionInfo
return (
confirmationsSubmitted >= confirmationsRequired ||
(confirmationsSubmitted === confirmationsRequired - 1 && isSignableBy(txSummary, walletAddress))
)
}

export const isExecutable = (txSummary: TransactionSummary, walletAddress: string, safe: SafeInfo): boolean => {
if (
!txSummary.executionInfo ||
Expand All @@ -135,11 +146,7 @@ export const isExecutable = (txSummary: TransactionSummary, walletAddress: strin
) {
return false
}
const { confirmationsRequired, confirmationsSubmitted } = txSummary.executionInfo
return (
confirmationsSubmitted >= confirmationsRequired ||
(confirmationsSubmitted === confirmationsRequired - 1 && isSignableBy(txSummary, walletAddress))
)
return isConfirmableBy(txSummary, walletAddress)
}

// Spending limits
Expand Down
Loading