From f0473bcef3adc04d681c3a50b51a1126448c15b6 Mon Sep 17 00:00:00 2001 From: Jorge Silva Date: Wed, 21 Feb 2024 11:40:39 +0000 Subject: [PATCH] remove migration sanity check --- packages/legacymigration/impl.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/legacymigration/impl.go b/packages/legacymigration/impl.go index 0e44680faf..8c54c32aa8 100644 --- a/packages/legacymigration/impl.go +++ b/packages/legacymigration/impl.go @@ -109,18 +109,6 @@ func migrate(ctx isc.Sandbox) dict.Dict { TargetAddress: targetAddress, Assets: isc.NewAssetsBaseTokens(tokensToMigrate), }) - - // in theory the code below is not needed, but let's keep for now as a sanity check - { - totalAmount := getTotalAmount(ctx.State()) - totalAmount -= tokensToMigrate - setTotalAmount(ctx.State(), totalAmount) - calculatedAmount := calcTotalAmount(ctx.State()) - // assert the total migration funds is still correct - ctx.Requiref(calculatedAmount == totalAmount, "inconsistency in migrated funds totals") - ctx.Requiref(ctx.BalanceBaseTokens() >= totalAmount, "inconsistency in migrated funds balance") - } - return nil }