He was getting ready to publish his theory thus forcing Darwin to publish his (incomplete version) first.
I don't think Darwin's theory was incomplete - he was just accumulating masses and masses of evidence, and he was going to publish it soon, really, yes, he really was getting on with it, and the book would be ready some time in the next ten years, well, ten or fifteen...honestly...
Wallace's letter made him get on with publishing his book. Later editions weren't just new print runs, but included more information.
I think that Darwin gets most of the credit because of all the evidence he provided.