async def get_current_derivation_record_for_wallet(self, wallet_id: uint32) -> Optional[DerivationRecord]:
    '\n        Returns the current derivation record by derivation_index.\n        '
    cursor = (await self.db_connection.execute(f'SELECT MAX(derivation_index) FROM derivation_paths WHERE wallet_id={wallet_id} and used=1;'))
    row = (await cursor.fetchone())
    (await cursor.close())
    if ((row is not None) and (row[0] is not None)):
        index = uint32(row[0])
        return (await self.get_derivation_record(index, wallet_id))
    return None
Returns the current derivation record by derivation_index.
async def get_current_derivation_record_for_wallet(self, wallet_id: uint32) -> Optional[DerivationRecord]:
    '\n        \n        '
    cursor = (await self.db_connection.execute(f'SELECT MAX(derivation_index) FROM derivation_paths WHERE wallet_id={wallet_id} and used=1;'))
    row = (await cursor.fetchone())
    (await cursor.close())
    if ((row is not None) and (row[0] is not None)):
        index = uint32(row[0])
        return (await self.get_derivation_record(index, wallet_id))
    return None