mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
update publish params for new contracts (#1308)
* fix params Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix params Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
parent
dfc8af0d6c
commit
3dd21bd20d
@ -62,12 +62,16 @@ export function generateNftMetadata(): NftMetadata {
|
||||
|
||||
const tokenUriPrefix = 'data:application/json;base64,'
|
||||
|
||||
export function generateNftCreateData(nftMetadata: NftMetadata): any {
|
||||
export function generateNftCreateData(
|
||||
nftMetadata: NftMetadata,
|
||||
accountId: string
|
||||
): any {
|
||||
const nftCreateData = {
|
||||
name: nftMetadata.name,
|
||||
symbol: nftMetadata.symbol,
|
||||
templateIndex: 1,
|
||||
tokenURI: ''
|
||||
tokenURI: '',
|
||||
owner: accountId
|
||||
}
|
||||
|
||||
return nftCreateData
|
||||
|
@ -17,7 +17,7 @@ const getEstGasFee = async (
|
||||
return
|
||||
|
||||
const { web3 } = nftFactory
|
||||
const nft = generateNftCreateData(nftMetadata)
|
||||
const nft = generateNftCreateData(nftMetadata, address)
|
||||
|
||||
const gasPrice = await web3.eth.getGasPrice()
|
||||
const gasLimit = await nftFactory?.estGasCreateNFT(address, nft)
|
||||
|
@ -181,7 +181,7 @@ export async function transformPublishFormToDdo(
|
||||
}
|
||||
],
|
||||
nft: {
|
||||
...generateNftCreateData(values?.metadata.nft),
|
||||
...generateNftCreateData(values?.metadata.nft, accountId),
|
||||
owner: accountId
|
||||
}
|
||||
})
|
||||
@ -198,7 +198,8 @@ export async function createTokensAndPricing(
|
||||
web3: Web3
|
||||
) {
|
||||
const nftCreateData: NftCreateData = generateNftCreateData(
|
||||
values.metadata.nft
|
||||
values.metadata.nft,
|
||||
accountId
|
||||
)
|
||||
const { appConfig } = getSiteMetadata()
|
||||
LoggerInstance.log('[publish] Creating NFT with metadata', nftCreateData)
|
||||
|
Loading…
Reference in New Issue
Block a user