def _offchain_action_review_kyc_data( self, account_id: str, cmd: offchain.PaymentCommand) -> offchain.Command: op_kyc_data = cmd.counterparty_actor_obj().kyc_data if op_kyc_data is None or self.app.kyc_sample.match_kyc_data( "soft_reject", op_kyc_data): return self._new_reject_kyc_data( cmd, "KYC data review result is reject") return self._ready_for_settlement(account_id, cmd)
def _offchain_action_evaluate_kyc_data( self, account_id: str, cmd: offchain.PaymentCommand) -> offchain.Command: op_kyc_data = cmd.counterparty_actor_obj().kyc_data if op_kyc_data is None or self.app.kyc_sample.match_kyc_data( "reject", op_kyc_data): return self._new_reject_kyc_data(cmd, "KYC data is rejected") elif self.app.kyc_sample.match_any_kyc_data( ["soft_match", "soft_reject"], op_kyc_data): return cmd.new_command(status=Status.soft_match) elif self.app.kyc_sample.match_kyc_data("minimum", op_kyc_data): return self._ready_for_settlement(account_id, cmd) else: return self._new_reject_kyc_data(cmd, "KYC data is not from samples")