-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10756 from Jarsen136/issue-10752
fix: Confusing linking on Base
- Loading branch information
Showing
6 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { isEthereumAddress } from '@polkadot/util-crypto' | ||
|
||
export default function () { | ||
const { urlPrefix } = usePrefix() | ||
const { isEvm, isSub } = useIsChain(urlPrefix) | ||
|
||
const getPrefixByAddress = (address: string) => { | ||
if (isEthereumAddress(address)) { | ||
return isEvm.value ? urlPrefix.value : 'base' | ||
} | ||
|
||
return isSub.value ? urlPrefix.value : 'ahp' | ||
} | ||
|
||
return { | ||
getPrefixByAddress, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { useRoute as _useRoute } from 'vue-router' | ||
|
||
// context: auto-import useRouter is not reactive after initially being set. ref: https://github.com/kodadot/nft-gallery/issues/10757 | ||
export default function () { | ||
return _useRoute() | ||
} |