dappros/ethora

View on GitHub

Showing 502 of 8,855 total issues

Function Subscription has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Subscription({}: Props) {
  const [open, setOpen] = React.useState(false);
  const user = useStoreState((state) => state.user);
  const dptBalance = useStoreState((state) =>
    state.balance.find((el) => el.tokenName === "Dappros Platform Token")
Severity: Minor
Found in client-web/src/components/Subscription.tsx - About 1 hr to fix

Method getJSIModulePackage has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  @Override
  protected JSIModulePackage getJSIModulePackage() {
    return new JSIModulePackage() {
      @Override
      public List<JSIModuleSpec> getJSIModules(

Function registerValidSW has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function registerValidSW(swUrl: string, config?: Config) {
  navigator.serviceWorker
    .register(swUrl)
    .then((registration) => {
      registration.onupdatefound = () => {
Severity: Minor
Found in client-web/src/serviceWorkerRegistration.ts - About 1 hr to fix

Function onCropComplete has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function onCropComplete(crop) {
    const canvas = document.createElement("canvas");
    const pixelRatio = window.devicePixelRatio;
    const scaleX = imgRef.current.naturalWidth / imgRef.current.width;
    const scaleY = imgRef.current.naturalHeight / imgRef.current.height;
Severity: Minor
Found in client-web/src/pages/Profile/ChangeImage.tsx - About 1 hr to fix

Function onSubmit has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    onSubmit: async (values) => {
      const signer = library.getSigner();
      try {
        const msg = "Register";
        const signature = await signer.signMessage(msg);
Severity: Minor
Found in client-web/src/pages/Signon/MetamaskModal.tsx - About 1 hr to fix

Function ChangeRoomNameModal has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ChangeRoomNameModal = (props: ChangeRoomNameModalProps) => {
  const {modalVisible, setModalVisible, currentRoomName, changeRoomName} =
    props;

  const [newRoomName, setNewRoomName] = React.useState<string>(currentRoomName);

Function submitMediaMessage has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const submitMediaMessage = (props: any, waveForm?: any) => {
    props.map(async (item: any) => {
      const data = {
        firstName,
        lastName,
Severity: Minor
Found in client-reactnative/src/Screens/Chat/ChatExperimental.tsx - About 1 hr to fix

Function deleteItem has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const deleteItem = async () => {
    setLoading(true);
    try {
      if (item?.isCollection) {
        await httpPost(
Severity: Minor
Found in client-reactnative/src/Screens/Profile/NftItemHistoryScreen.tsx - About 1 hr to fix

Function openPrivateRoom has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const openPrivateRoom = () => {
    createPrivateChat(
      user.walletAddress,
      message.data.senderWalletAddress,
      user.firstName,
Severity: Minor
Found in client-web/src/components/Chat/ChatTransferDialog.tsx - About 1 hr to fix

Function addNewItemHandler has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const addNewItemHandler = (data) => {
    console.log('=> addNewItemHandler || Message received from ', data.receiver, data.message);
    let currentButtonType = userData('getData', data.userJID, null, 'buttonType');

    setAnswer(0, data.message, data.userJID, currentButtonType).then(() => {
Severity: Minor
Found in bots/merchantBot/handlers/addNewItem.js - About 1 hr to fix

Function handleSendMessage has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleSendMessage = (messageString: any) => {
    if (isEditing) {
      const messageText = messageString[0].text;
      const tokenAmount = messageString[0].tokenAmount || 0;
      const receiverMessageId = messageString[0].receiverMessageId || 0;
Severity: Minor
Found in client-reactnative/src/Screens/Chat/ChatExperimental.tsx - About 1 hr to fix

Function processingHandler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const processingHandler = (data) => {
    console.log('=> processingHandler || Message received from ', data.receiver, data.message);
    let currentButtonType = userData('getData', data.userJID, null, 'buttonType');
    getListAnswersInGroup(data.receiverData.attrs.senderJID, currentButtonType).then(answerList => {

Severity: Minor
Found in bots/merchantBot/handlers/processing.js - About 1 hr to fix

Function storeItemHandler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const storeItemHandler = (data) => {
    console.log('=> storeItemHandler | Message received from ', data.receiver, data.message);
    userPaymentVerify(data, botOptions.botData.storeFee).then(response => {
        if (!response) {
            return sendMessage(
Severity: Minor
Found in bots/huthut/handlers/storeItem.js - About 1 hr to fix

Function changeRoomIcon has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const changeRoomIcon = async (file: File) => {
    const formData = new FormData();
    formData.append("files", file);
    setLoading("chatIcon");
    try {
Severity: Minor
Found in client-web/src/pages/ChatRoomDetails/ChatAvatar.tsx - About 1 hr to fix

Function Blocking has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const Blocking = (props: BlockingProps) => {
  const blacklist = useStoreState((store) => store.blackList);

  const handleRemoveUserFromBlackList = (userId: string) => {
    console.log(userId);
Severity: Minor
Found in client-web/src/pages/Privacy/Blocking.tsx - About 1 hr to fix

Function transferTokens has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const transferTokens = async (tokenAmount: number) => {
    if (tokenAmount <= 0) {
      showError('Error', 'Amount must be greater than 0');
      return;
    }

Function handleBanUser has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleBanUser = (name: string, senderName: string) => {
    const bannedUserWalletAddres = underscoreManipulation(
      dataForTransfer?.walletFromJid,
    );
    const senderWalletAddres = underscoreManipulation(

Function addReferral has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const addReferral = async () => {
    if (!code) {
      showError('Error', 'Please, fill the code');
      return;
    }
Severity: Minor
Found in client-reactnative/src/Screens/EnterInviteCodeScreen.tsx - About 1 hr to fix

Function deployNfmt has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

  type: string,
  name: string,
  description: string,
  owner: string,
  beneficiaries: string[],
Severity: Major
Found in bots/createBot/src/api.ts - About 1 hr to fix

Function deployNfmt has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

  type: string,
  name: string,
  description: string,
  owner: string,
  beneficiaries: string[],
Severity: Major
Found in bots/exportToUSDC/src/api.ts - About 1 hr to fix
Severity
Category
Status
Source
Language