Skip to content

Commit

Permalink
fix: set address on prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
preschian committed May 23, 2023
1 parent 0965564 commit 9fc456d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions middleware/prefix.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { chainPrefixes } from '@kodadot1/static'
import { useIdentityStore } from '@/stores/identity'
import { ss58Of } from '@/utils/config/chain.config'

export const rmrk2ChainPrefixesInHostname = ['rmrk2', 'rmrk']

export default function ({ store, route }): void {
const identityStore = useIdentityStore()
const prefixInPath = route.params.prefix || route.path.split('/')[1]
const { setUrlPrefix, urlPrefix } = usePrefix()

Expand Down Expand Up @@ -34,4 +37,6 @@ export default function ({ store, route }): void {
) {
store.dispatch('setUrlPrefix', prefixInPath)
}

identityStore.setCorrectAddressFormat(ss58Of(urlPrefix.value))
}

0 comments on commit 9fc456d

Please sign in to comment.