@@ -211,7 +211,9 @@ import { DispatchError } from '@polkadot/types/interfaces'
211211import { ipfsToArweave } from ' @/utils/ipfs'
212212import { APIKeys , pinFile as pinFileToIPFS } from ' @/pinata'
213213import TransactionMixin from ' @/utils/mixins/txMixin'
214- import { isAddress } from ' @polkadot/util-crypto'
214+ import { encodeAddress , isAddress } from ' @polkadot/util-crypto'
215+ import ChainMixin from ' @/utils/mixins/chainMixin'
216+ import correctFormat from ' @/utils/ss58Format'
215217
216218const components = {
217219 Auth : () => import (' @/components/shared/Auth.vue' ),
@@ -270,7 +272,8 @@ const components = {
270272export default class SimpleMint extends Mixins (
271273 SubscribeMixin ,
272274 RmrkVersionMixin ,
273- TransactionMixin
275+ TransactionMixin ,
276+ ChainMixin
274277) {
275278 private rmrkMint: SimpleNFT = {
276279 ... emptyObject <SimpleNFT >(),
@@ -364,10 +367,14 @@ export default class SimpleMint extends Mixins(
364367 return this .parseAddresses .length <= this .rmrkMint .max
365368 }
366369
370+ get ss58Format(): number {
371+ return this .chainProperties ?.ss58Format
372+ }
373+
367374 get parseAddresses(): string [] {
368375 const { batchAdresses } = this
369376 const addresses = batchAdresses .split (' \n ' ).map (x => x .split (' -' )).filter (x => x .length ).map (x => x [1 ]).filter (x => x ).map (a => a .trim ())
370- const onlyValid = addresses .filter (a => isAddress (a ))
377+ const onlyValid = addresses .filter (a => isAddress (a )). map ( a => encodeAddress ( a , correctFormat ( this . ss58Format )))
371378
372379 return onlyValid
373380 }
0 commit comments