It's up to you which would you like to attend...
Either you give a token bai jin to the wake and attend the wedding
dinner, or attend the wake and give a ang bao to the wedding
dinner...
Or as last resort if both are closely related to you, attend the
wedding dinner first, then attend the wake after the dinner...