“US had its boats sunken by the Nazi which qualifies as an attack and also Hitler declared war on US.”
If you’re referring to Pearl Harbor, that was actually the Japanese who did that, not the Nazis.
And while he may have declared war on the US in 1939, we didn’t directly fight them until 1941 with Pearl Harbor.
Hitler declared war on US in 1941. And he attacked US shipping in Atlantic.