Skip to content

Commit

Permalink
fix(channel/backend.go): Implement panic if AppID typecheck fails
Browse files Browse the repository at this point in the history
Signed-off-by: Ilja von Hoessle <[email protected]>
  • Loading branch information
iljabvh committed Jan 30, 2024
1 parent 0948c6a commit 263ecd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions channel/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ func ToEthParams(p *channel.Params) adjudicator.ChannelParams {
var app common.Address
if p.App != nil && !channel.IsNoApp(p.App) {
appDef, ok := p.App.Def().(*AppID)
if ok {
app = ethwallet.AsEthAddr(appDef.Address)
if !ok {
panic("appDef is not of type *AppID")
}
app = ethwallet.AsEthAddr(appDef.Address)
}

return adjudicator.ChannelParams{
Expand Down

0 comments on commit 263ecd6

Please sign in to comment.