Commit f20df11
fix: resolve critical bugs in config, transactions, and UI
This commit fixes several critical bugs discovered during testing:
## Bug Fixes
### 1. Config chains edit/add removes transactionServiceUrl
- **Problem:** When editing or adding chains, the transactionServiceUrl and contractNetworks fields were being removed from all chains
- **Fix:** Updated editChains() to preserve all ChainConfig fields when saving
- **Fix:** Added prompt for transactionServiceUrl when adding new chains
- **Files:** src/commands/config/chains.ts, src/commands/config/edit.ts
### 2. Transaction list shows "Signatures: 0/undefined"
- **Problem:** Threshold was showing as "undefined" because it was stored locally but could become stale when changed on-chain
- **Fix:** Changed architecture to always fetch threshold and owners fresh from blockchain via RPC instead of storing them
- **Files:** Multiple tx commands (sign, execute, status, create, etc.)
### 3. Transaction sign fails with "Cannot read properties of null"
- **Problem:** Multiple sources of null values causing crashes:
- transaction.signatures array could be null for legacy transactions
- metadata.value, metadata.data, metadata.operation could be null
- **Fix:** Added normalization layer in TransactionStore to ensure signatures array is always initialized
- **Fix:** Added default values for metadata fields in signTransaction() and executeTransaction()
- **Fix:** Protected all array method calls with optional chaining and fallbacks
- **Files:** src/storage/transaction-store.ts, src/services/transaction-service.ts, all tx commands
### 4. Duplicate variable declarations in create.ts
- **Problem:** Duplicate chain and spinner variable declarations causing compilation errors
- **Fix:** Removed duplicate chain declaration and renamed second spinner to spinner2
- **File:** src/commands/tx/create.ts
## UI Improvements
### Update Safe Transaction Service link to Safe Wallet
- Changed "View on Safe Transaction Service" to "View in Safe Wallet"
- Updated URL format to use Safe Wallet app: https://app.safe.global/transactions/tx
- **Files:** src/ui/screens/TransactionPushSuccessScreen.tsx, src/commands/tx/push.ts
## Technical Details
- All commands now fetch owners/threshold from blockchain for accuracy
- Transaction storage now normalizes data on retrieval
- All array operations protected against null/undefined values
- Metadata fields have safe defaults
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 14086a2 commit f20df11
File tree
17 files changed
+304
-147
lines changed- src
- commands
- account
- config
- tx
- services
- storage
- ui/screens
17 files changed
+304
-147
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
94 | 117 | | |
95 | 118 | | |
96 | 119 | | |
97 | 120 | | |
98 | | - | |
| 121 | + | |
| 122 | + | |
99 | 123 | | |
100 | 124 | | |
101 | 125 | | |
102 | 126 | | |
103 | 127 | | |
104 | 128 | | |
105 | 129 | | |
106 | | - | |
107 | | - | |
| 130 | + | |
| 131 | + | |
108 | 132 | | |
109 | 133 | | |
110 | 134 | | |
111 | 135 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 136 | + | |
| 137 | + | |
115 | 138 | | |
116 | | - | |
| 139 | + | |
117 | 140 | | |
118 | 141 | | |
119 | 142 | | |
| |||
131 | 154 | | |
132 | 155 | | |
133 | 156 | | |
134 | | - | |
135 | | - | |
| 157 | + | |
| 158 | + | |
136 | 159 | | |
137 | 160 | | |
138 | 161 | | |
| |||
146 | 169 | | |
147 | 170 | | |
148 | 171 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 172 | + | |
| 173 | + | |
159 | 174 | | |
160 | 175 | | |
161 | 176 | | |
| |||
174 | 189 | | |
175 | 190 | | |
176 | 191 | | |
177 | | - | |
| 192 | + | |
178 | 193 | | |
179 | 194 | | |
180 | 195 | | |
181 | 196 | | |
182 | 197 | | |
183 | | - | |
| 198 | + | |
184 | 199 | | |
185 | 200 | | |
186 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
94 | 117 | | |
95 | 118 | | |
96 | 119 | | |
97 | 120 | | |
98 | | - | |
| 121 | + | |
| 122 | + | |
99 | 123 | | |
100 | 124 | | |
101 | 125 | | |
102 | 126 | | |
103 | 127 | | |
104 | 128 | | |
105 | | - | |
| 129 | + | |
106 | 130 | | |
107 | 131 | | |
108 | 132 | | |
| |||
111 | 135 | | |
112 | 136 | | |
113 | 137 | | |
114 | | - | |
| 138 | + | |
115 | 139 | | |
116 | 140 | | |
117 | 141 | | |
| |||
125 | 149 | | |
126 | 150 | | |
127 | 151 | | |
128 | | - | |
| 152 | + | |
129 | 153 | | |
130 | 154 | | |
131 | | - | |
132 | 155 | | |
133 | 156 | | |
134 | 157 | | |
| |||
158 | 181 | | |
159 | 182 | | |
160 | 183 | | |
161 | | - | |
162 | | - | |
163 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
164 | 187 | | |
165 | 188 | | |
166 | 189 | | |
| |||
174 | 197 | | |
175 | 198 | | |
176 | 199 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 200 | + | |
| 201 | + | |
187 | 202 | | |
188 | 203 | | |
189 | 204 | | |
| |||
203 | 218 | | |
204 | 219 | | |
205 | 220 | | |
206 | | - | |
| 221 | + | |
207 | 222 | | |
208 | 223 | | |
209 | 224 | | |
210 | 225 | | |
211 | 226 | | |
212 | | - | |
| 227 | + | |
213 | 228 | | |
214 | 229 | | |
215 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
98 | 112 | | |
99 | 113 | | |
100 | 114 | | |
101 | 115 | | |
102 | 116 | | |
103 | 117 | | |
104 | 118 | | |
| 119 | + | |
105 | 120 | | |
106 | 121 | | |
107 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
166 | 168 | | |
167 | 169 | | |
168 | 170 | | |
| 171 | + | |
| 172 | + | |
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
80 | 100 | | |
81 | 101 | | |
82 | 102 | | |
| |||
108 | 128 | | |
109 | 129 | | |
110 | 130 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 131 | | |
120 | 132 | | |
121 | 133 | | |
122 | 134 | | |
123 | 135 | | |
124 | 136 | | |
125 | | - | |
126 | | - | |
| 137 | + | |
| 138 | + | |
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
130 | | - | |
| 142 | + | |
131 | 143 | | |
132 | | - | |
| 144 | + | |
133 | 145 | | |
134 | 146 | | |
135 | 147 | | |
| |||
0 commit comments