addContact method

Future<EthWalletData> addContact(
  1. KeyringEVM keyring,
  2. Map acc
)

Add a contact.

Implementation

Future<EthWalletData> addContact(KeyringEVM keyring, Map acc) async {
  // save keystore to storage
  await keyring.store.addContact(acc);

  await updateIconsMap(keyring, [acc['address']]);

  return keyring.contacts.firstWhere((e) => e.address == acc['address']);
}