Skip to content

Commit

Permalink
Fabo/add network-type for selecting addrss and signing (#378)
Browse files Browse the repository at this point in the history
* add network-type for selecting addrss and signing

* adjust according to new network_type param

* add network type to network schema

Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com>
  • Loading branch information
faboweb and Bitcoinera authored Mar 2, 2020
1 parent 7c2fe9e commit 7372521
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/networks-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = [
bech32_prefix: 'cosmos',
address_prefix: 'cosmos',
address_creator: 'cosmos',
network_type: 'cosmos',
ledger_app: 'cosmos',
source_class_name: 'source/cosmosV2-source',
block_listener_class_name: 'block-listeners/cosmos-node-subscription',
Expand Down
6 changes: 6 additions & 0 deletions data/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = [
address_prefix: 'cosmos',
address_creator: 'cosmos',
ledger_app: 'cosmos',
network_type: 'cosmos',
source_class_name: 'source/cosmosV2-source',
block_listener_class_name: 'block-listeners/cosmos-node-subscription',
testnet: true,
Expand Down Expand Up @@ -48,6 +49,7 @@ module.exports = [
bech32_prefix: 'cosmos',
address_prefix: 'cosmos',
address_creator: 'cosmos',
network_type: 'cosmos',
ledger_app: 'cosmos',
source_class_name: 'source/cosmosV2-source',
block_listener_class_name: 'block-listeners/cosmos-node-subscription',
Expand Down Expand Up @@ -88,6 +90,7 @@ module.exports = [
address_prefix: 'terra',
address_creator: 'cosmos',
ledger_app: 'cosmos',
network_type: 'cosmos',
source_class_name: 'source/terraV3-source',
block_listener_class_name: 'block-listeners/cosmos-node-subscription',
testnet: false,
Expand Down Expand Up @@ -122,6 +125,7 @@ module.exports = [
address_prefix: 'terra',
address_creator: 'cosmos',
ledger_app: 'cosmos',
network_type: 'cosmos',
source_class_name: 'source/terraV3-source',
block_listener_class_name: 'block-listeners/cosmos-node-subscription',
testnet: true,
Expand Down Expand Up @@ -156,6 +160,7 @@ module.exports = [
address_prefix: 'emoney',
address_creator: 'cosmos',
ledger_app: 'cosmos',
network_type: 'cosmos',
source_class_name: 'source/emoneyV0-source',
block_listener_class_name: 'block-listeners/cosmos-node-subscription',
testnet: true,
Expand Down Expand Up @@ -190,6 +195,7 @@ module.exports = [
address_prefix: '0x',
address_creator: 'ethereum',
ledger_app: 'ethereum',
network_type: 'ethereum',
source_class_name: 'source/livepeerV0-source',
block_listener_class_name: 'block-listeners/livepeer-node-polling',
testnet: false,
Expand Down
1 change: 1 addition & 0 deletions lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const typeDefs = gql`
bech32_prefix: String
address_prefix: String
address_creator: String
network_type: String
ledger_app: String
testnet: Boolean
feature_session: Boolean
Expand Down
1 change: 1 addition & 0 deletions tests/network-configs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const schema = Joi.object({
bech32_prefix: Joi.string(),
address_prefix: Joi.string(),
address_creator: Joi.string(),
network_type: Joi.string(),
ledger_app: Joi.string(),
source_class_name: Joi.string(),
block_listener_class_name: Joi.string(),
Expand Down

0 comments on commit 7372521

Please sign in to comment.