@@ -54,7 +54,7 @@ import ChainMixin from '@/utils/mixins/chainMixin'
54
54
import MetaTransactionMixin from ' @/utils/mixins/metaMixin'
55
55
import RmrkVersionMixin from ' @/utils/mixins/rmrkVersionMixin'
56
56
import { notificationTypes , showNotification } from ' @/utils/notification'
57
- import { pinFileToIPFS , PinningKey , pinJson } from ' @/utils/pinning '
57
+ import { pinFileToIPFS , PinningKey , pinJson } from ' @/utils/nftStorage '
58
58
import shouldUpdate from ' @/utils/shouldUpdate'
59
59
import { canSupport } from ' @/utils/support'
60
60
import {
@@ -71,7 +71,10 @@ import { formatBalance } from '@polkadot/util'
71
71
import Connector from ' @kodadot1/sub-api'
72
72
import { Component , mixins , Watch } from ' nuxt-property-decorator'
73
73
import { BaseMintedCollection , BaseTokenType } from ' ~/components/base/types'
74
- import { IPFS_KODADOT_IMAGE_PLACEHOLDER } from ' ~/utils/constants'
74
+ import {
75
+ DETAIL_TIMEOUT ,
76
+ IPFS_KODADOT_IMAGE_PLACEHOLDER ,
77
+ } from ' ~/utils/constants'
75
78
import AuthMixin from ' ~/utils/mixins/authMixin'
76
79
import PrefixMixin from ' ~/utils/mixins/prefixMixin'
77
80
import { basicUpdateFunction } from ' ../service/NftUtils'
@@ -82,6 +85,7 @@ import {
82
85
secondaryFileVisible ,
83
86
} from ' ./mintUtils'
84
87
import { uploadDirect } from ' ~/utils/directUpload'
88
+ import { preheatFileFromIPFS } from ' ../utils'
85
89
86
90
type MintedCollection = BaseMintedCollection & {
87
91
name: string
@@ -288,6 +292,7 @@ export default class CreateToken extends mixins(
288
292
)
289
293
290
294
const metaHash = await pinJson (meta , imageHash )
295
+ preheatFileFromIPFS (fileHash )
291
296
uploadDirect (file , metaHash ).catch (this .$consola .warn )
292
297
return unSanitizeIpfsUrl (metaHash )
293
298
}
@@ -340,13 +345,15 @@ export default class CreateToken extends mixins(
340
345
}
341
346
342
347
protected navigateToDetail(nft : CreatedNFT , blockNumber : string ) {
343
- showNotification (' You will go to the detail in 2 seconds' )
348
+ showNotification (
349
+ ` You will go to the detail in ${DETAIL_TIMEOUT / 1000 } seconds `
350
+ )
344
351
const go = () =>
345
352
this .$router .push ({
346
353
path: ` /rmrk/detail/${toNFTId (nft , blockNumber )} ` ,
347
354
query: { message: ' congrats' },
348
355
})
349
- setTimeout (go , 2000 )
356
+ setTimeout (go , DETAIL_TIMEOUT )
350
357
}
351
358
}
352
359
</script >
0 commit comments