If my PI received research grants from a company to be able to pay my postdoc salary, did I have a potential conflict interest too?
Yes, this is a potential conflict of interest. You specifically refer to working on industry-sponsored projects in addition to your salary being paid by an industry sponsor (even if indirectly): both can be perceived as conflicts.
Since your position is contingent on the industry funds, it would be possible for you to lose your position if the sponsor was unhappy with the results you produced.
That doesn't mean your work is by rule dishonest or tainted, but it means that for people to properly interpret the meaning of your work they should be aware of how you were funded: that's the purpose of conflict of interest disclosure. You aren't saying that the work was unethically influenced, but you are allowing others to make that determination on their own.
As @BrianBorchers pointed out in a comment, the importance of this particular conflict depends on the rules for reporting conflicts of interest in whatever context you are talking about. In general, though, it's better to err on the side of disclosure.
To clarify further, if you are asking whether you are legally required to declare a conflict (for example, to abide by US federal law) then your question is probably off-topic for this site and you should instead be consulting with staff and training materials at your university that determine what is a reportable conflict of interest. My answer should be interpreted according to the question you asked, which is whether you had a potential conflict of interest.
In response to your edit, and your comment that indicated you weren't aware of exactly where your funding was coming at the time: I think you can relax a bit and not worry too much about this potential conflict, as long as when you present your research either in talks or in published work that you make sure it is clear that the work itself was funded by an industry sponsor, even if no improper behavior actually occurred. I would definitely put it in a disclosure slide if you are talking about work related to the company that funded you and the work. If you are talking about anything unrelated to that project then I see no need to disclose: you have no continuing ongoing financial interest and there is no conflict of interests on an unrelated project.
Just because you were funded by a grant that was sponsored by an industry, doesn't mean you are in conflict. It is situational. For example, when you publish your results about product/method X being better than product Y, and product X was developed by your funding sponsor, then it is a conflict of interest because it might be perceived as your results being influenced due to your funding. And you have to (should) declare it. Whereas, if you are working on a project looking at something totally unrelated to what company does or produce, then you still declare where your funding came from, but you are not in conflict of interest.
While I continue to disagree that Bryan Krause is necessarily correct and would need much more information on the actual funding chain to make a determination, I will offer the following advice.
Whether or not it is a real conflict of interest, your career would probably be better served by assuming that it is, rather than the opposite. This is, perhaps, an overly conservative approach, but it is safer for you to state it as a possible conflict than to deny that it is unless you can determine otherwise.
Thus, in my view, the theoretical and philosophical view may be in conflict with the practical view, you would be best served by taking a cautious stance. You are the one that is at risk here, not the commentators, so you should protect your reputation as best you can.
Your PI, of course, may have something to say about this issue.
A conflict of interest arises when you receive something of value as an inducement to provide a particular answer in your research, whether that particular answer is specified or not.
One can have an issue, even when doing proper research as exemplified by the following. Suppose a company (say, big tobacco) provides funding for 100 separate statistical studies. In the nature of things, some of those will produce results different from those of the population as a whole, say five of the 100. If you aren't allowed to publish separately, the company can then advertise only those studies which match its desired outcome, even though all 100 researchers carried out their studies completely honestly. In fact, this sort of thing seems to have happened in the past, hence the caution required of honest researchers. You don't even have to "bend to the will" of the funders to have a bad outcome here. Statistics itself leads to such a result unless all of the studies can be published.