package Ġcom . bar is atal ay . y ork iew allet . data . local . dao Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Query Ċ import Ġandroidx . room . Transaction Ċ import Ġcom . bar is atal ay . y ork iew allet . data . local . entity . Token Entity Ċ import Ġio . reactivex . Single Ċ Ċ @ Dao Ċ interface ĠToken Dao Ġ: ĠBase Dao < Token Entity > Ġ{ ĊĠĠĠ Ġ@ Query (" ĠSelect Ġ* Ġfrom ĠToken ĠWhere Ġwallet Address =: wallet Address Ġ") ĊĠĠĠ Ġfun ĠgetToken List ( wallet Address : ĠString ): ĠSingle < List < Token Entity >> ĊĊĠĠĠ Ġ@ Query (" ĠDelete ĠFrom ĠToken ĠWhere Ġwallet Address =: wallet Address Ġand Ġis Main Token <> 1 Ġ") ĊĠĠĠ Ġfun Ġremove Tokens ( wallet Address : ĠString ) ĊĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġfun Ġinsert Before Remove ( wallet Address : ĠString , Ġnew List : ĠList < Token Entity >) Ġ{ ĊĠĠĠĠĠĠĠ Ġremove Tokens ( wallet Address ) ĊĠĠĠĠĠĠĠ Ġinsert ( new List ) ĊĠĠĠ Ġ} Ċ Ċ }