|
6 | 6 | } from '../dtos/attestation-types/AttestationTypeBase.dto'; |
7 | 7 | import { ABIDefinitions, TypeRecord } from './config-types'; |
8 | 8 | import { |
9 | | - ABIFragment, |
10 | 9 | decodeAttestationName, |
11 | 10 | DEFAULT_ATTESTATION_TYPE_CONFIGS_PATH, |
12 | 11 | readAttestationTypeConfigs, |
@@ -165,15 +164,15 @@ export class AttestationDefinitionStore { |
165 | 164 | throw new Error(`Invalid request ABI`); |
166 | 165 | } |
167 | 166 | const requestBodyAbi = definition.requestAbi.components.find( |
168 | | - (item: ABIFragment) => item.name == 'requestBody', |
169 | | - ) as ABIFragment; |
| 167 | + (item: ParamType) => item.name == 'requestBody', |
| 168 | + ) as ParamType; |
170 | 169 | if (!requestBodyAbi) { |
171 | 170 | throw new Error( |
172 | 171 | `Invalid request ABI for attestation type id: '${request.attestationType}'. No 'requestBody'.`, |
173 | 172 | ); |
174 | 173 | } |
175 | 174 | const abiEncodeBody = this.coder.encode( |
176 | | - [requestBodyAbi as unknown as ParamType], |
| 175 | + [requestBodyAbi], |
177 | 176 | [request.requestBody], |
178 | 177 | ); |
179 | 178 | return ethers.concat([abiEncodePrefix, abiEncodeBody]); |
@@ -218,15 +217,15 @@ export class AttestationDefinitionStore { |
218 | 217 | throw new Error(`Invalid request ABI`); |
219 | 218 | } |
220 | 219 | const requestBodyAbi = definition.requestAbi?.components.find( |
221 | | - (item: ABIFragment) => item.name == 'requestBody', |
222 | | - ) as ABIFragment; |
| 220 | + (item: ParamType) => item.name == 'requestBody', |
| 221 | + ) as ParamType; |
223 | 222 | if (!requestBodyAbi) { |
224 | 223 | throw new Error( |
225 | 224 | `Invalid request ABI for attestation type id: '${prefix.attestationType}'. No 'requestBody'.`, |
226 | 225 | ); |
227 | 226 | } |
228 | 227 | const parsed: unknown = this.coder.decode( |
229 | | - [requestBodyAbi as unknown as ParamType], |
| 228 | + [requestBodyAbi], |
230 | 229 | '0x' + bytes.slice(2 + 3 * 64), |
231 | 230 | )[0]; |
232 | 231 | return serializeBigInts({ |
@@ -255,9 +254,9 @@ export class AttestationDefinitionStore { |
255 | 254 | } |
256 | 255 | const attestationType = decodeAttestationName(request1.attestationType); |
257 | 256 |
|
258 | | - const requestAbi: ABIFragment = this.getDefinitionForDecodedAttestationType( |
| 257 | + const requestAbi: ParamType = this.getDefinitionForDecodedAttestationType( |
259 | 258 | attestationType, |
260 | | - )?.requestAbi as ABIFragment; |
| 259 | + )?.requestAbi as ParamType; |
261 | 260 | if (!requestAbi) { |
262 | 261 | throw new Error(`Unsupported attestation type id: '${attestationType}'`); |
263 | 262 | } |
|
0 commit comments