Skip to content

Commit 33a01b9

Browse files
bmzigjxom
andauthored
fix(op-stack): unproven is contextually a ready-to-prove case (#3545)
* fix(op-stack): `unproven` is contextually a ready-to-prove case Signed-off-by: bennett <[email protected]> * Create olive-kings-burn.md --------- Signed-off-by: bennett <[email protected]> Co-authored-by: jxom <[email protected]>
1 parent 5055c1c commit 33a01b9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.changeset/olive-kings-burn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": patch
3+
---
4+
5+
**OP Stack:** Fixed `Unproven` case.

src/op-stack/actions/getWithdrawalStatus.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,14 @@ export async function getWithdrawalStatus<
284284
// All potential error causes listed here, can either be the error string or the error name
285285
// if custom error types are returned.
286286
const errorCauses = {
287-
'waiting-to-prove': ['Unproven'],
288287
'ready-to-prove': [
289288
'OptimismPortal: invalid game type',
290289
'OptimismPortal: withdrawal has not been proven yet',
291290
'OptimismPortal: withdrawal has not been proven by proof submitter address yet',
292291
'OptimismPortal: dispute game created before respected game type was updated',
293292
'InvalidGameType',
294293
'LegacyGame',
294+
'Unproven',
295295
],
296296
'waiting-to-finalize': [
297297
'OptimismPortal: proven withdrawal has not matured yet',
@@ -306,10 +306,6 @@ export async function getWithdrawalStatus<
306306
error.cause.data?.errorName,
307307
error.cause.data?.args?.[0] as string,
308308
]
309-
if (
310-
errorCauses['waiting-to-prove'].some((cause) => errors.includes(cause))
311-
)
312-
return 'waiting-to-prove'
313309
if (errorCauses['ready-to-prove'].some((cause) => errors.includes(cause)))
314310
return 'ready-to-prove'
315311
if (

0 commit comments

Comments
 (0)