Skip to content
Open
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useContext } from 'react';
import { useModalContext } from 'contexts';
import { Web3Context } from 'contexts/Web3';
import ApprovalRequired from './components/ApprovalRequired';
import { useErrorMessage } from 'hooks';
import { SIGNER_RESPONSES } from 'constants/enums';
import { formatActionString } from 'utils';
import Svg from 'library/Svg';
import ApprovalRequired from '../../modals/ApprovalRequired';

const Row = ({ threshold, action, displayIndex, onApprove, onSign }) => {
const { intent } = action;
Expand Down

This file was deleted.

57 changes: 0 additions & 57 deletions packages/client/src/components/Actions/components/NFTView.js

This file was deleted.

This file was deleted.

This file was deleted.

30 changes: 0 additions & 30 deletions packages/client/src/components/Actions/components/TokenView.js

This file was deleted.

16 changes: 10 additions & 6 deletions packages/client/src/components/SafeNFTs.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ function SafeNFTs({ web3, address }) {
.filter((x) => x);

const showNFTModal = (collection, token) => {
const { collectionName, key: collectionId } = collection;
const { tokenId } = token;

modalContext.openModal(
<div className="p-5 has-text-black">
<div>
Expand All @@ -49,11 +52,11 @@ function SafeNFTs({ web3, address }) {
<div className="column is-flex is-full p-0 mt-4">
<div className="flex-1">
<p className="has-text-grey">Collection</p>
<p className="mt-2">{collection.collectionName}</p>
<p className="mt-2">{collectionName}</p>
</div>
<div className="flex-1">
<p className="has-text-grey">Number</p>
<p className="mt-2">{token.tokenId}</p>
<p className="mt-2">{tokenId}</p>
</div>
</div>
<div className="is-flex is-align-items-center mt-6">
Expand All @@ -73,7 +76,7 @@ function SafeNFTs({ web3, address }) {
sender={address}
initialState={{
assetType: ASSET_TYPES.NFT,
selectedNFT: token,
selectedNFT: { ...token, collectionName: collectionId },
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Token doesn't have information about a collection, so I added it here to make sending tokens from NFTs page work. When user opens the modal, the NFT will be selected, and there will be no errors when this NFT is sent to the account.

transactionType: TRANSACTION_TYPE.SEND,
}}
/>
Expand Down Expand Up @@ -105,14 +108,15 @@ function SafeNFTs({ web3, address }) {
);
} else {
nftsToDisplay.forEach((collection) => {
const { collectionName, tokens } = collection;
assetComponents.push(
<div
className="is-flex is-justify-content-center is-flex-direction-column"
key={collection.collectionName}
key={collectionName}
>
<h2 className="is-size-4">{collection.collectionName}</h2>
<h2 className="is-size-4">{collectionName}</h2>
<div className="is-flex mt-4">
{collection.tokens.map((token) => (
{tokens.map((token) => (
<div
className="p-4 border-light rounded-sm pointer"
key={token.tokenId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const EditThresholdForm = ({
<Svg name="Person" />
</div>
<div className="flex-1 is-flex is-align-items-center px-5 border-light-right has-text-black">
{newThreshold} of{Math.max(safeOwners.length, 1)} owner(s)
{newThreshold} of {Math.max(safeOwners.length, 1)} owner(s)
</div>
<div
className={minusSignerClasses.join(' ')}
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/components/SignatureRequirements.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function SignatureRequirements({
<Svg name="Person" />
</div>
<div className="flex-1 is-flex is-align-items-center px-5 border-light-right">
{signersAmount} of{Math.max(safeOwners.length, 1)} owner(s)
{signersAmount} of {Math.max(safeOwners.length, 1)} owner(s)
</div>
<div
className={minusSignerClasses.join(' ')}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useContext } from 'react';
import { useHistory } from 'react-router-dom';
import { TransferTokensContext } from '../../../contexts/TransferTokens';
import { useModalContext } from 'contexts';
import { Web3Context } from 'contexts/Web3';
import { useErrorMessage } from 'hooks';
import { ASSET_TYPES, TRANSACTION_TYPE } from 'constants/enums';
import { formatAddress } from 'utils';
import { isEmpty } from 'lodash';
import { TransferTokensContext } from '../../../contexts/TransferTokens';

const ButtonGroup = ({ proposeTransfer }) => {
const modalContext = useModalContext();
Expand Down
Loading