Commit f1df19e
committed
[TOOL-3689] Dashboard: Keep switch in disabled state if field value is empty in Sponsorship rules form (#6535)
<!-- start pr-codex -->
## PR-Codex overview
This PR focuses on improving the `transformedQueryData` computation by filtering out empty values from the `policy` properties. It enhances data handling for `allowedContractAddresses`, `allowedWallets`, `blockedWallets`, and `allowedChainIds`, ensuring cleaner and more accurate data is returned.
### Detailed summary
- Refactored `transformedQueryData` to filter out empty values from `allowedContractAddresses`, `allowedWallets`, `blockedWallets`, and `allowedChainIds`.
- Simplified return conditions for these properties.
- Changed handling of `allowedChainIds` to return an empty array instead of null to prevent API issues.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->1 parent 9878153 commit f1df19e
File tree
1 file changed
+29
-22
lines changed- apps/dashboard/src/components/smart-wallets/SponsorshipPolicies
1 file changed
+29
-22
lines changedLines changed: 29 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
117 | 127 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 128 | + | |
121 | 129 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 130 | + | |
| 131 | + | |
125 | 132 | | |
126 | 133 | | |
127 | | - | |
128 | | - | |
| 134 | + | |
| 135 | + | |
129 | 136 | | |
130 | 137 | | |
131 | | - | |
132 | | - | |
| 138 | + | |
| 139 | + | |
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
| |||
148 | 155 | | |
149 | 156 | | |
150 | 157 | | |
151 | | - | |
| 158 | + | |
152 | 159 | | |
153 | | - | |
| 160 | + | |
154 | 161 | | |
155 | 162 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 163 | + | |
| 164 | + | |
159 | 165 | | |
160 | 166 | | |
161 | 167 | | |
| |||
212 | 218 | | |
213 | 219 | | |
214 | 220 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
220 | 227 | | |
221 | 228 | | |
222 | 229 | | |
| |||
0 commit comments