Commit e5c762d
authored
refactor: improve tx waiting, fees, and compatibility (#101)
* *Improves tx waiting, fees, and compatibility
*Clarifies transaction lifecycle handling so sends can return on submission by default or wait for inclusion or finalization, with more accurate status reporting and safer post-submit behavior.
*Improves transfer safety by parsing decimal amounts exactly, estimating fees before send and batch operations, and checking balances against amount, tip, and fee needs to avoid misleading success paths.
*Tightens compatibility checks to require matching runtime and transaction versions, updates regeneration guidance and usage docs, and removes wallet debug output while rejecting duplicate developer wallet creation.
* *fmt
* fix: address Nikolaus PR review comments
* *fix cargo audit issue
* *Improves transfer validation and address handling
*Centralizes balance and fee checks so single and batch transfers report shortages more consistently and avoid duplicated overflow logic.
*Adds shared address-to-account conversion for transfer and recovery commands, reducing repeated parsing code and keeping wallet-name resolution consistent.
*Refactors transaction status watching into smaller helpers for clearer success and failure handling, and separates finalization from the generic wait flag.
* *fmt1 parent f387b41 commit e5c762d
13 files changed
Lines changed: 1052 additions & 458 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
173 | | - | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | | - | |
| 185 | + | |
185 | 186 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
209 | 201 | | |
210 | 202 | | |
211 | 203 | | |
212 | 204 | | |
213 | 205 | | |
214 | 206 | | |
215 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
216 | 215 | | |
217 | 216 | | |
218 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
374 | 380 | | |
375 | 381 | | |
376 | 382 | | |
377 | 383 | | |
378 | 384 | | |
379 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
380 | 393 | | |
381 | 394 | | |
382 | 395 | | |
383 | 396 | | |
384 | 397 | | |
385 | | - | |
| 398 | + | |
386 | 399 | | |
387 | 400 | | |
388 | 401 | | |
| |||
509 | 522 | | |
510 | 523 | | |
511 | 524 | | |
512 | | - | |
| 525 | + | |
513 | 526 | | |
514 | 527 | | |
515 | 528 | | |
| |||
820 | 833 | | |
821 | 834 | | |
822 | 835 | | |
| 836 | + | |
823 | 837 | | |
824 | 838 | | |
825 | 839 | | |
826 | 840 | | |
827 | 841 | | |
828 | 842 | | |
| 843 | + | |
829 | 844 | | |
830 | 845 | | |
831 | 846 | | |
| |||
849 | 864 | | |
850 | 865 | | |
851 | 866 | | |
| 867 | + | |
852 | 868 | | |
853 | 869 | | |
854 | 870 | | |
855 | | - | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
| 40 | + | |
0 commit comments