Skip to content

Commit ec24afc

Browse files
committed
Fix Oasis account name lookup on pontus-x runtimes
On Pontus-X runtimes, we need to look for named accounts in two sources: - The named address repository at Oasis Nexus - The named address repository at deltaDAO This commit re-enables the first source, which was somehow lost along the way. (The second source was always working properly. that's why we didnt' notice earlier.) x
1 parent 899f969 commit ec24afc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changelog/1795.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Enable Oasis account name lookup on pontus-x runtimes

src/app/data/oasis-account-names.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ const dataSources: Record<Network, Partial<Record<Layer, string>>> = {
3434
'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/testnet_emerald.json',
3535
[Layer.sapphire]:
3636
'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/testnet_sapphire.json',
37+
[Layer.pontusxdev]:
38+
'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/testnet_pontusxdev.json',
39+
[Layer.pontusxtest]:
40+
'https://raw.githubusercontent.com/oasisprotocol/nexus/main/named-addresses/testnet_pontusxtest.json',
3741
},
3842
[Network.localnet]: {
3943
[Layer.consensus]: undefined,

src/app/hooks/useAccountMetadata.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export const useAccountMetadata = (scope: SearchScope, address: string): Account
2323
useErrorBoundary: false,
2424
})
2525
const oasisData = useOasisAccountMetadata(scope.network, scope.layer, getOasisAddress(address), {
26-
enabled: !isPontusX && !isLocalnet(scope.network),
26+
enabled: !isLocalnet(scope.network),
2727
useErrorBoundary: false,
2828
})
29-
const registryData = isPontusX ? pontusXData : oasisData
29+
const registryData = isPontusX ? (pontusXData?.metadata ? pontusXData : oasisData) : oasisData
3030

3131
// Also look up self-professed metadata (for tokens)
3232
const {

0 commit comments

Comments
 (0)