fix: issues after rebase fixed

This commit is contained in:
Sale Djenic 2023-05-24 09:32:11 +02:00 committed by saledjenic
parent b16a38408a
commit 0eca7f5088
3 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ func AddTestAccounts(t *testing.T, db *sql.DB, accounts []*Account) {
d, err := NewDB(db)
require.NoError(t, err)
err = d.SaveAccounts(accounts)
err = d.SaveOrUpdateAccounts(accounts)
require.NoError(t, err)
res, err := d.GetAccounts()
require.NoError(t, err)

View File

@ -212,7 +212,7 @@ const (
? AS includeAllNetworks
),
filter_addresses(address) AS (
SELECT HEX(address) FROM accounts WHERE (SELECT filterAllAddresses FROM filter_conditions) != 0
SELECT HEX(address) FROM keypairs_accounts WHERE (SELECT filterAllAddresses FROM filter_conditions) != 0
UNION ALL
SELECT * FROM (VALUES %s) WHERE (SELECT filterAllAddresses FROM filter_conditions) = 0
),

View File

@ -179,8 +179,8 @@ func TestGetActivityEntriesWithSameTransactionForSenderAndReceiverInDB(t *testin
// add accounts to DB for proper detection of sender/receiver in all cases
accounts.AddTestAccounts(t, db, []*accounts.Account{
{Address: types.Address(td.tr1.From), Chat: false, Wallet: true},
{Address: types.Address(receiverTr.From)},
{Address: types.Address(td.tr1.From), Type: accounts.AccountTypeWatch},
{Address: types.Address(receiverTr.From), Type: accounts.AccountTypeWatch},
})
entries, err = GetActivityEntries(db, []eth.Address{}, []common.ChainID{}, filter, 0, 10)