From 986c11fb73f516bce27270a18b91b3161260c7b4 Mon Sep 17 00:00:00 2001 From: kehiy Date: Wed, 5 Jul 2023 02:19:21 -0500 Subject: [PATCH] fix: nil curr var --- miner/block.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/miner/block.go b/miner/block.go index 4bf25a548c..9ce32063f4 100644 --- a/miner/block.go +++ b/miner/block.go @@ -384,7 +384,10 @@ func createConversionFunctions(sysCtx *core.SysContractCallCtx, chain *core.Bloc } toCeloFn := func(amount *big.Int, feeCurrency *common.Address) *big.Int { curr, _ := currencyManager.GetCurrency(feeCurrency) - return curr.ToCELO(amount) + if curr != nil { + return curr.ToCELO(amount) + } + return nil } return baseFeeFn, toCeloFn