Skip to content

Commit

Permalink
[Fixed] Merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
greedyboi committed Feb 8, 2024
1 parent 165fa15 commit 615692b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/drops/components/CsvFileInput/CsvFileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useDropzone, ErrorCode } from 'react-dropzone';
import Papa from 'papaparse';
import { LumConstants, LumUtils } from '@lum-network/sdk-javascript';
import { LUM_DENOM, MICRO_LUM_DENOM, convertUnit } from '@lum-network/sdk-javascript';

import Assets from 'assets';
import { Card } from 'components';
import { WalletUtils } from 'utils';

import './CsvFileInput.scss';

Expand Down Expand Up @@ -74,13 +75,13 @@ const CsvFileInput = (props: CsvFileInputProps): JSX.Element => {
break;
}

if (!LumUtils.isAddressValid(winnerAddress, 'lum')) {
if (!WalletUtils.isAddressValid(winnerAddress, 'lum')) {
error = t('depositDrops.depositFlow.fileInputSubLabel.invalidAddress', { row: i + 1 });
break;
}

drops.push({
amount: LumUtils.convertUnit({ amount: amount, denom: LumConstants.LumDenom }, LumConstants.MicroLumDenom),
amount: convertUnit({ amount: amount, denom: LUM_DENOM }, MICRO_LUM_DENOM),
winnerAddress,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const CancelDropModal = ({ deposits, limit }: { deposits?: DepositModel[]; limit
const modalRef = useRef<React.ElementRef<typeof Modal>>(null);

const isLoading = useSelector((state: RootState) => state.loading.effects.wallet.cancelDrop);
const pool = useSelector((state: RootState) => state.pools.pools.find((p) => (deposits && deposits.length > 0 ? p.poolId.eq(deposits[0]?.poolId) : undefined)));
const pool = useSelector((state: RootState) => state.pools.pools.find((p) => (deposits && deposits.length > 0 ? p.poolId === deposits[0]?.poolId : undefined)));

const dispatch = useDispatch<Dispatch>();
const steps = I18n.t('depositDrops.cancelDropModal.steps', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useEffect, useRef, useState } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { LumUtils } from '@lum-network/sdk-javascript';

import Assets from 'assets';

Expand All @@ -18,7 +17,7 @@ const EditDepositModal = ({ deposit }: { deposit: DepositModel | null }) => {
const modalRef = useRef<React.ElementRef<typeof Modal>>(null);

const isLoading = useSelector((state: RootState) => state.loading.effects.wallet.editDrop);
const pool = useSelector((state: RootState) => state.pools.pools.find((p) => (deposit ? p.poolId.eq(deposit.poolId) : undefined)));
const pool = useSelector((state: RootState) => state.pools.pools.find((p) => (deposit ? p.poolId === deposit.poolId : undefined)));

const dispatch = useDispatch<Dispatch>();
const steps = I18n.t('depositDrops.editDropModal.steps', {
Expand Down Expand Up @@ -53,7 +52,7 @@ const EditDepositModal = ({ deposit }: { deposit: DepositModel | null }) => {
const onAddressChange = (newAddress: string) => {
setAddress(newAddress);

if (newAddress && !LumUtils.isAddressValid(newAddress)) {
if (newAddress && !WalletUtils.isAddressValid(newAddress)) {
setAddressError(I18n.t('errors.generic.invalid', { field: 'lum address' }));
} else if (newAddress === deposit?.winnerAddress) {
setAddressError(I18n.t('depositDrops.editDropModal.sameAddressError'));
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MySavings/MySavings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const MySavings = () => {
useSelector((state: RootState) => ({
lumWallet: state.wallet.lumWallet,
otherWallets: state.wallet.otherWallets,
balances: state.wallet.lumWallet?.balances.filter((balance) => state.pools.pools.find((pool) => pool.nativeDenom === balance.denom) || balance.denom === LumConstants.MicroLumDenom),
balances: state.wallet.lumWallet?.balances.filter((balance) => state.pools.pools.find((pool) => pool.nativeDenom === balance.denom) || balance.denom === MICRO_LUM_DENOM),
activities: state.wallet.lumWallet?.activities,
deposits: state.wallet.lumWallet?.deposits,
prizes: state.wallet.lumWallet?.prizes,
Expand Down

0 comments on commit 615692b

Please sign in to comment.