Skip to content

Commit

Permalink
update: action names
Browse files Browse the repository at this point in the history
  • Loading branch information
milorue committed Apr 13, 2022
1 parent 26a5080 commit a73a72f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 deletions.
21 changes: 1 addition & 20 deletions src/common/components/forms/AcceptOfferForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,11 @@ import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import * as zod from 'zod';
import Button from '../elements/Button';
import {
LAMPORTS_PER_SOL,
PublicKey,
SYSVAR_INSTRUCTIONS_PUBKEY,
Transaction,
TransactionInstruction,
} from '@solana/web3.js';
import { MetadataProgram } from '@metaplex-foundation/mpl-token-metadata';
import { LAMPORTS_PER_SOL } from '@solana/web3.js';
import { AuctionHouseProgram } from '@metaplex-foundation/mpl-auction-house';
import { concat } from 'ramda';
import { toast } from 'react-toastify';
import { Nft, Marketplace, Offer, Listing, initMarketplaceSDK } from '@holaplex/marketplace-js-sdk';
import { Wallet } from '@metaplex/js';
import { MultiTransactionContext } from '../../context/MultiTransaction';

const {
createSellInstruction,
createPrintListingReceiptInstruction,
createExecuteSaleInstruction,
createPrintPurchaseReceiptInstruction,
createCancelInstruction,
createCancelListingReceiptInstruction,
} = AuctionHouseProgram.instructions;

interface AcceptOfferFormProps {
nft: Nft;
Expand Down Expand Up @@ -75,7 +57,6 @@ const AcceptOfferForm: FC<AcceptOfferFormProps> = ({
});

const sdk = useMemo(() => initMarketplaceSDK(connection, wallet as Wallet), [connection, wallet]);
const { runActions, hasActionPending, retryActions } = useContext(MultiTransactionContext);

const onAcceptOffer = async () => {
if (offer) {
Expand Down
4 changes: 2 additions & 2 deletions src/common/components/forms/UpdateOfferForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ const UpdateOfferForm: FC<UpdateOfferFormProps> = ({

const newActions: Action[] = [
{
name: `Cancel offer`,
name: `Canceling your original offer...`,
id: `cancelOffer`,
action: onCancelOffer,
param: undefined,
},
{
name: `Update new offer`,
name: `Creating your updated offer...`,
id: `updateOffer`,
action: onUpdateOffer,
param: { amount: numAmount },
Expand Down
4 changes: 2 additions & 2 deletions src/common/components/forms/UpdateSellForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ const UpdateSellForm: FC<UpdateSellFormProps> = ({
const numAmount = Number(amount);
const newActions: Action[] = [
{
name: `Cancel listing`,
name: `Canceling your original listing...`,
id: `cancelListing`,
action: onCancelListing,
param: undefined,
},
{
name: `Update listing`,
name: `Creating your updated listing...`,
id: `updateListing`,
action: onUpdateListing,
param: { amount: numAmount },
Expand Down

0 comments on commit a73a72f

Please sign in to comment.