Skip to content

Commit

Permalink
Display correct ContractResolver address (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwrdtm authored Mar 26, 2024
1 parent f5b21e7 commit ffe5916
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions SharedService/Resolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public enum ContractType
{
Allowlist ,
BackupRecovery,
ContractResolver,
DomainWalletOracle,
DomainWalletRegistry,
HDKeyDeriver,
Expand Down Expand Up @@ -104,8 +103,6 @@ public static byte[] GetContractTypKeccak(ContractType contractType) {
case ContractType.BackupRecovery:
typ = keccak256("BACKUP_RECOVERY");
break;
case ContractType.ContractResolver:
break;
case ContractType.DomainWalletOracle:
typ = keccak256("DOMAIN_WALLET_ORACLE");
break;
Expand Down Expand Up @@ -177,14 +174,17 @@ public async Task<List<ContractAddress>> GetAllContractAddresses() {
var contractAddresses = new List<ContractAddress>();

try {

foreach (ContractType contractType in Enum.GetValues(typeof(ContractType)) ) {
var typ = GetContractTypKeccak(contractType);
var env = await localStorage.GetItemAsync<byte>("env");
var contract = await resolverService.GetContractQueryAsync(typ, env);
contractAddresses.Add(new ContractAddress { name = contractType.ToString(), address = contract });

// Add in the ContractResolver separately
contractAddresses.Add(new ContractAddress { name = "ContractResolver", address = resolverService.ContractHandler.ContractAddress });

foreach (ContractType contractType in Enum.GetValues(typeof(ContractType)) ) {
var typ = GetContractTypKeccak(contractType);
var env = await localStorage.GetItemAsync<byte>("env");
var contract = await resolverService.GetContractQueryAsync(typ, env);
contractAddresses.Add(new ContractAddress { name = contractType.ToString(), address = contract });
}
}
}
catch (Exception ex) {
Console.WriteLine("Trying to get contract addresses: " + ex.Message);
}
Expand Down

0 comments on commit ffe5916

Please sign in to comment.