We show that the consistent completion of an initial scattering diagram in M_R (for a finite rank lattice M) can be expressed quite generally in terms of the Jeffrey-Kirwan residues of certain explicit meromorphic forms, by using the Maurer-Cartan asymptotic analysis developed by Chan-Leung-Ma and Leung-Ma-Young. A similar result holds for the associated theta functions.