There look to be two issues here:
- You are listening for a transaction ID that you never submit, so no commit will ever occur.
- You are attaching your commit listener after the commit has occurred so it will already have missed the event.
Calling contract.submitTransaction() submits a new transaction, with a different transaction ID to the one you created when you called contract.createTransaction(). You are never calling transaction.submit() so the transaction ID you are listening for is never submitted.
By default, submit already waits for commit events before returning. You attach your commit listener after submit has returned so, even if you were listening for the correct transaction ID, you will have missed the commit by the time you attach the listener.
I suggest you either:
- Don't bother with your own commit listener since submit is already doing that work for you; or
- Only if you have configured the Gateway not to wait for commit events on submit, attach your commit listener with the correct transaction ID before calling transaction.submit().