What happened to make America declare war during war war 2?

Attack on Pearl Harbor.