mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Merge pull request #837 from MetaMask/FixMenuItem
Fix custom provider menu item
This commit is contained in:
commit
7cf6e372eb
@ -4,6 +4,7 @@
|
||||
|
||||
- Add support for the new, default Ropsten Test Network.
|
||||
- Fix bug that would cause MetaMask to occasionally lose its StreamProvider connection and drop requests.
|
||||
- Fix bug that would cause the Custom RPC menu item to not appear when Localhost 8545 was selected.
|
||||
|
||||
## 2.13.8 2016-11-16
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
86
development/states/private-network.json
Normal file
86
development/states/private-network.json
Normal file
@ -0,0 +1,86 @@
|
||||
{
|
||||
"metamask": {
|
||||
"isInitialized": true,
|
||||
"isUnlocked": true,
|
||||
"rpcTarget": "https://rawtestrpc.metamask.io/",
|
||||
"identities": {
|
||||
"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825": {
|
||||
"name": "Account 1",
|
||||
"address": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"mayBeFauceting": false
|
||||
},
|
||||
"0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb": {
|
||||
"name": "Account 2",
|
||||
"address": "0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb",
|
||||
"mayBeFauceting": false
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"conversionRate": 9.52855776,
|
||||
"conversionDate": 1479756513,
|
||||
"accounts": {
|
||||
"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825": {
|
||||
"balance": "0x0",
|
||||
"nonce": "0x0",
|
||||
"code": "0x0",
|
||||
"address": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825"
|
||||
},
|
||||
"0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb": {
|
||||
"balance": "0x0",
|
||||
"nonce": "0x0",
|
||||
"code": "0x0",
|
||||
"address": "0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb"
|
||||
}
|
||||
},
|
||||
"transactions": [
|
||||
{
|
||||
"id": 5551995700357153,
|
||||
"txParams": {
|
||||
"from": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"to": "0x48ff0cbac0acefedf152281ee80e9a0a01d5da63",
|
||||
"data": "0x90b98a11000000000000000000000000c5b8dbac4c1d3f152cdeb400e2313f309c410acb000000000000000000000000000000000000000000000000000000000000000a",
|
||||
"metamaskId": 5551995700357153,
|
||||
"metamaskNetworkId": "1479490588308"
|
||||
},
|
||||
"time": 1479498745949,
|
||||
"status": "confirmed",
|
||||
"gasMultiplier": 1,
|
||||
"metamaskNetworkId": "1479490588308",
|
||||
"containsDelegateCall": true,
|
||||
"estimatedGas": "0x24b33",
|
||||
"hash": "0xad609a6931f54a575ad71222ffc27cd6746017106d5b89f4ad300b37b273f8ac"
|
||||
}
|
||||
],
|
||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"network": "1479753732793",
|
||||
"isConfirmed": true,
|
||||
"isEthConfirmed": true,
|
||||
"unconfMsgs": {},
|
||||
"messages": [],
|
||||
"shapeShiftTxList": [],
|
||||
"gasMultiplier": false,
|
||||
"provider": {
|
||||
"type": "rpc",
|
||||
"rpcTarget": "http://localhost:8545"
|
||||
},
|
||||
"selectedAccount": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"isDisclaimerConfirmed": true
|
||||
},
|
||||
"appState": {
|
||||
"menuOpen": false,
|
||||
"currentView": {
|
||||
"name": "accountDetail"
|
||||
},
|
||||
"accountDetail": {
|
||||
"subview": "transactions",
|
||||
"accountExport": "none",
|
||||
"privateKey": ""
|
||||
},
|
||||
"transForward": false,
|
||||
"isLoading": false,
|
||||
"warning": null,
|
||||
"scrollToBottom": false
|
||||
},
|
||||
"identities": {}
|
||||
}
|
@ -259,6 +259,14 @@ App.prototype.renderNetworkDropdown = function () {
|
||||
}),
|
||||
|
||||
this.renderCustomOption(props.provider.rpcTarget),
|
||||
|
||||
h(DropMenuItem, {
|
||||
label: 'Custom RPC',
|
||||
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
|
||||
action: () => this.props.dispatch(actions.showConfigPage()),
|
||||
icon: h('i.fa.fa-question-circle.fa-lg'),
|
||||
}),
|
||||
|
||||
])
|
||||
}
|
||||
|
||||
@ -474,13 +482,6 @@ App.prototype.toggleMetamaskActive = function () {
|
||||
|
||||
App.prototype.renderCustomOption = function (rpcTarget) {
|
||||
switch (rpcTarget) {
|
||||
case undefined:
|
||||
return h(DropMenuItem, {
|
||||
label: 'Custom RPC',
|
||||
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
|
||||
action: () => this.props.dispatch(actions.showConfigPage()),
|
||||
icon: h('i.fa.fa-question-circle.fa-lg'),
|
||||
})
|
||||
|
||||
case 'http://localhost:8545':
|
||||
return null
|
||||
|
Loading…
Reference in New Issue
Block a user