Commit 7468d6ac authored by Son of Odin's avatar Son of Odin

check for ok

parent 39406249
Pipeline #128604004 passed with stages
in 30 minutes and 34 seconds
......@@ -166,13 +166,15 @@ func (vm *VaultMgr) EndBlock(ctx sdk.Context, version semver.Version, constAcces
},
Memo: NewMigrateMemo(ctx.BlockHeight()).String(),
}
_, err = txOutStore.TryAddTxOutItem(ctx, toi)
ok, err := txOutStore.TryAddTxOutItem(ctx, toi)
if err != nil {
return err
}
vault.PendingTxCount += 1
if err := vm.k.SetVault(ctx, vault); err != nil {
return fmt.Errorf("fail to save vault: %w", err)
if ok {
vault.PendingTxCount += 1
if err := vm.k.SetVault(ctx, vault); err != nil {
return fmt.Errorf("fail to save vault: %w", err)
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment