Stefan 87ce6cfbcd feat(wallet) filter activity by status
Main changes:

- extend DB query include status for transactions and pending_transactions
- extend DB query to aggregate data from complex activity entries
- extend tests to include the new status values

Other changes:

- Improve tests with mocked addresses in DB to have a true to/from state

Update status-desktop #10746
2023-06-10 11:43:00 +02:00

20 lines
391 B
Go

package accounts
import (
"database/sql"
"testing"
"github.com/stretchr/testify/require"
)
func MockTestAccounts(t *testing.T, db *sql.DB, accounts []*Account) {
d, err := NewDB(db)
require.NoError(t, err)
err = d.SaveOrUpdateAccounts(accounts)
require.NoError(t, err)
res, err := d.GetAccounts()
require.NoError(t, err)
require.Equal(t, accounts[0].Address, res[0].Address)
}