Commit 196105e
authored
feat(WalletLink): unset default wallet on removal of linked wallet (#4521)
### Description
This PR modifies the wallet link removal behavior to automatically unset
the default wallet when it's being removed, rather than preventing the
removal. This improves user experience by allowing wallet removal
operations to proceed without requiring a separate step to unset the
default wallet first.
### Changes
- Modified `WalletLinkBase.sol` to automatically unset the default
wallet when it's being removed instead of reverting with
`WalletLink__CannotRemoveDefaultWallet`
- Added an event emission for `SetDefaultWallet` when the default wallet
is automatically unset
- Added test cases to verify the new behavior for both `removeLink` and
`removeCallerLink` functions
### Checklist
- [x] Tests added where required
- [x] Documentation updated where applicable
- [x] Changes adhere to the repository's contribution guidelines1 parent 32382c7 commit 196105e
File tree
2 files changed
+55
-4
lines changed- packages/contracts
- src/factory/facets/wallet-link
- test/factory/wallet-link
2 files changed
+55
-4
lines changedLines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
249 | | - | |
| 250 | + | |
250 | 251 | | |
251 | | - | |
| 252 | + | |
| 253 | + | |
252 | 254 | | |
253 | 255 | | |
254 | 256 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
391 | 392 | | |
392 | 393 | | |
393 | 394 | | |
| |||
875 | 876 | | |
876 | 877 | | |
877 | 878 | | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
878 | 906 | | |
879 | 907 | | |
880 | 908 | | |
| |||
898 | 926 | | |
899 | 927 | | |
900 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
901 | 950 | | |
902 | 951 | | |
903 | 952 | | |
| |||
0 commit comments