Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
Handle network object change
Browse files Browse the repository at this point in the history
Remove non-ethereum networks
  • Loading branch information
tboeckmann committed Dec 2, 2019
1 parent 5bc5c25 commit ae50fe2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
14 changes: 8 additions & 6 deletions src/app/inbox/inbox.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,14 @@ export class InboxComponent implements OnInit {
protocols = res["protocols"]
if (protocols.length > 0) {
protocols.forEach(protocol => {
protocol["networks"].forEach(network => {
this.networks.push({
label: network,
value: network,
})
});
if (protocol["name"] == "ethereum" ) {
protocol["networks"].forEach(network => {
this.networks.push({
label: network["name"],
value: network["name"],
})
});
}
});
}
});
Expand Down
9 changes: 4 additions & 5 deletions src/app/test/test-helpers/mailchain-test.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,8 @@ export class MailchainTestService {

public protocolsServerResponse(): any {
return {
"protocols": [{
"name": "ethereum",
"networks": ["goerli", "kovan", "mainnet", "rinkeby", "ropsten"]
}]
"protocols":
[{ "name": "ethereum", "networks": [{ "name": "goerli", "id": "" }, { "name": "kovan", "id": "" }, { "name": "mainnet", "id": "" }, { "name": "rinkeby", "id": "" }, { "name": "ropsten", "id": "" }] }, { "name": "substrate", "networks": [{ "name": "edgeware-testnet", "id": "42" }] }]
}
}

Expand All @@ -263,7 +261,8 @@ export class MailchainTestService {
{ label: "kovan", value: "kovan"},
{ label: "mainnet", value: "mainnet"},
{ label: "rinkeby", value: "rinkeby"},
{ label: "ropsten", value: "ropsten"}
{ label: "ropsten", value: "ropsten"},
// { label: "edgeware-testnet", value: "edgeware-testnet"}
]
}

Expand Down

0 comments on commit ae50fe2

Please sign in to comment.