(value: any)
| 155 | const bigIntFields = field.jsonInterface?.fields.filter((f) => f.type === 'BigInt'); |
| 156 | const nestJsonFields = field.jsonInterface?.fields.filter((f) => f.jsonInterface); |
| 157 | const processBigIntFields = (value: any) => { |
| 158 | if (bigIntFields) { |
| 159 | for (const bigIntField of bigIntFields) { |
| 160 | // If null is passed, we should not convert it to BigInt |
| 161 | if (value[bigIntField.name] !== undefined && value[bigIntField.name] !== null) { |
| 162 | value[bigIntField.name] = BigInt(value[bigIntField.name].slice(0, -1)); |
| 163 | } |
| 164 | } |
| 165 | } |
| 166 | return value; |
| 167 | }; |
| 168 | if (nestJsonFields) { |
| 169 | for (const nestJsonField of nestJsonFields) { |
| 170 | // have a nest field, and nest field is json type, also value is defined |
no test coverage detected