fix: Add network id for multi tx (#4199)

This commit is contained in:
Cuteivist 2023-10-30 10:03:29 +01:00 committed by GitHub
parent fa5765cf83
commit 3c5b0529c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -309,6 +309,9 @@ func (tm *TransactionManager) CreateMultiTransactionFromCommand(ctx context.Cont
for _, tx := range data {
chainIDs = append(chainIDs, tx.ChainID)
}
if multiTransaction.Type == MultiTransactionSend && multiTransaction.FromNetworkID == 0 && len(chainIDs) == 1 {
multiTransaction.FromNetworkID = chainIDs[0]
}
multiTransactionID, err := tm.insertMultiTransactionAndNotify(tm.db, multiTransaction, chainIDs)
if err != nil {
return nil, err