package Ġcom . waves platform . wallet . v 2 . ui . home . dex . trade . my _ orders Ċ Ċ import Ġcom . ch ad . library . adapter . base . Base Quick Adapter Ċ import Ġcom . ch ad . library . adapter . base . Base ViewHolder Ċ import Ġcom . waves platform . wallet . R Ċ import Ġcom . waves platform . wallet . v 1 . util . Money Util Ċ import Ġcom . waves platform . wallet . v 2 . data . model . local . Order Status Ċ import Ġcom . waves platform . wallet . v 2 . data . model . remote . response . Market Response Ċ import Ġcom . waves platform . wallet . v 2 . data . model . remote . response . Order Response Ċ import Ġcom . waves platform . wallet . v 2 . util . strip Z eros Ċ import Ġpy x is . uz uki . live . rich util sk t . utils . as DateString Ċ import Ġjava . math . BigInteger Ċ import Ġjava . util .* Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠTrade My Orders Adapter Ġ@ Inject Ġconstructor () Ġ: ĠBase Quick Adapter < Order Response , ĠBase ViewHolder >( R . layout . recycle _ item _ my _ orders , Ġnull ) Ġ{ ĊĠĠĠ Ġvar Ġmarket : ĠMarket Response Ġ= ĠMarket Response () ĊĊĠĠĠ Ġoverride Ġfun Ġconvert ( helper : ĠBase ViewHolder , Ġitem : ĠOrder Response ) Ġ{ ĊĠĠĠĠĠĠĠ Ġhelper ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setText ( R . id . text _ side , ĠmContext . getString ( item . getType (). type UI )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setText ( R . id . text _ price , ĠMoney Util . getS ca led Price ( item . price , Ġmarket . amount Asset Decimal s , Ġmarket . price Asset Decimal s ). strip Z eros ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setText ( R . id . text _ date , Ġitem . timestamp . as DateString (" dd . MM . yy ")) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setText ( R . id . text _ time , Ġitem . timestamp . as DateString (" HH : mm : ss ")) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setText ( R . id . text _ amount , ĠMoney Util . getS ca led Text ( item . amount , Ġmarket . amount Asset Decimal s ). strip Z eros ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setText ( R . id . text _ sum , ĠMoney Util . getText Strip Z eros ( BigInteger . valueOf ( item . amount ). multiply ( BigInteger . valueOf ( item . price )). divide ( BigInteger . valueOf ( 1 0 0 0 0 0 0 0 0 )). to Long (), Ġmarket . price Asset Decimal s ). strip Z eros ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setText ( R . id . text _ status , ĠmContext . getString ( item . getStatus (). status )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setText ( R . id . text _ failed _ value , ĠMoney Util . getText Strip Z eros ( Money Util . getText Strip Z eros ( item . filled , Ġmarket . amount Asset Decimal s ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setVisible ( R . id . text _ failed _ value , ĠArrays . asList ( Order Status . Filled , ĠOrder Status . Cancelled , ĠOrder Status . Part ially Filled ). contains ( item . getStatus ())) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setTextColor ( R . id . text _ side , Ġitem . getType (). color ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add OnClickListener ( R . id . image _ delete ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setVisible ( R . id . relative _ cancel _ block , Ġ! Arrays . asList ( Order Status . Filled , ĠOrder Status . Cancelled ). contains ( item . getStatus ())) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setTextColor ( R . id . text _ price , Ġitem . getType (). color ) ĊĠĠĠ Ġ} Ċ } Ċ