From a3f1a6e414b38e86df2875d5a89b6412849d138b Mon Sep 17 00:00:00 2001 From: Ilja von Hoessle Date: Mon, 29 Jan 2024 21:11:57 +0100 Subject: [PATCH] chore(channel/backend.go): Add type assertion check in ToEthParams function Signed-off-by: Ilja von Hoessle --- channel/backend.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channel/backend.go b/channel/backend.go index e58ffa6..5ef7d73 100644 --- a/channel/backend.go +++ b/channel/backend.go @@ -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) } }