Amalek: Blurring the Terms

Right after the commandment to have just weights and measures comes the Parsha of destroying Amalek. What is the connection? Why does the Torah use the term tzedek in the context of honest measurements?