diff --git a/package.json b/package.json
index 9900994..d728255 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
"react-error-boundary": "^3.1.4",
"react-flippy": "^1.1.0",
"react-helmet": "^6.1.0",
+ "react-html5video": "^2.5.1",
"react-infinite-scroll-component": "^6.1.0",
"react-lazy-load-image-component": "^1.5.1",
"react-lazyload": "^3.2.0",
diff --git a/src/components/AssetImageFigure/index.js b/src/components/AssetImageFigure/index.js
index 4469eb4..e6d4398 100644
--- a/src/components/AssetImageFigure/index.js
+++ b/src/components/AssetImageFigure/index.js
@@ -9,7 +9,7 @@ const AssetImageFigure = ({ asset, setShow, show_trigger, width, no_figure, clas
<>
{
no_figure ? (
-
) :
setShow ? (
Floor price
- ₳{ + ₳{numFormatter( thisCollection.opencnft.reduce(function (result, policy){ return Math.min(result, policy.floor_price) - },999999*1000000)/1000000}
+ },999999*1000000)/1000000) + }Total assets
- { + {numFormatter( thisCollection.opencnft.reduce(function (result, policy){ return result + policy.asset_minted - },0) + },0)) }
Number owners
- { + {numFormatter( thisCollection.opencnft.reduce(function (result, policy){ return result + policy.asset_holders - },0) + },0)) }
No assets
Looks like your wallet is empty,{" "} - start browsing! + Start browsing marketplace!
> ) : ( diff --git a/src/pages/Account/Holdings.js b/src/pages/Account/Holdings.js index 1f8dafd..c3bb5a0 100644 --- a/src/pages/Account/Holdings.js +++ b/src/pages/Account/Holdings.js @@ -248,7 +248,7 @@ const NoAssetFound = ({ state_wallet }) => {No assets
Looks like your wallet is empty,{" "} - start browsing! + Start browsing marketplace!
> ) : ( diff --git a/src/pages/Asset/index.js b/src/pages/Asset/index.js index b86bc03..be149ae 100644 --- a/src/pages/Asset/index.js +++ b/src/pages/Asset/index.js @@ -1,8 +1,10 @@ -import React, { useEffect, useState } from "react"; +import React, { useEffect, useState, useRef } from "react"; import { useSelector, useDispatch } from "react-redux"; import { Link, useParams } from "react-router-dom"; import Moment from "react-moment"; import SweetAlert from "react-bootstrap-sweetalert"; +import { DefaultPlayer as Video } from "react-html5video"; +import "react-html5video/dist/styles.css"; import { urls } from "config"; import { @@ -254,21 +256,30 @@ const Listing = ({ purchase_token, asset_add_offer, }) => { - let is_owner = false; - if (asset.details.asset in state_wallet.data.assets) { - is_owner = true; - } - if (asset.status && state_wallet.connected) { - if (asset.status.locked) { - if (asset.status.submittedBy === state_wallet.data.address) { - is_owner = true; + const [isOwner, setIsOwner] = useState(false); + + useEffect(() => { + if (asset.details.asset in state_wallet.data.assets) { + setIsOwner(true); + } else if (asset.status && state_wallet.connected) { + if (asset.status.locked) { + if (asset.status.submittedBy === state_wallet.data.address) { + setIsOwner(true); + } } + } else { + setIsOwner(false); } - } + }, [ + asset, + state_wallet.connected, + state_wallet.data.address, + state_wallet.data.assets, + ]); return (
+
+
- Learn how to purchase your first NFT -
-Your first step on this NFT journey is purchasing cryptocurrency in the form of ADA. ADA is the cryptocurrency that coincides with the Cardano network and is what is used when purchasing NFTs on the Cardano network. The purchase of ADA will allow you to make bids on and purchase NFTs through various NFT marketplaces.
- -To purchase ADA, you will need to join a centralized exchange such as Coinbase. Coinbase is an exchange where one can purchase, buy, sell, convert, and send cryptocurrency. In a way, Coinbase is like how one would interact with the stock market. If you are familiar with stock trading platforms, you will be extremely comfortable in Coinbase.
-Coinbase is quick to set up, but you may need a few days before everything is approved. Coinbase needs Identity Documentation such as a passport or driver’s license and then approval of a Payment Method.
- -Now that you have purchased your ADA coins, you may want to put them into action, like purchasing an NFT from Martify or any of the various Cardano NFT marketplaces. To do so, you need a "Non-Custodial" wallet such as Nami Wallet. "Non-Custodial" wallets give you complete control over your crypto assets, as there is no third party involved. You cannot simply take your ADA coin from Coinbase to make purchases on an NFT marketplace as Coinbase is still technically controlling your assets. Once you transfer your currency from Coinbase to your wallet, you are free to do as you please!
- -Go to Nami Wallet to download the browser extension. Important: To avoid any scam, we recommend you to visit their official page and then select the desired browser type to install the application. If you click on Chrome, you will be automatically taken to the Google Chrome web store. Click "Add extension" and it will be downloaded and installed. Once installed, you will be able to view the Nami Wallet icon (a blue "N") in the top right corner of your browser.
- -If you open up the Nami Wallet for the first time. Make sure no one is watching your screen and click on "New Wallet". Then, it will show you 24-words sequence, these words are called "seed phrase", these sequence of words are the access to your wallet. Remember, this must be hidden and never shared with anyone. Do not take a picture or screenshot of your seed phrase. Instead, write it down immediately on a piece of paper and put it in a secret and safe location. Even better, write your seed phrase down on 2-3 pieces of paper and store each paper in a separate secure location (like one in a personal safe and one in a bank safety deposit box). Alternatively, you can download the seed phrase and keep it offline on an encrypted hard drive. Having multiple backups of your seed phrase is good practice just in case one copy is ever lost or destroyed. After documenting your seed phrase, click "Next".
- -Nami Wallet will prompt you to input all those words in the next step. You confirm your seed phrase in the correct order of your 24-word sequence. You will also be prompt to input a password, which is needed whenever you have to sign a transaction. You can now access your Nami Wallet via "N" icon in your browser and begin purchasing and receiving crypto. If you already have ADA in your Coinbase, you can use your brand new Cardano address to transfer them over into your Nami Wallet.
- -Now that you have your Nami Wallet, you will want to transfer your funds out of Coinbase. You need to get your wallet address, by clicking on the "Receive" button, you can copy your Cardano address. If you are using Coinbase on your smartphone, you can also scan the QR code from the Coinbase application. Important: you must send your ADA via the Cardano network. It would take a few minutes to get your ADA transfer from Coinbase to your Nami Wallet.
- -You have purchased your ADA coins, and transferred it to your Nami Wallet, now you are ready to browse and purchase some NFTs on the marketplace. Click on "Connect" on the top right corner. It should recognized that you have Nami Wallet installed and it will prompt your for access on the first time. If it does not, you may have to restart your web browser. Click on "Access" to allow Martify to connect to your Nami Wallet. No transaction will take place until you decided to make a purchase and provided your signature.
- -The Nami Wallet allows you to deposit a fixed amount (5₳) as collateral to avoid any circumstances that arise due to contract failure. In the event of a contract failure, a collateral is taken to cover the blockchain resources used by the node to verify the contract. That means collateral aims to secure the network and avoid network failure. When a script runs successfully, the collateral is not taken. The chances of losing the collateral are very low; however, Nami seeks to minimize the risk by only allowing a determined amount (5₳) of collateral to be used. In a worst case scenario, malicious, or poorly built dApps, would only be able to take this amount. To deposit tokens into collateral, go to the Setting tab, and click on Collateral. A window will pop up where you need to enter your wallet’s password to confirm the process. At any time, you can remove the collateral by clicking on the "Remove" button.
- - {/*Start by browsing listed assets on the explore page, there you can sort the assets by price or filter by the projects you are interested in. Clicking on the the asset will bring you to the asset page, here you can see the asset's metadata, past transactions on all marketplaces, as well as the current listing price. Click on "Buy Now", your Nami Wallet will prompt you for your password. Sign it to approve the transaction and the NFT will be in your Nami Wallet in a few minutes. If your "Buy Now" button is disabled, check that you have connected your wallet and added the collateral.
- -+ Learn how to purchase your first NFT +
+Your first step on this NFT journey is purchasing cryptocurrency in the form of ADA. ADA is the cryptocurrency that coincides with the Cardano network and is what is used when purchasing NFTs on the Cardano network. The purchase of ADA will allow you to make bids on and purchase NFTs through various NFT marketplaces.
+ +To purchase ADA, you will need to join a centralized exchange such as Coinbase. Coinbase is an exchange where one can purchase, buy, sell, convert, and send cryptocurrency. In a way, Coinbase is like how one would interact with the stock market. If you are familiar with stock trading platforms, you will be extremely comfortable in Coinbase.
+Coinbase is quick to set up, but you may need a few days before everything is approved. Coinbase needs Identity Documentation such as a passport or driver’s license and then approval of a Payment Method.
+ +Now that you have purchased your ADA coins, you may want to put them into action, like purchasing an NFT from Martify or any of the various Cardano NFT marketplaces. To do so, you need a "Non-Custodial" wallet such as Nami Wallet, GeroWallet or ccvault.io. "Non-Custodial" wallets give you complete control over your crypto assets, as there is no third party involved. You cannot simply take your ADA coin from Coinbase to make purchases on an NFT marketplace as Coinbase is still technically controlling your assets. Once you transfer your currency from Coinbase to your wallet, you are free to do as you please!
+ +Go to Nami Wallet, GeroWallet or ccvault or to download the browser extension. Important: To avoid any scam, we recommend you to visit their official page and then select the desired browser type to install the application. If you click on Chrome, you will be automatically taken to the Google Chrome web store. Click "Add extension" and it will be downloaded and installed. Once installed, you will be able to view the wallet icon (a blue "N" for Nami Wallet) in the top right corner of your browser.
+ +The following instructions (for Nami Wallet) apply more or less to all wallets.
+ +If you open up the Nami Wallet for the first time. Make sure no one is watching your screen and click on "New Wallet". Then, it will show you 24-words sequence, these words are called "seed phrase", these sequence of words are the access to your wallet. Remember, this must be hidden and never shared with anyone. Do not take a picture or screenshot of your seed phrase. Instead, write it down immediately on a piece of paper and put it in a secret and safe location. Even better, write your seed phrase down on 2-3 pieces of paper and store each paper in a separate secure location (like one in a personal safe and one in a bank safety deposit box). Alternatively, you can download the seed phrase and keep it offline on an encrypted hard drive. Having multiple backups of your seed phrase is good practice just in case one copy is ever lost or destroyed. After documenting your seed phrase, click "Next".
+ +Nami Wallet will prompt you to input all those words in the next step. You confirm your seed phrase in the correct order of your 24-word sequence. You will also be prompt to input a password, which is needed whenever you have to sign a transaction. You can now access your Nami Wallet via "N" icon in your browser and begin purchasing and receiving crypto. If you already have ADA in your Coinbase, you can use your brand new Cardano address to transfer them over into your Nami Wallet.
+ +Now that you have your cryptocurrency wallet, you will want to transfer your funds out of Coinbase. You need to get your wallet address, by clicking on the "Receive" button, you can copy your Cardano address. If you are using Coinbase on your smartphone, you can also scan the QR code from the Coinbase application. Important: you must send your ADA via the Cardano network. It would take a few minutes to get your ADA transfer from Coinbase to your Nami Wallet.
+ +You have purchased your ADA coins, and transferred it to your Nami Wallet, now you are ready to browse and purchase some NFTs on the marketplace. Click on "Connect" on the top right corner. It should recognized that you have Nami Wallet installed and it will prompt your for access on the first time. If it does not, you may have to restart your web browser. Click on "Access" to allow Martify to connect to your Nami Wallet. No transaction will take place until you decided to make a purchase and provided your signature.
+ +The Nami Wallet allows you to deposit a fixed amount (5₳) as collateral to avoid any circumstances that arise due to contract failure. In the event of a contract failure, a collateral is taken to cover the blockchain resources used by the node to verify the contract. That means collateral aims to secure the network and avoid network failure. When a script runs successfully, the collateral is not taken. The chances of losing the collateral are very low; however, Nami seeks to minimize the risk by only allowing a determined amount (5₳) of collateral to be used. In a worst case scenario, malicious, or poorly built dApps, would only be able to take this amount. To deposit tokens into collateral, go to the Setting tab, and click on Collateral. A window will pop up where you need to enter your wallet’s password to confirm the process. At any time, you can remove the collateral by clicking on the "Remove" button.
+ + {/*Start by browsing listed assets on the explore page, there you can sort the assets by price or filter by the projects you are interested in. Clicking on the the asset will bring you to the asset page, here you can see the asset's metadata, past transactions on all marketplaces, as well as the current listing price. Click on "Buy Now", your Nami Wallet will prompt you for your password. Sign it to approve the transaction and the NFT will be in your Nami Wallet in a few minutes. If your "Buy Now" button is disabled, check that you have connected your wallet and added the collateral.
+ +- Learn how list your NFTs for sale -
-Go to Nami Wallet to download the browser extension. Important: To avoid any scam, we recommend you to visit their official page and then select the desired browser type to install the application. If you click on Chrome, you will be automatically taken to the Google Chrome web store. Click "Add extension" and it will be downloaded and installed. Once installed, you will be able to view the Nami Wallet icon (a blue "N") in the top right corner of your browser.
- -If you open up the Nami Wallet for the first time. Make sure no one is watching your screen and click on "New Wallet". Then, it will show you 24-words sequence, these words are called "seed phrase", these sequence of words are the access to your wallet. Remember, this must be hidden and never shared with anyone. Do not take a picture or screenshot of your seed phrase. Instead, write it down immediately on a piece of paper and put it in a secret and safe location. Even better, write your seed phrase down on 2-3 pieces of paper and store each paper in a separate secure location (like one in a personal safe and one in a bank safety deposit box). Alternatively, you can download the seed phrase and keep it offline on an encrypted hard drive. Having multiple backups of your seed phrase is good practice just in case one copy is ever lost or destroyed. After documenting your seed phrase, click "Next".
- -Nami Wallet will prompt you to input all those words in the next step. You confirm your seed phrase in the correct order of your 24-word sequence. You will also be prompt to input a password, which is needed whenever you have to sign a transaction. You can now access your Nami Wallet via "N" icon in your browser.
- -With Nami Wallet installed, click on "Connect" on the top right corner. It should recognized that you have Nami Wallet installed and it will prompt your for access on the first time. If it does not, you may have to restart your web browser. Click on "Access" to allow Martify to connect to your Nami Wallet.
- -The Nami Wallet allows you to deposit a fixed amount (5₳) as collateral to avoid any circumstances that arise due to contract failure. In the event of a contract failure, a collateral is taken to cover the blockchain resources used by the node to verify the contract to avoid network failure. When a script runs successfully, the collateral is not taken. The chances of losing the collateral are very low; however, Nami seeks to minimize the risk by only allowing a determined amount (5₳) of collateral to be used. In a worst case scenario, malicious, or poorly built dApps, it would only be able to take this amount. To deposit ADA into collateral, go to the Setting tab, and click on Collateral. A window will pop up where you need to enter your wallet’s password to confirm the process. At any time, you can remove from collateral by clicking on the "Remove" button.
- -Now that you have your Nami Wallet, you will want to transfer your assets from other wallets into your new Nami Wallet. For that, you need to get your wallet address, by click on the "Recieve" button, you can copy your Cardano address. It would take a few minutes to get your assets transfer from your wallet to your new Nami Wallet.
- -Click on Connect if you have not, and click on Account to browse the assets in your Nami Wallet. Clicking on an asset will bring you to the asset page, here you can see the asset's metadata. On this page, you can set your listing price, your Nami Wallet will prompt you for your password. Sign it to approve the transaction and the NFT will be transfered to the smart contract. If you are unable to list the asset, check that you have connected your wallet and added the collateral.
- - - {/*+ Learn how list your NFTs for sale +
+Go to Nami Wallet, GeroWallet or ccvault.io to download the browser extension. Important: To avoid any scam, we recommend you to visit their official page and then select the desired browser type to install the application. If you click on Chrome, you will be automatically taken to the Google Chrome web store. Click "Add extension" and it will be downloaded and installed. Once installed, you will be able to view the Nami Wallet icon (a blue "N") in the top right corner of your browser.
+ +The following instructions (for Nami Wallet) apply more or less to all wallets.
+ +If you open up the Nami Wallet for the first time. Make sure no one is watching your screen and click on "New Wallet". Then, it will show you 24-words sequence, these words are called "seed phrase", these sequence of words are the access to your wallet. Remember, this must be hidden and never shared with anyone. Do not take a picture or screenshot of your seed phrase. Instead, write it down immediately on a piece of paper and put it in a secret and safe location. Even better, write your seed phrase down on 2-3 pieces of paper and store each paper in a separate secure location (like one in a personal safe and one in a bank safety deposit box). Alternatively, you can download the seed phrase and keep it offline on an encrypted hard drive. Having multiple backups of your seed phrase is good practice just in case one copy is ever lost or destroyed. After documenting your seed phrase, click "Next".
+ +Nami Wallet will prompt you to input all those words in the next step. You confirm your seed phrase in the correct order of your 24-word sequence. You will also be prompt to input a password, which is needed whenever you have to sign a transaction. You can now access your Nami Wallet via "N" icon in your browser.
+ +With Nami Wallet installed, click on "Connect" on the top right corner. It should recognized that you have Nami Wallet installed and it will prompt your for access on the first time. If it does not, you may have to restart your web browser. Click on "Access" to allow Martify to connect to your Nami Wallet.
+ +The Nami Wallet allows you to deposit a fixed amount (5₳) as collateral to avoid any circumstances that arise due to contract failure. In the event of a contract failure, a collateral is taken to cover the blockchain resources used by the node to verify the contract to avoid network failure. When a script runs successfully, the collateral is not taken. The chances of losing the collateral are very low; however, Nami seeks to minimize the risk by only allowing a determined amount (5₳) of collateral to be used. In a worst case scenario, malicious, or poorly built dApps, it would only be able to take this amount. To deposit ADA into collateral, go to the Setting tab, and click on Collateral. A window will pop up where you need to enter your wallet’s password to confirm the process. At any time, you can remove from collateral by clicking on the "Remove" button.
+ +Now that you have your Nami Wallet, you will want to transfer your assets from other wallets into your new Nami Wallet. For that, you need to get your wallet address, by click on the "Recieve" button, you can copy your Cardano address. It would take a few minutes to get your assets transfer from your wallet to your new Nami Wallet.
+ +Click on Connect if you have not, and click on Account to browse the assets in your Nami Wallet. Clicking on an asset will bring you to the asset page, here you can see the asset's metadata. On this page, you can set your listing price, your Nami Wallet will prompt you for your password. Sign it to approve the transaction and the NFT will be transfered to the smart contract. If you are unable to list the asset, check that you have connected your wallet and added the collateral.
+ + + {/*