Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dashboard/src/components/rmrk/Create/CreateItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<b-switch v-model="isImage"
passive-type="is-dark"
:rounded="false">
{{ isImage ? 'Static Image' : 'Animated multimedia' }}
{{ isImage ? 'Image / GIF' : 'Animated multimedia' }}
</b-switch>
</b-field>
<MetadataUpload v-if="isImage" v-model="image" :label="$i18n.t('Click to add image')" />
Expand Down
21 changes: 21 additions & 0 deletions dashboard/src/components/rmrk/service/RmrkService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,27 @@ export class RmrkService extends TextileService<RmrkType> implements State {
this.useNFT()
return this.findAll()
}

public async updateCollectionWithMeta(id: string) {
try {
const collection = await this.getCollectionById(id)
const final = await migrateCollection(collection)
await this.update(final)
} catch (e) {
console.warn(`[RMRK Service] Unable to update collection with Meta ${e.message}`)
}
}

public async updateNFTWithMeta(id: string) {
try {
this.useNFT();
const nft = await this.getNFT(id)
const final = await migrateNFT(nft)
await this.update(final)
} catch (e) {
console.warn(`[RMRK Service] Unable to update collection with Meta ${e.message}`)
}
}
}


Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import MetaInfo from 'vue-meta';
Vue.use(MetaInfo)
import Connector from '@vue-polkadot/vue-api';
import { client, keyInfo } from '@/textile'
import { createInstance, getInstance } from '@/components/rmrk/service/RmrkService'
import { createInstance, getInstance, migrateCollection, migrateNFT } from '@/components/rmrk/service/RmrkService'
import { enableExtension } from './extension'
import { web3FromAddress } from '@polkadot/extension-dapp';
import { getPrefixByStoreUrl } from '@/utils/chain'
Expand Down