mirror of
https://github.com/status-im/status-go.git
synced 2025-01-16 01:35:10 +00:00
61527f8c78
This is the first step of improvements over keypairs/keycards/accounts. - `SyncKeypairFull` protobuf removed - `SyncKeypair` protobuf is used for syncing all but the watch only accounts - `SyncAccount` is used only for syncing watch only accounts - related keycards are synced together with a keypair - on any keypair change (either it's just a keypair name or any change made over an account which belongs to that keypair) entire keypair is synced including related keycards - on any watch only account related change, that account is synced with all its details
20 lines
398 B
Go
20 lines
398 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, false)
|
|
require.NoError(t, err)
|
|
res, err := d.GetAccounts()
|
|
require.NoError(t, err)
|
|
require.Equal(t, accounts[0].Address, res[0].Address)
|
|
}
|