Would the right move have been to see the value you could give to the client, and charge more at that point for an additional service to capture some of this value?
People joke developers are a very special breed of deer easy to get scared and lose focus when working. Tell you from experience, clients of developers are the same, but in their case you lose their wallet / business they bring. Personally I prefer to have long-term relation to my clients.