Commit fcc286c
committed
Fix struct field name normalization for gas estimation auto-fill
Dedot's SCALE codec normalizes struct field names to camelCase via
stringCamelCase (ref_time → refTime, proof_size → proofSize). Our
codec and auto-fill code was using raw metadata names (snake_case),
causing 'Cannot mix BigInt and other types' encoding errors in the
Information Pane after gas estimation.
Fix at the shared layer:
- Add normalizeFieldName() to lib/codec.ts matching Dedot's convention
- Use it in decomposeArgHex for struct and enum field value lookups
- Simplify gas estimation auto-fill to use camelCase directly1 parent ee246d9 commit fcc286c
2 files changed
Lines changed: 16 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
136 | 118 | | |
137 | 119 | | |
138 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
3 | 11 | | |
4 | 12 | | |
5 | 13 | | |
| |||
541 | 549 | | |
542 | 550 | | |
543 | 551 | | |
544 | | - | |
| 552 | + | |
545 | 553 | | |
546 | 554 | | |
547 | 555 | | |
| |||
577 | 585 | | |
578 | 586 | | |
579 | 587 | | |
580 | | - | |
| 588 | + | |
581 | 589 | | |
582 | 590 | | |
583 | 591 | | |
| |||
0 commit comments