By default, typeorm doesn't handle parallel transactions. If you run two transactions simultaneously and your database doesn't support it (e.g. if you use sqlite), you will get errors.
npm:
npm i @rosen-bridge/extended-typeorm
yarn:
yarn add @rosen-bridge/extended-typeorm
import { DataSource } from '@rosen-bridge/extended-typeorm';
const dataSource = DataSource({
...
})
Now all database transaction execute correctly without throwing an error, no matter if you call them simultaneously or not.