Skip to content

Commit

Permalink
chore(channel/backend.go): Add type assertion check in ToEthParams fu…
Browse files Browse the repository at this point in the history
…nction

Signed-off-by: Ilja von Hoessle <ilja@perun.network>
  • Loading branch information
iljabvh committed Jan 30, 2024
1 parent 51fba1d commit 0948c6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions channel/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ func Verify(addr wallet.Address, s *channel.State, sig wallet.Sig) (bool, error)
func ToEthParams(p *channel.Params) adjudicator.ChannelParams {
var app common.Address
if p.App != nil && !channel.IsNoApp(p.App) {
if p.App != nil && !channel.IsNoApp(p.App) {
appAddr := p.App.Def().(*AppID).Address
app = ethwallet.AsEthAddr(appAddr)
appDef, ok := p.App.Def().(*AppID)
if ok {
app = ethwallet.AsEthAddr(appDef.Address)
}
}

Expand Down

0 comments on commit 0948c6a

Please sign in to comment.