To avoid cyclic dependencies, these files must **not** reference each other. Instead, other operations should only be accessed via injected dependencies.
Many operations in the wallet are automatically retried when they fail or when the wallet
is still waiting for some external condition (such as a wire transfer to the exchange).
Retries are generally controlled by a "retryInfo" field in the corresponding database record. This field is set to undefined when no retry should be scheduled.
Generally, the code to process a pending operation should first increment the
retryInfo (and reset the lastError) and then process the operation. This way,
it is impossble to forget incrementing the retryInfo.