From 20c585a6215259075eca4a432773d0008d4d9068 Mon Sep 17 00:00:00 2001 From: Ivan Belyakov Date: Tue, 5 Sep 2023 13:35:09 +0200 Subject: [PATCH] fix(wallet): new transfers were not loaded in real time --- services/wallet/transfer/commands_sequential.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/wallet/transfer/commands_sequential.go b/services/wallet/transfer/commands_sequential.go index 498018860..fc4717475 100644 --- a/services/wallet/transfer/commands_sequential.go +++ b/services/wallet/transfer/commands_sequential.go @@ -45,14 +45,14 @@ func (c *findNewBlocksCommand) Run(parent context.Context) (err error) { } if blockRange != nil { - c.fromBlockNumber = new(big.Int).Add(blockRange.LastKnown, big.NewInt(1)) + c.fromBlockNumber = blockRange.LastKnown log.Debug("Launching new blocks command", "chainID", c.chainClient.ChainID, "account", c.account, "from", c.fromBlockNumber, "headNum", headNum) // In case interval between checks is set smaller than block mining time, // we might need to wait for the next block to be mined - if c.fromBlockNumber.Cmp(headNum) > 0 { + if c.fromBlockNumber.Cmp(headNum) >= 0 { return }