Skip to content

Commit

Permalink
fix: fpac sdk bug (#9367)
Browse files Browse the repository at this point in the history
Fixes a small bug in the SDK that could cause an error if there
aren't any games yet.
  • Loading branch information
smartcontracts committed Feb 5, 2024
1 parent 256b4e4 commit d99d425
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/modern-owls-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/sdk': patch
---

Fixes a bug in the SDK for finalizing fpac withdrawals.
2 changes: 1 addition & 1 deletion packages/sdk/src/cross-chain-messenger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ export class CrossChainMessenger {
const latestGames =
await this.contracts.l1.DisputeGameFactory.findLatestGames(
gameType,
gameCount.sub(1),
Math.max(0, gameCount.sub(1).toNumber()),
Math.min(100, gameCount.toNumber())
)

Expand Down

0 comments on commit d99d425

Please sign in to comment.