fix globalTransaction empty id issue (#337)

This commit is contained in:
walker-16 2023-05-22 17:30:21 -03:00 committed by GitHub
parent 1a78481b08
commit 878b201259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -572,10 +572,12 @@ func (r *Repository) FindGlobalTransactionByID(ctx context.Context, q *GlobalTra
switch {
case globalTransaction == nil:
result = &GlobalTransactionDoc{
ID: q.id,
OriginTx: originTx,
}
case globalTransaction != nil && globalTransaction.OriginTx == nil:
result = &GlobalTransactionDoc{
ID: q.id,
OriginTx: originTx,
DestinationTx: globalTransaction.DestinationTx,
}