Skip to content

Commit

Permalink
Merge pull request #349 from Kredeum/fixMintPrice
Browse files Browse the repository at this point in the history
Fix Mint price
  • Loading branch information
zapaz authored Apr 25, 2023
2 parents 098251b + 8b1fcfa commit cb7721f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions svelte/components/Nft/NftMint.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script lang="ts">
import type { BigNumber } from "ethers";
import type { NftType, Properties } from "@lib/common/types";
import { nftImageUri, nftTokenUri, nftMint, nftMinted } from "@lib/nft/nft-mint";
import { explorerTxLog, getDappUrl, isAddressNotZero } from "@lib/common/config";
import { nftStoreSet } from "@stores/nft/nft";
import { S0_START, S1_STORE_IMAGE, S2_STORE_METADATA, S3_SIGN_TX, S4_WAIT_TX, S5_MINTED } from "@helpers/nftMint";
/////////////////////////////////////////////////
Expand All @@ -17,6 +18,7 @@
export let chainId: number;
export let address: string;
export let signer: string;
export let price: BigNumber = undefined;
export let name: string = undefined;
export let description: string = undefined;
export let metadata: string = undefined;
Expand Down Expand Up @@ -78,7 +80,7 @@
minting = S3_SIGN_TX;
const mintingTxResp = await nftMint(chainId, address, tokenUri, signer);
const mintingTxResp = await nftMint(chainId, address, tokenUri, signer, price);
txHash = mintingTxResp?.hash;
minting = S4_WAIT_TX;
Expand Down
3 changes: 3 additions & 0 deletions svelte/components/Nft/NftMintButton.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import type { BigNumber } from "ethers";
import { onMount } from "svelte";
import { metamaskInit } from "@helpers/metamask";
Expand All @@ -19,6 +20,7 @@
export let chainId: number;
export let address: string;
export let signer: string;
export let price: BigNumber = undefined;
export let name: string = undefined;
export let description: string = undefined;
export let metadata: string = undefined;
Expand Down Expand Up @@ -51,6 +53,7 @@
{chainId}
{address}
{signer}
{price}
{metadata}
{properties}
{name}
Expand Down
3 changes: 3 additions & 0 deletions svelte/components/Nft/NftMintPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
let refreshAll: Writable<number> = getContext("refreshAll");
let address: string;
let price: BigNumber;
let files: FileList;
let file: File;
Expand Down Expand Up @@ -117,6 +118,7 @@
minPrice
)} (mimimal royalty + protocol fees)`;
} else {
price = inputPrice;
inputPriceError = "";
}
};
Expand Down Expand Up @@ -217,6 +219,7 @@
{chainId}
{address}
{signer}
{price}
{properties}
{name}
{description}
Expand Down

0 comments on commit cb7721f

Please sign in to comment.