mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge branch 'master' into i1165-predictive
This commit is contained in:
commit
a186e40d17
@ -636,7 +636,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
this.currencyController.updateConversionRate()
|
||||
const data = {
|
||||
conversionRate: this.currencyController.getConversionRate(),
|
||||
currentFiat: this.currencyController.getCurrentCurrency(),
|
||||
currentCurrency: this.currencyController.getCurrentCurrency(),
|
||||
conversionDate: this.currencyController.getConversionDate(),
|
||||
}
|
||||
cb(null, data)
|
||||
|
@ -2,7 +2,7 @@ const version = 10
|
||||
|
||||
/*
|
||||
|
||||
This migration breaks out the CurrencyController substate
|
||||
This migration breaks out the ShapeShiftController substate
|
||||
|
||||
*/
|
||||
|
||||
|
@ -2,7 +2,7 @@ const version = 11
|
||||
|
||||
/*
|
||||
|
||||
This migration breaks out the CurrencyController substate
|
||||
This migration removes the discaimer state from our app, which was integrated into our notices.
|
||||
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"metamask": {
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 11.06608791,
|
||||
"conversionDate": 1470421024,
|
||||
"isInitialized": true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"metamask": {
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 11.06608791,
|
||||
"conversionDate": 1470421024,
|
||||
"isInitialized": true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"metamask": {
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 11.06608791,
|
||||
"conversionDate": 1470421024,
|
||||
"isInitialized": true,
|
||||
|
@ -14,7 +14,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 10.19458075,
|
||||
"conversionDate": 1484696373,
|
||||
"noActiveNotices": true,
|
||||
|
@ -30,7 +30,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 0,
|
||||
"conversionDate": "N/A",
|
||||
"noActiveNotices": true,
|
||||
|
@ -41,7 +41,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 11.84461814,
|
||||
"conversionDate": 1476226414,
|
||||
"accounts": {
|
||||
|
@ -41,7 +41,7 @@
|
||||
"simulationFails": true
|
||||
}
|
||||
},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 7.69158136,
|
||||
"conversionDate": 1482279663,
|
||||
"noActiveNotices": true,
|
||||
|
@ -48,7 +48,7 @@
|
||||
"gasPrice": "4a817c800"
|
||||
}
|
||||
},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 12.7200827,
|
||||
"conversionDate": 1487363041,
|
||||
"noActiveNotices": true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"metamask": {
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 11.06608791,
|
||||
"conversionDate": 1470421024,
|
||||
"isInitialized": true,
|
||||
|
@ -6,7 +6,7 @@
|
||||
"identities": {},
|
||||
"frequentRpcList": [],
|
||||
"unapprovedTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 12.7527416,
|
||||
"conversionDate": 1487624341,
|
||||
"noActiveNotices": false,
|
||||
|
@ -10,7 +10,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 10.1219126,
|
||||
"conversionDate": 1484695442,
|
||||
"noActiveNotices": true,
|
||||
|
@ -10,7 +10,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 10.10788584,
|
||||
"conversionDate": 1484694362,
|
||||
"noActiveNotices": true,
|
||||
|
@ -6,7 +6,7 @@
|
||||
"rpcTarget": "https://rawtestrpc.metamask.io/",
|
||||
"identities": {},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 11.4379398,
|
||||
"conversionDate": 1473358355,
|
||||
"accounts": {},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"metamask": {
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"lostAccounts": [
|
||||
"0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc",
|
||||
"0xec1adf982415d2ef5ec55899b9bfb8bc0f29251b"
|
||||
|
@ -14,7 +14,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 10.92067835,
|
||||
"conversionDate": 1478282884,
|
||||
"network": null,
|
||||
|
@ -9,7 +9,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 8.3533002,
|
||||
"conversionDate": 1481671082,
|
||||
"noActiveNotices": false,
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 11.02269525,
|
||||
"conversionDate": 1472076963,
|
||||
"accounts": {
|
||||
|
@ -31,7 +31,7 @@
|
||||
"maxCost": "de234b52e4a0800"
|
||||
}
|
||||
},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 12.59854817,
|
||||
"conversionDate": 1487662141,
|
||||
"noActiveNotices": true,
|
||||
|
@ -18,7 +18,7 @@
|
||||
}
|
||||
},
|
||||
"unapprovedTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 13.2126613,
|
||||
"conversionDate": 1487888522,
|
||||
"noActiveNotices": true,
|
||||
|
@ -16,7 +16,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 9.52855776,
|
||||
"conversionDate": 1479756513,
|
||||
"accounts": {
|
||||
|
@ -6,7 +6,7 @@
|
||||
"rpcTarget": "https://rawtestrpc.metamask.io/",
|
||||
"identities": {},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 0,
|
||||
"conversionDate": "N/A",
|
||||
"accounts": {},
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
},
|
||||
"unapprovedTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 16.88200327,
|
||||
"conversionDate": 1489013762,
|
||||
"noActiveNotices": true,
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 11.21274318,
|
||||
"conversionDate": 1472159644,
|
||||
"accounts": {
|
||||
|
@ -5,7 +5,7 @@
|
||||
"rpcTarget": "https://rawtestrpc.metamask.io/",
|
||||
"identities": {},
|
||||
"unconfTxs": {},
|
||||
"currentFiat": "USD",
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 8.18703468,
|
||||
"conversionDate": 1481755832,
|
||||
"network": "3",
|
||||
|
@ -71,7 +71,7 @@ var actions = {
|
||||
SHOW_CONF_TX_PAGE: 'SHOW_CONF_TX_PAGE',
|
||||
SHOW_CONF_MSG_PAGE: 'SHOW_CONF_MSG_PAGE',
|
||||
SET_CURRENT_FIAT: 'SET_CURRENT_FIAT',
|
||||
setCurrentFiat: setCurrentFiat,
|
||||
setCurrentCurrency: setCurrentCurrency,
|
||||
// account detail screen
|
||||
SHOW_SEND_PAGE: 'SHOW_SEND_PAGE',
|
||||
showSendPage: showSendPage,
|
||||
@ -330,10 +330,10 @@ function showInfoPage () {
|
||||
}
|
||||
}
|
||||
|
||||
function setCurrentFiat (currencyCode) {
|
||||
function setCurrentCurrency (currencyCode) {
|
||||
return (dispatch) => {
|
||||
dispatch(this.showLoadingIndication())
|
||||
log.debug(`background.setCurrentFiat`)
|
||||
log.debug(`background.setCurrentCurrency`)
|
||||
background.setCurrentCurrency(currencyCode, (err, data) => {
|
||||
dispatch(this.hideLoadingIndication())
|
||||
if (err) {
|
||||
@ -343,7 +343,7 @@ function setCurrentFiat (currencyCode) {
|
||||
dispatch({
|
||||
type: this.SET_CURRENT_FIAT,
|
||||
value: {
|
||||
currentFiat: data.currentFiat,
|
||||
currentCurrency: data.currentCurrency,
|
||||
conversionRate: data.conversionRate,
|
||||
conversionDate: data.conversionDate,
|
||||
},
|
||||
|
@ -9,7 +9,7 @@ module.exports = connect(mapStateToProps)(FiatValue)
|
||||
function mapStateToProps (state) {
|
||||
return {
|
||||
conversionRate: state.metamask.conversionRate,
|
||||
currentFiat: state.metamask.currentFiat,
|
||||
currentCurrency: state.metamask.currentCurrency,
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ FiatValue.prototype.render = function () {
|
||||
fiatTooltipNumber = 'Unknown'
|
||||
}
|
||||
|
||||
var fiatSuffix = props.currentFiat
|
||||
var fiatSuffix = props.currentCurrency
|
||||
|
||||
return fiatDisplay(fiatDisplayNumber, fiatSuffix)
|
||||
}
|
||||
|
@ -125,19 +125,19 @@ function rpcValidation (newRpc, state) {
|
||||
}
|
||||
|
||||
function currentConversionInformation (metamaskState, state) {
|
||||
var currentFiat = metamaskState.currentFiat
|
||||
var currentCurrency = metamaskState.currentCurrency
|
||||
var conversionDate = metamaskState.conversionDate
|
||||
return h('div', [
|
||||
h('span', {style: { fontWeight: 'bold', paddingRight: '10px'}}, 'Current Conversion'),
|
||||
h('span', {style: { fontWeight: 'bold', paddingRight: '10px', fontSize: '13px'}}, `Updated ${Date(conversionDate)}`),
|
||||
h('select#currentFiat', {
|
||||
h('select#currentCurrency', {
|
||||
onChange (event) {
|
||||
event.preventDefault()
|
||||
var element = document.getElementById('currentFiat')
|
||||
var newFiat = element.value
|
||||
state.dispatch(actions.setCurrentFiat(newFiat))
|
||||
var element = document.getElementById('currentCurrency')
|
||||
var newCurrency = element.value
|
||||
state.dispatch(actions.setCurrentCurrency(newCurrency))
|
||||
},
|
||||
defaultValue: currentFiat,
|
||||
defaultValue: currentCurrency,
|
||||
}, currencies.map((currency) => {
|
||||
return h('option', {key: currency.code, value: currency.code}, `${currency.code} - ${currency.name}`)
|
||||
})
|
||||
|
@ -13,9 +13,6 @@ function reduceMetamask (state, action) {
|
||||
rpcTarget: 'https://rawtestrpc.metamask.io/',
|
||||
identities: {},
|
||||
unapprovedTxs: {},
|
||||
currentFiat: 'USD',
|
||||
conversionRate: 0,
|
||||
conversionDate: 'N/A',
|
||||
noActiveNotices: true,
|
||||
lastUnreadNotice: undefined,
|
||||
frequentRpcList: [],
|
||||
@ -127,7 +124,7 @@ function reduceMetamask (state, action) {
|
||||
|
||||
case actions.SET_CURRENT_FIAT:
|
||||
return extend(metamaskState, {
|
||||
currentFiat: action.value.currentFiat,
|
||||
currentCurrency: action.value.currentCurrency,
|
||||
conversionRate: action.value.conversionRate,
|
||||
conversionDate: action.value.conversionDate,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user