Skip to content

Commit

Permalink
add icon property to schema (#281)
Browse files Browse the repository at this point in the history
* add icon property to schema

* fix network schema validation

Co-authored-by: Ana G. <[email protected]>
  • Loading branch information
iambeone and Bitcoinera committed Jan 24, 2020
1 parent 4ed3865 commit f9b96a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
18 changes: 12 additions & 6 deletions data/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"action_proposal": true,
"default": false,
"stakingDenom": "MUON",
"enabled": true
"enabled": true,
"icon": "https://app.lunie.io/img/networks/cosmos-hub-mainnet.png"
},
{
"id": "cosmos-hub-mainnet",
Expand Down Expand Up @@ -61,7 +62,8 @@
"action_proposal": true,
"default": true,
"stakingDenom": "ATOM",
"enabled": true
"enabled": true,
"icon": "https://app.lunie.io/img/networks/cosmos-hub-mainnet.png"
},
{
"id": "regen-testnet",
Expand Down Expand Up @@ -93,7 +95,8 @@
"action_proposal": true,
"default": false,
"stakingDenom": "TREE",
"enabled": true
"enabled": true,
"icon": "https://app.lunie.io/img/networks/regen-testnet.png"
},
{
"id": "terra-testnet",
Expand Down Expand Up @@ -125,7 +128,8 @@
"action_proposal": false,
"default": false,
"stakingDenom": "LUNA",
"enabled": true
"enabled": true,
"icon": "https://app.lunie.io/img/networks/terra-testnet.png"
},
{
"id": "emoney-testnet",
Expand Down Expand Up @@ -157,7 +161,8 @@
"action_proposal": false,
"default": false,
"stakingDenom": "NGM",
"enabled": true
"enabled": true,
"icon": "https://app.lunie.io/img/networks/emoney-testnet.png"
},
{
"id": "livepeer-mainnet",
Expand Down Expand Up @@ -189,6 +194,7 @@
"action_proposal": false,
"default": false,
"stakingDenom": "LPT",
"enabled": false
"enabled": false,
"icon": "https://app.lunie.io/img/networks/livepeer-mainnet.png"
}
]
1 change: 1 addition & 0 deletions lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const typeDefs = gql`
default: Boolean
stakingDenom: String
enabled: Boolean
icon: String
}
type Delegation {
Expand Down
3 changes: 2 additions & 1 deletion tests/network-configs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const schema = Joi.object({
default: Joi.boolean(),
stakingDenom: Joi.string().uppercase(),
enabled: Joi.boolean(),
experimental: Joi.boolean().optional()
experimental: Joi.boolean().optional(),
icon: Joi.string().optional()
})

describe('Network configs', function() {
Expand Down

0 comments on commit f9b96a2

Please sign in to comment.