/* Ċ Ġ* ĠCopyright Ġ 2 0 2 2 ĠP era ĠWallet , ĠL DA Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense Ċ Ġ*/ Ċ Ċ package Ġcom . al gor and . android . utils . wallet connect Ċ Ċ import Ġcom . al gor and . android . R Ċ import Ġcom . al gor and . android . models . Annotated String Ċ import Ġcom . al gor and . android . models . Base Wallet Connect Transaction Ċ import Ġcom . al gor and . android . models . Wallet Connect Sign Result Ċ import Ġcom . al gor and . android . models . Wallet Connect Signer Ċ import Ġcom . al gor and . android . models . Wallet Connect Transaction Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠWallet Connect Sign Validator Ġ@ Inject Ġconstructor () Ġ{ ĊĊĠĠĠ Ġfun Ġcan Transaction Be Signed ( transaction : ĠWallet Connect Transaction ): ĠWallet Connect Sign Result Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġwith ( transaction ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwhen Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġare There Any Mult is ig Transaction ( transaction List ) Ġ-> Ġon Mult is ig Transaction Found () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġare There Any Un sign able Transaction ( transaction List ) Ġ-> Ġon Un sign able Transaction Found () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġelse Ġ-> ĠWallet Connect Sign Result . Can Be Signed ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġon Un sign able Transaction Found (): ĠWallet Connect Sign Result . Error Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠWallet Connect Sign Result . Error . Defined ( Annotated String ( R . string . the _ requested _ operation _ and )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġon Mult is ig Transaction Found (): ĠWallet Connect Sign Result . Error Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠTODO ĠChange Ġerror Ġres Ġid ĊĠĠĠĠĠĠĠ Ġreturn ĠWallet Connect Sign Result . Error . Defined ( Annotated String ( R . string . the _ wallet _ does _ not _ support )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġare There Any Un sign able Transaction ( grouped Txn List : ĠList < List < Base Wallet Connect Transaction >> ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġgrouped Txn List . flatten (). any Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . signer Ġis ĠWallet Connect Signer . Un sign able ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġare There Any Mult is ig Transaction ( grouped Txn List : ĠList < List < Base Wallet Connect Transaction >> ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġgrouped Txn List . flatten (). any Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . signer Ġis ĠWallet Connect Signer . Mult is ig ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ