Skip to content

Commit

Permalink
Set explorerUrl and iconUrl as mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
mj52951 committed Dec 20, 2024
1 parent dd484c4 commit 7b60f92
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions envs/.env.indexer.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ DB_PORT=5432
DB_USERNAME=postgres
DB_HOST=db
SHARED_CONFIG_URL="https://ipfs.io/ipfs/bafkreiasnla2ya55of6nwm3swjstip4q2ixfa3t6tvixyibclfovxnerte"
1_METADATA='{"id": 1, "rpcUrl": "http://evm1:8545"}'
2_METADATA='{"id": 2, "rpcUrl": "http://evm2:8545"}'
3_METADATA='{"id": 3, "rpcUrl": "ws://substrate-pallet:9944"}'
1_METADATA='{"id": 1, "rpcUrl": "http://evm1:8545", "iconUrl": "https://example.com/icon1.png", "explorerUrl": "https://explorer.com/1"}'
2_METADATA='{"id": 2, "rpcUrl": "http://evm2:8545", "iconUrl": "https://example.com/icon2.png", "explorerUrl": "https://explorer.com/2"}'
3_METADATA='{"id": 3, "rpcUrl": "ws://substrate-pallet:9944", "iconUrl": "https://example.com/icon3.png", "explorerUrl": "https://explorer.com/3"}'

ENV_DOMAINS='[1,2,3]'
4 changes: 2 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ type Domain @entity {
id: ID!
type: String!
name: String!
iconURL: String
explorerURL: String
iconURL: String!
explorerURL: String!
routesFrom: [Route!] @derivedFrom(field: "fromDomain")
routesTo: [Route!] @derivedFrom(field: "toDomain")
token: [Token!] @derivedFrom(field: "domain")
Expand Down
4 changes: 2 additions & 2 deletions src/indexer/config/envLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export type DomainMetadata = {
domainId: number;
rpcUrl: string;
domainGateway?: string;
iconUrl?: string;
explorerUrl?: string;
iconUrl: string;
explorerUrl: string;
};

export type EnvVariables = {
Expand Down
8 changes: 4 additions & 4 deletions src/model/generated/domain.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export class Domain {
@StringColumn_({nullable: false})
name!: string

@StringColumn_({nullable: true})
iconURL!: string | undefined | null
@StringColumn_({nullable: false})
iconURL!: string

@StringColumn_({nullable: true})
explorerURL!: string | undefined | null
@StringColumn_({nullable: false})
explorerURL!: string

@OneToMany_(() => Route, e => e.fromDomain)
routesFrom!: Route[]
Expand Down

0 comments on commit 7b60f92

Please sign in to comment.